Cover of Flex & bison

Flex & bison

by John R. Levine · first published 2009

11mentions
3recommended by
11HN commenters
2013–2024first – last mentioned

27% recommend73% neutral

Affiliate links. As an Amazon Associate I earn from qualifying purchases.

Mentions per year

30 2007: 0 mentions2008: 0 mentions2009: 0 mentions2010: 0 mentions2011: 0 mentions2012: 0 mentions2013: 1 mention2014: 3 mentions2015: 0 mentions2016: 0 mentions2017: 0 mentions2018: 1 mention2019: 0 mentions2020: 0 mentions2021: 3 mentions2022: 1 mention2023: 1 mention2024: 1 mention2025: 0 mentions2026: 0 mentions200720172026

What Hacker News says

  • massinstall · Feb 15, 2022 · Recommends

    Going by OP's description, Flex and Bison appear to be well suited for what he/she intends to do. There is a bit of a learning curve, but I think it's well worth it. I have been working with both for a few years now and find them very flexible.…

    on “Ask HN: Good Resources to Learn and Implement a Parser (Compiler)” ↗
  • rurban · Feb 4, 2014 · Recommends

    …article for someone like Walter Bright. Just some basic recommendations, but nothing practical? No links to books, parsers, implementations? The easiest start would be "Compiler Construction using Flex and Bison" by Anthony A. Aaby, available as free pdf, and for adding LLVM to the mix the link would be: http://gnuu.org/2009/09/18/writing-your-own-toy-compiler/ There needs much more to be said, e.g. links to…

    on “So you want to write your own language?” ↗
  • klodolph · Dec 6, 2021 · Recommends

    …I admit that there are often better options out there these days, I'm just saying that some of these complaints about Flex / Bison may be a bit outdated. Multiple grammars are fine, you just instruct Flex and Bison to use static or add prefixes. No worries about ODR or LTO. If your build system can't handle generated code, that's an indictment of your build system. I know that's a bit harsh, but there are plenty…

    on “C++ Compile Time Parser Generator” ↗
  • da_murvel · Sep 12, 2018 · Mentions

    I've been thinking about writing my own programming language for some time. This to gain a deeper understanding of how programming languages, and by extent, computers work. I've bought the Flex and Bison book by John Levine to have a resource on parsing and lexing. I have come to realize however, that writing a complete language like Java, Python, Ruby, from bottom to the top, is of course not a small…

    on “Ask HN: What's a starting point for learning how to write programming languages?” ↗
  • "Jargon", perhaps. "Never been in use by authors"? Not so. The current "international economy edition" of Aho, et al uses "lexing" 29 times, according to the search function on Amazon. Flex & Bison by John Levine (O'Reilly and Associates) uses "lexing" 38 times. And so on.

    on “Turing Award goes to Aho and Ullman” ↗
  • jjice · Aug 3, 2021 · Mentions

    …the professor to give us the option of using a parser generator for the next phase (DML) since the point of the class wasn't parsing context free grammars and more focused on executing the SQL. I used Flex and Bison since the project was in C. Getting up and running and understanding how the tools have to be set up with different options was a bit tricky, but after that, my parser was up and running in about two…

    on “Show HN: A work-in-progress C compiler from scratch” ↗
  • jvoorhis · Aug 6, 2013 · Mentions

    I actually skipped the course, but grabbed my used copy from the old Powell's Tech before it closed, as well as the O'Reilly Flex and Bison book. It felt like I had the nuclear reactor manual! I also got really into writing interpreters, mainly in Ruby, after reading probably too many ICFP papers on the subject (and even shipped one to solve…

    on “Create Your Own Programming Language” ↗
  • acqq · Feb 4, 2014 · Mentions

    The author writes his own experiences, and they are directly opposite of the "Compiler Construction using Flex and Bison." And he explains why. I also remember Stroustrup's story where once he wanted to develop C++ he got well meant advices to use lex and yacc, and he claims that he much later realized that much better…

    on “So you want to write your own language?” ↗
  • swartkrans · Sep 27, 2014 · Mentions

    …all, Go's parser only parses Go. You want to generate go files from something other than Go? Edit: Now that I've written and read what I've written I realized I was confused. Nevermind! I still prefer Flex and Bison over Lex and Yacc.

    on “Go generate” ↗
  • mr_toad · Nov 8, 2023 · Mentions

    Writing a compiler was part of the undergraduate compsci curriculum back where I did it. I still have vague memories of ancient tools like Flex and Bison (and I’m puzzled that the author seems to be hand-rolling code rather than use existing tooling).

    on “Writing a Compiler is Surprisingly Easy (part 1)” ↗
  • GrantMoyer · Jun 20, 2024 · Mentions

    …Compilers course I took. A table based state machine is literally the textbook algorithm for parsing these classes of languages, and implementing them has been almost entirely automated by tools like Flex and Bison since the 80s.

    on “Wc2: Investigates optimizing 'wc', the Unix word count program” ↗

Keyboard shortcuts

/
Focus search
j / k
Next / previous book
Enter
Open focused book
Esc
Close / go back
g h
Go to Home
g t
Go to Top all-time
g m
Go to Most recommended
g r
Go to Rising
g f
Go to For You
?
Show this help