The grammar fails to parse files where the last line is a comment.
foo: "1"
bar: "2"
#DO NOT CHANGE ANY OF THE ABOVE SETTINGS!
Traceback (most recent call last):
File "test.py", line 6, in <module>
config = ConfigFactory.parse_string(input)
File "/<redacted>/pyhocon/config_parser.py", line 90, in parse_string
return ConfigParser().parse(content, basedir, resolve)
File "/<redacted>/pyhocon/config_parser.py", line 273, in parse
config = config_expr.parseString(content, parseAll=True)[0]
File "/<redacted>/env/lib/python2.7/site-packages/pyparsing.py", line 1617, in parseString
raise exc
pyparsing.ParseSyntaxException: No match found for Suppress:(W:(
)) (at char 1), (line:1, col:2)
The grammar fails to parse files where the last line is a comment.
Example:
Gives the exception:
The HOCON spec does not say this isn't allowed, so it should parse correctly as a comment.