fte.js-parser
v3.0.0-canary.fa90532
Published
template parser
Readme
fte.js - fast template engine that is reborn
template parser
Grammar
See GRAMMAR.ebnf for the formal EBNF grammar describing parser states and tags.
Validate grammar
- Online: use any EBNF playground (e.g. search for "EBNF playground" or "ISO EBNF validator").
- Local (Node): recommended tools
nearley(PEG-based) — translate EBNF to PEG by hand or via helpers and test with CLIohm-js— port grammar to Ohm syntax and run recognition testsebnf-parser— parse EBNF and inspect AST
Example (with bunx):
bunx ebnf2railroad GRAMMAR.ebnf > grammar.html # visualizeFor automated checks consider snapshot tests that parse a corpus of templates and assert no grammar conflicts against GRAMMAR.ebnf semantics.
