Commit graph

5 commits

Author SHA1 Message Date
Eric Swanson
d456cc98eb
Update compiler grammar (#238)
* Update grammar
  - add '=' to grammar so that we can report appropriate errors
  - add elvis ?: operator
  - add foreachIterableExpression to match old compiler (which only allows certain expressions)
  - allow both byref and unused on the same function parameter
  - rename methodCall -> functionCall
  - rename memberCall -> methodCall
  - add named parser rule for functionReference
  - move everything that isn't expression(s) with operators into primary
    - expression is now just the left-recursive rules and prefix operators
  - add named parser rules for struct, dictionary, error, array initialization
  - remove special-case for named parameters with := from function call argument, because it is ambiguous with assignment
  - Moved array access, object member access, and object method calls to navigationSuffix

* Regen grammar
2020-08-21 01:53:42 -07:00
Eric Swanson
ed033fc6e4 bscript uses antlr library, and compiles the lexer and parser
Ignore ANTLR grammar plugin (idea) generated files
2020-08-03 19:39:29 -07:00
Eric Swanson
4834aee9d9 escript_grammar.cmake from Turley
Incorporate cmake/escript_grammar.cmake

Adjust generated EscriptParser.cpp: Need namespace for TokenStream in constructor
2020-07-26 23:42:33 -07:00
Eric Swanson
c0880e5e46 generated lib/EscriptGrammar from grammar 2020-07-26 21:28:02 -07:00
Eric Swanson
bc95e2e53b
EscriptGrammar from escript-antlr repo commit ef133e3a3a3184936e93493c863b7b995cdf4737 (#162) 2020-07-25 12:17:42 -07:00