Skip to content

Lexical

Identifiers

Identifiers used as names of constructors and transformations have the form

ID = [a-zA-Z][a-zA-Z0-9\-\_]*

In particular, hyphens can be part of identifiers.

Identifiers cannot be followed by identifiers or keywords without intervening whitespace.

Reserved Words

Todo

provide list of reserved words

Module Names

Module names can be sequences of identifiers separated by /.

Integers

INT = [0-9]+

Check

syntax of integers

Whitespace

Spaces, tabs, and newlines are whitespace and can occur between any two tokens.

Comments

Comments follow the C/Java tradition. That is, the language supports single line comments after //

// a single line comment

and multi-line comments between /* and */

/*
  a multi-line comment
  can be spread over multiple
  lines
 */

Comments can occur anywhere.

Multi-line comments cannot be nested currently.

Todo

but this should be changed so that multi-line comments can be nested


Last update: April 19, 2024
Created: April 19, 2024