> Derek M Jones wrote:
>
> > >>I have written a parser for C that processes
> > >>a single statement or declaration at a time.
> > >>So after each statement/declaration yyparse
> > >>returns.
> > >
I think you might be able to simplify matters by just using
`statement' as your start symbol and cal
Hans,
>>In the case:
>>
>>typedef x, y;
>>typedef i, j;
I should have given the example as:
typedef x y;
typedef i j;
>>
>>the second typedef token is shifted onto all three stacks and
>>subsequent tokens are processed like a declaration (which they
>>do form part of)! So I don't get a parse o
Henrik,
I understand that grammar is ambiguous.
In case of big grammars, it gets difficult to find out
the rules causing the conflicts.
While creating the lookahead set, if bison can
annotate the rules too, it would be helpful.
So, if I get the following output (rule no after a
lookahead symbol)
On Tuesday 01 March 2005 19.02, Soumitra Kumar wrote:
> Henrik,
> So, if I get the following output (rule no after a
> lookahead symbol), finding the ambiguous rules is
> trivial.
well, in the output file you can search for all the states that have a goto
your state 10.
_
At 19:24 + 2005/02/28, Derek M Jones wrote:
>>>I have written a parser for C that processes
>>>a single statement or declaration at a time.
>>>So after each statement/declaration yyparse
>>>returns.
>>
>>Bison is clearly not built to handle such applications. The normal thing is
>>to handle the
At 15:38 + 2005/03/01, Derek M Jones wrote:
>I suddenly realised that the token sequence:
>
>typedef x y;
>typedef i j;
>{
>
>is a syntactically valid function definition.
So it seems, but I have not been able to figure out which function. :-) The
problem is that C has some grammar difficultie
At 12:46 -0800 2005/02/28, Soumitra Kumar wrote:
>Following is a sample grammar. There is one r/r
>conflict.
>
>% cat test.y
>%token YYID YYDOT
>%%
>identifier : hier_id
>;
>hier_id : simple_id
>| hier_id opt_select YYDOT simple_id
>;
>opt_select :
>| opt_select '['
ß[éܪ¶ñM-TOWN(^O^)/¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL
PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL
PROTECTED]@[EMAIL PROTECTED]
[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTEC