Flex/Bison IDE? [closed]
Asked Answered
I

6

16

I'm looking for a good development environment in which to work on flex or bison or both.

Are there any IDE's that have these capabilities and/or are suitable for this?

(If not the next most general question is are there lexer/parser generators with IDE's?)

Thanks ~Alex

Imam answered 19/7, 2009 at 16:49 Comment(1)
crap. i accidentally rolled back a change when i meant to comment.Imam
E
7

ANTLR has several IDEs available, including one I wrote. By user count, ANTLRWorks is probably the most used. Mine has fewer overall features, but I use it extensively because it integrates so cleanly with my Visual Studio work. ANTLR's grammar syntax is clean and very powerful, generates code for many languages, and its generated lexers/parsers are clean, debuggable code.

Edit to address concerns in the comments:

  • Commercial documentation for ANTLR exists and is recommended by many, but is certainly not required. The nFringe IDE product (commercial/closed source) I worked on uses ANTLR extensively and was developed completely without the aid of the ANTLR reference book.
  • ANTLRWorks 1.x development is slow, but not stopped. There are currently no open issues, and two significant issues have been fixed since the latest 1.5 release.
  • ANTLRWorks 2 is a completely different product and was written from scratch. A separate issue tracker is available for this product.
Esau answered 19/7, 2009 at 17:2 Comment(4)
I'm a big fan of flex/bison, but I must say that the visualization in ANTLRWorks is a HUUUGE attraction.Imam
Everyone fails to mention that the documentation for ANTLR is a commercial product. ANTLRWorks has stopped being developed and is buggy. The rights were apparently bought by another company, which has developed ANTLRWorks 2, which is even worse off. As someone who is just starting out trying to figure out how to make a compiler, I've already been enticed by ANTLR, been disappointed, and have moved on to Bison and flex.Ddene
@Ddene I updated my post to address some of the items you mentioned.Esau
that link to your program is brokenGoliard
G
12

Vim has excellent syntax highlighting support for flex / lex and bison / yacc files. Vim seems to guess from file extensions, so as long as my flex files end in .l or .lex and my bison files end in .y, it seems to work fine. I know, it's barely an IDE, but I find the syntax highlighting to be the most helpful feature for me.

Grani answered 1/2, 2010 at 9:52 Comment(0)
E
7

ANTLR has several IDEs available, including one I wrote. By user count, ANTLRWorks is probably the most used. Mine has fewer overall features, but I use it extensively because it integrates so cleanly with my Visual Studio work. ANTLR's grammar syntax is clean and very powerful, generates code for many languages, and its generated lexers/parsers are clean, debuggable code.

Edit to address concerns in the comments:

  • Commercial documentation for ANTLR exists and is recommended by many, but is certainly not required. The nFringe IDE product (commercial/closed source) I worked on uses ANTLR extensively and was developed completely without the aid of the ANTLR reference book.
  • ANTLRWorks 1.x development is slow, but not stopped. There are currently no open issues, and two significant issues have been fixed since the latest 1.5 release.
  • ANTLRWorks 2 is a completely different product and was written from scratch. A separate issue tracker is available for this product.
Esau answered 19/7, 2009 at 17:2 Comment(4)
I'm a big fan of flex/bison, but I must say that the visualization in ANTLRWorks is a HUUUGE attraction.Imam
Everyone fails to mention that the documentation for ANTLR is a commercial product. ANTLRWorks has stopped being developed and is buggy. The rights were apparently bought by another company, which has developed ANTLRWorks 2, which is even worse off. As someone who is just starting out trying to figure out how to make a compiler, I've already been enticed by ANTLR, been disappointed, and have moved on to Bison and flex.Ddene
@Ddene I updated my post to address some of the items you mentioned.Esau
that link to your program is brokenGoliard
B
2

If you are comfortable in emacs, I would suggest these modes:

http://ftp.lip6.fr/pub/emacs/elisp-archive/incoming/bison-mode.el.gz
http://ftp.lip6.fr/pub/emacs/elisp-archive/incoming/flex-mode.el

Keep in mind that both are very buggy, but after a while I figured out most of the quirks to get the indentation working.

An example .emacs that loads these modes: http://www.elliotglaysher.org/emacs/

Blouson answered 31/3, 2011 at 14:0 Comment(0)
C
2

Personally I use Gedit it has a native lex/flex yacc/bison highlighting

Cloutier answered 18/5, 2015 at 16:20 Comment(0)
D
1

Just found GOLD Parsing System. It's not Flex/Bison, but if something similar is acceptable this seems to be a great IDE, and there's great getting-started documentation on the web site.

Ddene answered 27/4, 2013 at 22:52 Comment(0)
S
1

Visual studio has good support for flex/bison, https://sourceforge.net/p/winflexbison/wiki/Visual%20Studio%20custom%20build%20rules/

To summarize, you'll need install win_flex_bison, the GNUWin port of flex and bison, and set visual studio's custom build rule using 'targets' file present along with the port, set exe path in VC++ directories settings; then it be built and debugged as usual cpp files.

enter image description here

Suzy answered 24/2, 2018 at 17:32 Comment(1)
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.Embay

© 2022 - 2024 — McMap. All rights reserved.