2

Are there any software alternatives to Flex and Bison that are well documented and easy to install for Windows? I would like to exemplify some cases to my students, but I do not want to install a virtual machine to run these two tools.

Any help?

  • 5
    I'm voting to close this question as off-topic because it belongs on Software Recommendations. – curiousdannii Apr 7 '16 at 10:09
  • @curiousdannii Software rec is a QA for general recommendations, these tools are academic. You can't compare Windows Media Player with Prosodypro (Xu, Y., 2013. ProsodyPro—A tool for large-scale systematic prosody analysis.) I'm voting to leave it open. – Andrew Ravus Apr 10 '16 at 5:08
  • @AdelRahimi Software Recs is for all software recommendations, even academic ones. – curiousdannii Apr 10 '16 at 6:32
  • @curiousdannii I agree, but you are less likely to get a good answer from in software rec. – Andrew Ravus Apr 10 '16 at 11:33
2

If you are familiar with Python an alternative for Flex would be NLTK's tokenizer:

>>> from nltk.tokenize import TweetTokenizer
>>> tknzr = TweetTokenizer()
>>> s0 = "This is a cooool #dummysmiley: :-) :-P <3 and some arrows < > -> <--"
>>> tknzr.tokenize(s0)
['This', 'is', 'a', 'cooool', '#dummysmiley', ':', ':-)', ':-P', '<3', 'and', 'some', 'arrows', '<', '>', '->', '<--']

Also for Windows version of Bison you could use Bison for Windowsfrom http://gnuwin32.sourceforge.net/packages/bison.htm


BUT in the end there are better alternatives, Win flex-Bison is a package that combines Flex and Bison for windows:

Win flex-bison is a windows port the Flex (the fast lexical analyser) and Bison (GNU parser generator). win_flex based on Flex version 2.5.37 source code and win_bison based on Bison version 2.7 and they depend on system libraries only.

You can download it from here: https://sourceforge.net/projects/winflexbison/

| improve this answer | |
0

If what you want is to teach them about lexing and parsing, how about SWI-prolog? It even has a limited online version.

Though, showing off lexing and parsing with prolog might ruin them for other solutions... Been there, despaired that.

| improve this answer | |
0

Why would you need a virtual machine? Here's a flex for Windows (I haven't used it, myself): winflex.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.