Skip to content

Warnings printed out when parsetabs created need to be addressed. #52

@salspaugh

Description

@salspaugh

When the parsetabs are created you might notice warnings like:

WARNING: 53 shift/reduce conflicts
WARNING: Token 'OUTPUTNEW' defined, but not used
WARNING: Token 'ASUC' defined, but not used
WARNING: Token 'ASLC' defined, but not used
WARNING: Token 'OUTPUT' defined, but not used
WARNING: /Users/salspaugh/splparser/splparser/rules/common/valuerules.py:5: Rule 'value' defined, but not used
WARNING: There are 4 unused tokens
WARNING: There is 1 unused rule
WARNING: Symbol 'value' is unreachable

Two things should be done:
(1) Change the logging so that the warnings get written to the logs and not to stderr, so that we can identify which command is generating which warning.
(2) Fix all warnings except those dealing with shift/reduce conflicts.

@richzeng Since it looks like the dedup command is responsible for some of these warnings, do you want to take a stab at this? Another command you wrote might also be doing this since it's giving the same warnings, but since the warnings just get written to stderr without any indication which command is causing them, it's hard to be sure. The second part should be really easy to address and is really just a code cleanliness thing. The first part shouldn't be hard either, and is a usefulness thing. The question is whether you pass the debug / logging info to the parser when it's created or to the parse command or etc. Depending on which it is, it will involve changes to splparser/parser.py or splparser/decorators.py.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions