help-bison
[Top][All Lists]
Advanced

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

Re: help with simple grammar please


From: Hans Aberg
Subject: Re: help with simple grammar please
Date: Sun, 25 Aug 2002 13:49:30 +0200

At 03:06 -0400 2002/08/25, Bernd Prager wrote:
>    Hi,   just starting with bison and try to understand  it. The grammar
>file looks like:

Your stuff is extremely difficult to parse; try to write code in a more
structured way, if you want others to be able to read it :-).

>    ;   sentence:   '(' word expression  ')'
>        {  printf( "sentence:  (word >%s< expression >%s<)\n", $1, $2); }

Here, the value of "word" is numbered $2 and that of "expression" $3.

Also, you do not let us know what your yylex is: A very common error is
that people fail to copy the strings the lexer detects, only providing a
pointer to a buffer that may change on subsequent calls to yylex.

  Hans Aberg






reply via email to

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