You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TatSu grammar syntax is the result of the experience with parsing several major programming languages. Common constructs have shortcuts that help in building ASTs.
For people coming from other parser generators or wanting to experiment with different ones, it would be good if their grammar in standard PEG syntax was understood by TatSu.
Another syntax that TatSu could accept is standard EBNF.
The text was updated successfully, but these errors were encountered:
I've come to like Tatsu's syntax. I think its just close enough to EBNF, the only real difference I see is that it allows having spaces in non terminals, which sounds like an awful idea considering python identifiers don't. To quote Wikipedia:
The International Organization for Standardization adopted an EBNF standard (ISO/IEC 14977) in 1996. However, according to Zaytsev this standard "only ended up adding yet another three dialects to the chaos" and, after noting its lack of success, also notes that the ISO EBNF is not even used in all ISO standards. Wheeler argues against using the ISO standard when using an EBNF, and recommends considering alternative EBNF notations such as the one from the W3C Extensible Markup Language (XML) 1.0 (Fifth Edition).
As for PEG, is there even a standard around for that? There's / for ordered choice but so far I've seen every parser generator make some additions (https://github.com/PhilippeSigaud/Pegged/wiki/Extended-PEG-Syntax for reference) and the rest looks close enough to Tatsu again.
The TatSu grammar syntax is the result of the experience with parsing several major programming languages. Common constructs have shortcuts that help in building ASTs.
For people coming from other parser generators or wanting to experiment with different ones, it would be good if their grammar in standard PEG syntax was understood by TatSu.
Another syntax that TatSu could accept is standard EBNF.
The text was updated successfully, but these errors were encountered: