Where is $$ defined?

2022-06-07 Thread slipbits
In 3.7.6 Performing Actions before Parsing and 3.7.7 Freeing Discarded Symbols, $$ is referenced. I can't find any definition of this. I do find definitions of other $$ constructs, but not of tag. I assume that 'tag' has the same meaning as in 3.7.5 Syntax of Symbol Declarations. In particula

Token Syntax is confusing

2022-06-07 Thread slipbits
In 3.7.5 Syntax of Symbol Declarations   %token tag? ( id number? string? )+ ( tag ( id number? string? )+ )*  // is legal A few points (minor I admit): 1. The meaning of '+', '?', '*' is given. The meaning of '|' is not (see %type definition). 2. No mention of the meaning of a line feed,

Issuesin document

2022-06-07 Thread slipbits
Section 3.4.8.1 stmt: "let" '(' var ')' { $$ = push_context (); declare_variable ($3); } stmt { $$ = $5; pop_context ($5); } Shouldn't $$ = $6 be $$ = $3?, same for 3.4.6.2 There is no formal description of the Bison syntax. Given: %tokenOR

Enhancement requiest

2022-06-07 Thread slipbits
In 3.3.3 Recursive Rules you say: "...you should always use left recursion, because it can parse a sequence of any number of elements with bounded stack space. Right recursion uses up space on the Bison stack in proportion to the number of elements in the sequence ..." In ANTLR (an LL(1) par