Expand description
Individual parsers for Lustre’s grammar
If you want to parse an entire program, you’ll mostly use parse_program. However, this
module gives you access to finer parsers, in case you need to build the syntax tree of a very
specific element. Most parsers in this file are grouped in submodules according to the same
“Ebnf groups” that appear in the official specification. There is however no guarantee
that all parsers here map 1:1 to a parsing rule from the specification.
§Errors
While parsing an entire program isn’t supposed to make the actual parser fail, if you go about parsing individual syntax elements using a parser from this module, their parsers may fail, typically if the first (few) token(s) are/is unexpected.
Modules§
- Expression-related parsers
Functions§
- Parses en entire Lustre file (entry point to the rustre nom parser)
- Include or OneDecl (ConstDecl, TypeDecl, ExtNodeDecl, NodeDecl) or OnePack