help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issuesin document


From: slipbits
Subject: Issuesin document
Date: Tue, 7 Jun 2022 12:50:26 -0700
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0

Section 3.4.8.1

stmt:
  "let" '(' var ')'
    {
      $<context>$ = push_context ();
      declare_variable ($3);
    }
  stmt
    {
      $$ = $5;
      pop_context ($<context>5);
    }

Shouldn't $$ = $6 be $$ = $3?, same for 3.4.6.2


There is no formal description of the Bison syntax. Given:


   %token  <operator>  OR      "||"
   %token  <operator>  LE 134  "<="
   %left  OR  "<="

and
   %token
       OR     "||"
       LPAREN "("
       RPAREN ")"
       '\n'   _("end of line")
     <double>
       NUM    _("number")

Is the following legal?
   %token  <operator>  OR      "||"
           LPAREN "("
and
   %token  <operator>
           OR      "||"
           LPAREN "("
           <operator> LE 134
              "<=?

You do not specify the yylex interface explicitly. Is it fair to assume that 
for:
    %token ARROW "=>"

yylex returns a token with some Bison defined number and not two tokens, '=' and 
'>-?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]