HP-42S Compiler for Niklaus Wirth's PL/0 Language
|
02-18-2024, 02:59 PM
Post: #7
|
|||
|
|||
RE: HP-42S Compiler for Niklaus Wirth's PL/0 Language
(02-18-2024 11:42 AM)floppy Wrote: prolog. Thanks for sharing. I like these kind of projects very much, that are a little different than the usual PL projects. Here's a lazy functional language interpreter written in Prolog: Husky (disclaimer: which I wrote in the 90s). On the topic of Lisp: a lua-to-lisp transpiler with the transpiler written in lex and yacc (actually, RE/flex and Bison, but that's just about the same). RE/flex does a lot more than lex (and flex) though, to make lexical analysis easier to specify and implement in C++. Pick what you like:
Deterministic context-free LR(1) (LALR) grammars are far more common than LL. LL requires a rewrite to remove left recursion and also to explicitly deal with (or remove) ambiguity. PEGs originate from LL parsing (i.e. top down) but take a different approach to resolve some issues with LL. The list of tools and choices is extensive and covers a wide range of PL to implement a parser. A hand-written R-D parser for a tiny PL is fun and nice to implement too, especially if the grammar is already defined as a R-D grammar (LL, top down) and was tested, so you're not getting stuck in a long rinse-repeat cycle of testing and tweaking the grammar/parser. It is often a good choice to implement parsing on embedded devices and yesteryears 8-bit systems. - Rob "I count on old friends to remain rational" |
|||
« 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: 2 Guest(s)