4 ms·
I say lex/yacc specifically because I am doing this in C, and I've learned that it's important to stick to tools thatare made to work together. I am unfamiliar
by stepvhen 10y ago
I say lex/yacc specifically because I am doing this in C, and I've learned that it's important to stick to tools thatare made to work together.
I am unfamiliar with File I/O and text processing in C overall, and so writing a parser by hand seems like more work than using BNF grammars that I am already pretty familiar with.
- dalke 10y agoANTLR3 emits a backend in C. http://www.antlr3.org/api/C/index.html http://www.antlr3.org/api/C/index.html . However, ANTLR4 does not. I have no experience with this backend. Another example is LEMON, developed and used for SQLite, at http://www.hwaci.com/sw/lemon/ http://www.hwaci.com/sw/lemon/ . It is only a parser. You can have a hand-written tokenizer, use lex, or an alternative like re2c or ragel. I have seen LEMON praised a few times on HN (https://news.ycombinator.com/item?id=10295087 https://news.ycombinator.com/item?id=10295087 ). I have no experience with it.