Skip to content

Pre-parser code must come after imports in the generated parser #4

@felixp7

Description

@felixp7

See https://gist.github.com/felixplesoianu/90d104fa8ad75b02155b -- if I try to run the generated parser from the command line, I get the following exception:

  File "exprcalc3.py", line 11
    from __future__ import print_function
SyntaxError: from __future__ imports must occur at the beginning of the file

Editing exprcalc3.py accordingly is a trivial workaround, but ideally it shouldn't be needed. Thank you.

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