Skip to content

Assignment of variables with underscore in their name causes pyparsing exception #312

@gafniguy

Description

@gafniguy

With the following config file,

model{
    d_in = 3
    d_out = 2
}

I ran ConfigFactory.parse_file('./confs/test2.conf') and get an exception:

pyparsing.exceptions.ParseSyntaxException: , found '=' (at char 30), (line:3, col:11)

If I change d_out to e_out, or comment one of them out, or remove the underscore in at least one of their names, I will get no exception.

I get this with Python 3.11.3, Python 3.8.17 and pyparsing 3.1.0 and pyparsing 3.0.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions