NAME ^

lua.pg - a Lua 5.1 grammar in PGE

DESCRIPTION ^

GRAMMAR RULES ^

The grammar rules are according to the original Lua parser as defined lparser.c in the lua distribution.

EXPRESSIONS ^

Operator precedence is implemented using an optable.

HELPER RULES ^

Helper rules will match a specific token, otherwise a syntax error is generated. These rules make the grammar more readable, so the calls to syntax_error() are not all over the grammar, but only in these rules.

Strings

A string can be either a single-quoted, double-quoted or a long string. Long strings are parsed using a custom parsing method.

AUTHORS ^

Klaas-Jan Stol <parrotcode@gmail.com>


parrot