help-bison
[Top][All Lists]
Advanced

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

Re: doubts with shift-reduce and nonterminals


From: Mili Sandokan
Subject: Re: doubts with shift-reduce and nonterminals
Date: Tue, 24 Jan 2006 12:11:38 -0300

Hi

I know how to set precedence between tokens but i'm asking how to do
this when the  " . " is between two non-terminals.... ¿can I show you
a piece of the output file?

state 477

   81 s_condicional: T_IF '(' expresion ')' . sentencia_o_nada
   82              | T_IF '(' expresion ')' . sentencia_o_nada T_ELSE
sentencia_o_nada

    IDENT     shift, and go to state 187
    T_BEGIN   shift, and go to state 188
    T_IF      shift, and go to state 189
    T_WHILE   shift, and go to state 190
    T_CASE    shift, and go to state 191
    T_FOR     shift, and go to state 192
    T_REPEAT  shift, and go to state 193

    IDENT     [reduce using rule 79 (sentencia_o_nada)]
    T_BEGIN   [reduce using rule 79 (sentencia_o_nada)]
    T_IF      [reduce using rule 79 (sentencia_o_nada)]
    T_WHILE   [reduce using rule 79 (sentencia_o_nada)]
    T_CASE    [reduce using rule 79 (sentencia_o_nada)]
    T_FOR     [reduce using rule 79 (sentencia_o_nada)]
    T_REPEAT  [reduce using rule 79 (sentencia_o_nada)]
    $default  reduce using rule 79 (sentencia_o_nada)

    sentencia_o_nada  go to state 558
etc etc...

As suggested, I use lower case for nonterminals and upper case for tokens....

Please, be patient with me, I really want to learn

Greetings
Misandov




reply via email to

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