Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 1.28 KB

readme.md

File metadata and controls

23 lines (18 loc) · 1.28 KB

ZenScript.antlr

… is a formal (?), unofficial syntax definition of ZenScript written in Antlr4.

Currently, ZenScript.antlr is targeting CraftTweaker/ZenScript@b88317d.

Motivation

There has been some in-depth documentation about the actual syntax of ZenScript, such as the list of all tokens and the list of all operators. However, it is not sufficient to describe the correct syntax of ZenScript.
Oftentimes, syntax error such as missing a semi-colon or dangling bracket can even trick the ZenScript compiler to produce malformed byte-code due to some reasons. A formalized syntax of ZenScript will enable us to statically analyze any given ZenScript files so that these rather obvious error may be eliminated as soon as possible.
Sadly, there has not been any full documentation about the entire ZenScript syntax, which drives me to dig into the initial ZenScript implementation to extract it out.