From the hub, tagged: "lexing"

How to write a compiler or interpreter in Prolog

This post is external to PrologHub

An example of using Prolog's definite clause grammar to write a compiler for a Pascal-like programing language. The example is taken from the open access textbook: "The Art of Prolog".