HP-42S Compiler for Niklaus Wirth's PL/0 Language
|
02-17-2024, 05:02 PM
Post: #3
|
|||
|
|||
RE: HP-42S Compiler for Niklaus Wirth's PL/0 Language
(02-17-2024 10:41 AM)Thomas Klemm Wrote: In his talk "Reinventing the Parser Generator" David Beazley explains his ply project that is used here: That was fun to watch Especially the part where he said he hopes the ply project dies... "Reinventing the Parser Generator" is a big stretch IMO. More like "Implementing Lex and Yacc in Python and how to Mess it Up" Seriously. Ply doesn't even warn when token regex patterns are subsumed, only for us to find out the tokenizer we wrote does not work? Hacking around a way to define a "PRINT" token to not match ID is pure evil. And what about LALR conflicts? Yacc and Bison not only warn, but also output annotated LALR states (dot rules) that help identify the problem to correct. Ambiguous grammars lead to all sorts of nasty problems. Disingenuous to disparage the Dragon book. It's all there and better. Don't teach students tools to use. Teach them how to write them and write them well by teaching the beauty of the underlying algebraic structures and corresponding algorithms. Then use tools, because you don't have to reinvent them. Unless you can significantly improve them (good luck). - Rob "I count on old friends" -- HP 71B,Prime|Ti VOY200,Nspire CXII CAS|Casio fx-CG50...|Sharp PC-G850,E500,2500,1500,14xx,13xx,12xx... |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
HP-42S Compiler for Niklaus Wirth's PL/0 Language - Thomas Klemm - 01-14-2024, 04:01 PM
RE: HP-42S Compiler for Niklaus Wirth's PL/0 Language - Thomas Klemm - 02-17-2024, 10:41 AM
RE: HP-42S Compiler for Niklaus Wirth's PL/0 Language - robve - 02-17-2024 05:02 PM
RE: HP-42S Compiler for Niklaus Wirth's PL/0 Language - Thomas Klemm - 02-18-2024, 09:32 AM
RE: HP-42S Compiler for Niklaus Wirth's PL/0 Language - floppy - 02-18-2024, 11:42 AM
RE: HP-42S Compiler for Niklaus Wirth's PL/0 Language - robve - 02-18-2024, 02:59 PM
RE: HP-42S Compiler for Niklaus Wirth's PL/0 Language - brouhaha - 02-21-2024, 12:35 PM
RE: HP-42S Compiler for Niklaus Wirth's PL/0 Language - BruceH - 02-18-2024, 12:45 PM
|
User(s) browsing this thread: 1 Guest(s)