Simple parser using SuperPower, the parser combinator by Nicholas Blumhardt
Simple parser using Superpower, the parser combinator library by Nicholas Blumhardt
Hey! Would you like to create a parser? Then take a look to learn how to create a one for a simple language! :)
I have invented a very basic grammar just to learn. I have thought of an elevator that follows a list of instructions to go up, down and wait.
Example:
(UP 100),
(DOWN 200),
(DOWN 100),
(DOWN @1),
(UP @3),
(WAIT),
(UP 300)
As you see, it consists of a list of comma-separated verbs to move, for example, an elevator.