Skip to main content

Module grammar

Module grammar 

Source

Functions§

build_expression_grammar
Build a grammar that parses a single expression (Phase 2). Start rule is “start” → ws expr ws eof.
build_grammar
Build the LeekScript grammar (Phase 1: token stream).
build_program_grammar
Build a grammar that parses a program (Phase 3/4: list of statements). Start rule is “start” → node(NodeRoot, ws program ws eof) so the parse tree has a single root.
build_signature_grammar
Build the signature file grammar. Start rule: startsig_ws sig_file sig_ws eof.