Windows Lex/Yacc (and Bumblebee)
-
I'm trying to get Bumbleebee Software's lex and yacc generator up and running. I'm pretty experienced with lex and yacc, but only on unix systems. The problem is, if I use Bumblebee's ParserWizard, I get a good grammar and can compile, but the resulting application (I'm building into a windows console application) always crashes. I've tried "empty" grammars. I've also tried a grammar that can only produce a single non-terminal, i.e., it should be able to match an input of "binky", and nothing else. No matter what I try, the resulting application always crashes. I've tried reading from stdin and from a file, with no luck. I wish I could copy and paste some of the examples provided with bumblebee (like the calculator grammar), but it seems that most of them are the grammar without an accompanying lexer. I had hoped that there would be a complete example that I could compile in ParserGenerator and then compile in Visual C++ and have a working application (no matter how simple). But, apparently, no luck there. I would be immensely grateful for any of the following: 1. Any simple grammar (and lexer if needed) that I can compile in Bumblebee and then MSVC and run the resulting console app without a crash. 2. Advice, tips, suggestions on what is needed to get a working Bumblebee generated grammar and lexer. I obviously don't know why my parsers and lexers are not working. Could it be because under unix, anything not parsed gets dumped to stdout, and this is not acceptable in windows? Is it something else that I have not done properly? Thanks for any help you can offer! maxmaven
-
I'm trying to get Bumbleebee Software's lex and yacc generator up and running. I'm pretty experienced with lex and yacc, but only on unix systems. The problem is, if I use Bumblebee's ParserWizard, I get a good grammar and can compile, but the resulting application (I'm building into a windows console application) always crashes. I've tried "empty" grammars. I've also tried a grammar that can only produce a single non-terminal, i.e., it should be able to match an input of "binky", and nothing else. No matter what I try, the resulting application always crashes. I've tried reading from stdin and from a file, with no luck. I wish I could copy and paste some of the examples provided with bumblebee (like the calculator grammar), but it seems that most of them are the grammar without an accompanying lexer. I had hoped that there would be a complete example that I could compile in ParserGenerator and then compile in Visual C++ and have a working application (no matter how simple). But, apparently, no luck there. I would be immensely grateful for any of the following: 1. Any simple grammar (and lexer if needed) that I can compile in Bumblebee and then MSVC and run the resulting console app without a crash. 2. Advice, tips, suggestions on what is needed to get a working Bumblebee generated grammar and lexer. I obviously don't know why my parsers and lexers are not working. Could it be because under unix, anything not parsed gets dumped to stdout, and this is not acceptable in windows? Is it something else that I have not done properly? Thanks for any help you can offer! maxmaven
I haven't used Bumblebee, but I have recompiled the linux flex and bison source and used them under Windows. I've never had the resulting scanners/parsers crash (except for my coding errors of course). I dunno if that helps much, but I can say it's not because of Windows.
Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"