Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Windows Lex/Yacc (and Bumblebee)

Windows Lex/Yacc (and Bumblebee)

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestionregextutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    maxmaven
    wrote on last edited by
    #1

    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

    R 1 Reply Last reply
    0
    • M 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

      R Offline
      R Offline
      Ryan Binns
      wrote on last edited by
      #2

      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"

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups