3 ms·
I was toying around with a C++ parser in python (using the earley parser spark.py) a while back and it wasn't all that difficult, couple conflicts that can't be
by UncleEntity 8y ago
I was toying around with a C++ parser in python (using the earley parser spark.py) a while back and it wasn't all that difficult, couple conflicts that can't be solved without knowing the type of something in the lexer which can be sorted out in later stages (methinks?) and (IIRC from looking at the code) a shift/reduce conflict in declarator-id, but all in all I got it to pass all the tests I found from some advanced compiler course.
Never went past getting it into a AST because I tend to find some other shiny thing to play with before I finish things but I'd imagine the implementation language wouldn't be a serious impediment...saying as someone never having written a single line of Forth.
--edit--
C++11 I should say since C++14 added things like >> conflict between the shift operator and nested templates that I didn't even get around to trying to solve.