News for hackers. Stuff that matters.
Re:Compiler Construction by Niklaus Wirth [pdf] by hasbot on Friday January 31, 2020 @04:56PM (#22206269)
That's more hyperbole. You're putting a lot of responsibility on some simple tools. Programming language design complexity came first and not as a result of yacc or lex.
Re:Compiler Construction by Niklaus Wirth [pdf] by chrisseaton on Friday January 31, 2020 @05:00PM (#22206317)
> Programming language design complexity came first and not as a result of yacc or lex.

I'm really not sure where you got the impression I was blaming Yacc or Lex for the complexity of the languages - I think you've imagined that.

The situation we're in in practice is that our language grammars are complex and are context-sensitive. So why are we trying to use context-free tools? It's madness - we're trying to hammer a nail using a screwdriver.

Re:Compiler Construction by Niklaus Wirth [pdf] by hasbot on Friday January 31, 2020 @05:36PM (#22206631)
I got that impression from this sentence of yours:

> These tools are a great example of over-complicating and over-theorising programming languages.

If programming languages are over-complicated, it's not the fault of these tools.

> So why are we trying to use context-free tools?

I no longer keep up with compilers (or languages), but when I was, there was no other tools. Either go through the tedium and effort of hand-rolling a lexer/parser or munge the language grammar to fit.

Re:Compiler Construction by Niklaus Wirth [pdf] by chrisseaton on Friday January 31, 2020 @05:39PM (#22206653)
I see why you'd think that, but I meant over-complicating the implementation of languages, not their design.

> there was no other tools

I don't think you need tools. Just write your parser as a normal program directly in a general-purpose programming language. I'm not sure that parsing is so special as to require an external DSL.

Re:Compiler Construction by Niklaus Wirth [pdf] by hasbot on Friday January 31, 2020 @06:02PM (#22206857)
No tool is ever necessary. But not using yacc is tedious, slow, error-prone, uninteresting, and utterly no fun.