Parameter Make.Lang

Basic Definitions for a Language

val whitespace_chars : string

Set of whitespace characters. A sequence of zero or more whitespace characters is stripped off after each token.

Usually the set of whitespace characters is " \t\n\r" i.e. blanks, tabs, newline and carriage return are whitespace characters.

val multiline_comment : (string * string * bool) option

multiline_start, multiline_end, nested

Optional definition of a multiline comment.

Precondition: The start and end of a multiline comment must not be empty.

val line_comment : string option

Optional start of a line comment. The comment spans to the end of the line.

Precondition: The start of a line comment must not be empty.

val identifier_start : char -> bool

Legal characters to start an identifer.

val identifier_inner : char -> bool

Legal characters in an identifer after the start character.

val reserved_names : string list

List of identifiers which are treated as reserved names (aka keywords).