Re: [dev] lex and yacc

From: <>
Date: Mon, 1 Apr 2019 16:29:19 +0000

On Sun, Mar 31, 2019 at 10:45:04PM -0700, Louis Santillan wrote:
> There's options. Have you tried Lemon Parser [0] or miniyacc + qbe
> [1][2]? ucpp [3] lexes/parses C-like languages with C pre-processing.
> re2c [4] is a great lexer. Crockford prefers Pratt's Top-Down
> Operator Precedence [5][6] and his webpage source repo even includes a
> nifty lexer that is easy to translate from JS to C [7].
> HTH,
> [0]
> [1]
> [2]
> [3]
> [4]
> [5]
> [6]
> [7]

As I said earlier: yacc and lex are overkill. Moreover, like Markus pointed
out, I do get the flexibility to go hardcore on error reporting, if it needs to
be (namely I leave the door open for such fine grained error reporting). *AND*
the code is damn simple and easy to understand: it's very easy to keep a full
mental picture of what's happening.

That said, your list has valuable ressource since the gcc C preprocessor is now
c++ garbage. It opens the door at mitigating the wintel grade mistakes done by the
"gcc steering committee" (the guys with the admin rights on the only one
official gcc repo). Replacing the gcc C preprocessor will kill gcc error
reporting though, and I am not optimistic on gcc CPP->C protocol being not a
massive brain f*ckage.

And JS is useless by itself: the really hardcore part is the dynamic DOM behind.
That's why the "web" is now equal to "chrome", even microsoft trash with their
billions of dollars were not able to code an alternative dynamic DOM engine
(they only got their hands on w3c html specs...). Only one way to go, noscript
with basic (x)html.

Received on Mon Apr 01 2019 - 18:29:19 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 01 2019 - 18:48:07 CEST