Parser

Revision as of 17:29, 17 February 2023 by Lynn (talk | contribs) (Delta)

Toaq's grammar can be parsed by humans and computers alike. A piece of software that turns Toaq text into a syntax tree is called a parser.

Grammar formats

It's popular to write parsers in PEG format. In practice, PEG parser generators disagree on the specifics of the .peg format, meaning a PEG grammar tends to be tied to a specific implementation (say, PEGjs).

Hoemaı thinks PEG is not a good fit for Toaq. In fact, PEG can only describe context-free languages, which Toaq is not. See their blog post Logical Language Misconceptions for more information.

Parsers

There is currently no parser for Toaq text, mostly because we set the bar very high for what counts as a parser. Kuna is a WIP parser for Toaq Delta.

Outdated parsers can be found for Toaq Gamma here, and for Toaq Beta here and here. Hoemaı wrote an early version of Toaq grammar in Prolog.