Computer Science Department
Programming Methods Laboratory

Compilation     winter 99/00
Ecole Polytechnique Federale de Lausanne
J0 Lexical Syntax

  ident         = letter { letter | digit }.
  number        = digit { digit }.
  string        = "\"" { stringchar } "\"".
where
  stringchar    = escapechar | plainchar.
  escapechar    = "\\" char.
  plainchar     = charNoQuote.
  char          = << any printable character >>.
  charNoQuote   = << any printable character except "\"" and "\\" >>.
  letter        = "a" | ... | "z" | "A" | ... | "Z" | "_".
  digit         = "0" | ... | "9".
Comments in a J0 program are written in the C++/Java-style; i.e. line comments starting with // and ending at the end of the line and comments enclosed in /* and */.