News for hackers. Stuff that matters.
Re:Compiler Construction by Niklaus Wirth [pdf] by chrisseaton on Friday January 31, 2020 @04:46PM (#22206149)
> They force you to write a declarative grammar which a human can understand.

The problem is many languages' grammars are not declarative. They're full of completely uncontrolled side effects. So why are we trying to use a declarative tool for them? It's the wrong tool for the job.

Re:Compiler Construction by Niklaus Wirth [pdf] by judofyr on Friday January 31, 2020 @05:08PM (#22206391)
> It's the wrong tool for the job.

Yes! We should have both handwritten parsers and parser generators in our toolkit and then depending on the language we want to parse we should choose the best tool for the job.

My point about a declarative grammar was more that if the language permits it (e.g. is simple enough for Bison), it's so valuable to have a declarative grammar which serves as both specification and parser. It will be way less bug-prone than any handwritten parser. (From my experience handwritten parsers tends to have both weird crashes and unexpected handling of edge cases. But maybe I just suck at programming?)

I've seen people using Bison on one complicated languages, given up, and then they bring the negative bias to other languages they want to parse — even when the other languages are very simple.

Re:Compiler Construction by Niklaus Wirth [pdf] by hasbot on Friday January 31, 2020 @04:59PM (#22206307)
How is that relevant to this thread in which I am saying that the parsing/lexing as described in the link is very outdated? Maybe you should start a separate discussion.
Re:Compiler Construction by Niklaus Wirth [pdf] by chrisseaton on Friday January 31, 2020 @05:01PM (#22206329)
> Maybe you should start a separate discussion.

I started this one!