Spectral
Spectral

Reputation: 717

Flex/Bison ... usage

I'm new to Flex/Bison and I try to create a small "parser/lexer" for an existing grammar.

I use the following commands

"bison/bin/bison.exe" -dv -p osl -o oslgram.cpp oslgram.y
pause

"flex/bin/flex.exe" -+ -o osllex.cpp osllex.l
pause

But I got some errors... really I don't understand what it mean ! If someone has experience with this tool it will be great ?

oslgram.y: conflits: 1 décalage/réduction, 1 réduction/réduction
bison/bin/bison.exe: m4: No such file or directory
flex/bin/flex.exe: can't open osllex.cpp

You can find more information about the project here (the .l and .y files are there) :

http://code.google.com/p/openshadinglanguage/source/browse/

Thanks

Upvotes: 1

Views: 2594

Answers (1)

bug-a-lot
bug-a-lot

Reputation: 2454

Looks like you've got some ambiguities in your grammar. So bison tells you you've got one shift/reduce and one reduce/reduce conflict.

See http://www.delorie.com/gnu/docs/bison/bison_11.html and http://www.delorie.com/gnu/docs/bison/bison_80.html for more information.

Without the contents of oslgram.y I don't think there's much more anyone could help you with.

Upvotes: 1

Related Questions