Skip to content

Bug: const keyword not working #332

@WenSimEHRP

Description

@WenSimEHRP

030_house.nml
log:

Running test 029_base_graphics
Running test 030_house
 nmlc ERROR: "030_house.nml", line 53: Syntax error, unexpected token "const"
Traceback (most recent call last):
  File "D:\Data\Documents\GitHub\__Developing\jppluswins\nml\nmlc", line 6, in <module>
    main.run()
  File "D:\Data\Documents\GitHub\__Developing\jppluswins\nml\nml\main.py", line 639, in run
    main(sys.argv[1:])
  File "D:\Data\Documents\GitHub\__Developing\jppluswins\nml\nml\main.py", line 346, in main
    ret = nml(
          ^^^^
  File "D:\Data\Documents\GitHub\__Developing\jppluswins\nml\nml\main.py", line 434, in nml
    result = nml_parser.parse(script, input_filename)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Data\Documents\GitHub\__Developing\jppluswins\nml\nml\parser.py", line 84, in parse
    return self.parser.parse(None, lexer=self.lexer.lexer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jerry\scoop\apps\python\current\Lib\site-packages\ply\yacc.py", line 333, in parse
    return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jerry\scoop\apps\python\current\Lib\site-packages\ply\yacc.py", line 1201, in parseopt_notrack
    tok = call_errorfunc(self.errorfunc, errtoken, self)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jerry\scoop\apps\python\current\Lib\site-packages\ply\yacc.py", line 192, in call_errorfunc
    r = errorfunc(token)
        ^^^^^^^^^^^^^^^^
  File "D:\Data\Documents\GitHub\__Developing\jppluswins\nml\nml\parser.py", line 106, in p_error
    raise generic.ScriptError('Syntax error, unexpected token "{}"'.format(t.value), t.lineno)
nml.generic.ScriptError: "030_house.nml", line 53: Syntax error, unexpected token "const"
make[1]: *** [Makefile:21: 030_house] Error 1
make[1]: Leaving directory 'D:/Data/Documents/GitHub/__Developing/jppluswins/nml/regression'
make: *** [Makefile:8: regression] Error 2

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