2 ms·
I was ready to shred your idea but then I tried out your parser. It's interesting, actually. But, the detail is where things get really challenging. Escape toke
by bdamm 8y ago
I was ready to shred your idea but then I tried out your parser. It's interesting, actually. But, the detail is where things get really challenging. Escape tokens tend to be pretty quirky, like <?= or ```. And C++'s template declaration operators, along with C's parameter type declarations, will be super challenging because there is grammar feedback into the tokenizer for 100% correct tokenizing. But in general I like your idea of a global standard for tokenizing, leading to a universal tokenizer. Full parsing is another story though. For a correct parse tree of C, you need to actually have feedback from the symbol table. And I suspect plenty of languages have one or two weird parsing tricks, so supporting it through all languages will end up being a major challenge. Good luck!