|YACC->Bison email@example.com (1999-05-16)|
|Re: YACC->Bison firstname.lastname@example.org (1999-05-20)|
|Re: YACC->Bison email@example.com (Javeed Ahmed) (1999-09-10)|
|Date:||16 May 1999 15:16:40 -0400|
|Keywords:||yacc, question, comment|
We're working on porting our application to Linux, and have a section
that we're having trouble with. I've got a file named idr_parser.y,
which is compile with yacc. This will need to be compiled with bison.
The current code gives me this error:
yacc -vdl idr_parser.y
("idr_parser.y", line 107) error: type clash (`' `token_id') on default
make: *** [idr_parser.o] Error 1
make: Leaving directory `/home/bob/cubit/source'
make: *** [cubit] Error 2%start statements
The lines in question with their line numbers are:
102: statements :
103: | statements statement
106: statement : END
107: | command END
109: debug_idr_num("statement", "END", "number of entries",
Can someone point me the way to figure out how to make this code correct
for both yacc and bison?
[All versions of yacc, of which bison is one, apply a default action of
$$ = $1 to any rule without explicit action code. I'd guess that it's
counting the lines wrong and you have a rule with a token_id that is
default assigned to a LHS of a different type. -John]
Return to the
Search the comp.compilers archives again.