asdlGen Reference Manual : Input Syntax : Lexical Tokens
Previous: Input Syntax
Next: Module Syntax

3.1. Lexical Tokens


upper = "A" | ... | "Z"
lower = "a" | ... | "z"
alpha = "_" | upper | lower
alpha-num = alpha | "0"| ... | "9"
typ-id = lower {alpha-num}
con-id = upper {alpha-num}
id = typ-id | con-id

Notice that identifiers for types, typ-id, are in a different lexical class from identifiers for constructors con-id. Constructor identifiers must start with one uppercase letter, while type identifiers must begin with one lowercase letter. All identifiers must begin with a letter. Comments (not show in the above syntax) begin with "--" and continue to the end of the line.


asdlGen Reference Manual : Input Syntax : Lexical Tokens
Previous: Input Syntax
Next: Module Syntax