psil

Grammar

This document describes Psil’s grammar in a somewhat formal way, which roughly follows EBNF.

The actual parser may do something slightly different (but equivalent) than this, based on convenience.

The Grammar

Tokens

Above, all words/characters in bold are token literals, while all words in italics are “specially defined tokens”:

Comments

Not specified in the formal grammar is Psil’s “comments”. Currently, only single-line comments are supported, which start with ;, and are terminated with the new line character.

; This is an example of a comment