Notes for the pal syntax transition diagrams.

Tokens

white space:
  newline carriage_return newpage space tab and // comments
  
simple tokens:
  { } [ ] ( ) any bracket shape is allowed provided they
              are properly matched.
  % * / + , & | ! = <= < >= > -> - ~= ~ : := : ^ ; $ .
  The following tokens are synonyms:
  -* ->, ** ^

Words:
  letter letters digit and underlines
  
  The following words are reserved:
    and aug def do dummy else
    false fn
    goto
    if ifnot ifso in jj
    let
    nil
    rec res sys test then valof where while within
    
  The following words are synonyms:
    eq =, ls <, gr >, ne ~=, le <=, ge >=,
    ll fn, logand &, not ~, or |

Numbers:
  A digit followed by digits, underlines and dots possibly followed
  by e or E with a possibly signed sequence of digits.
  Numbers may contain at most one dot and digits can be followed
  by underlines. Numbers are integers or reals depending on the
  presence of a dot or an exponent.

Strings:
  Strings are a sequence of zero or more stincg characters enclosed
  in single quotes ('). A string character is any character other
  than newline, newpage, an asterisk or a single quote. But the
  following escape character are allowed.
    ** for *, *' for ', *t for tab, *s for space,
    *n for newline, *p for newpage and *b for backspace.
    Upper and lower case letters are allowed in escape sequences.
    
  

Syntax diagrams

Prog
  one or more def BD followed by: in E0
  E0

BD
  N,..,N = E0
  N BV .. BV = E0
  { BD }
  [ BD ]
  ( BD )
  rec BD      Normally rec should not be nested

Dn
  BD followed by zero or more
      n<6 and BD0
      n<3 within D0

BV
  name
  ( zero or more names separated by commas )

Unlike pal70.b basic expression accept all monadic operators
without complaint and so BE does not need the argument n.
BC and Cn are now included in BE and En and so have been removed.

BE
  name
  true
  false
  nil
  string
  sys
  dummy
  int
  real
  { E0 }
  [ E0 ]
  ( E0 )
  $ E32
  + E32
  - E32
  ~ E32
  let D0 in E0
  fn followed by one or more BVs . E0
  valof E0
  test E0 followed by
       then E0 else E0
       ifso E0 ifnot E0
       ifnot E0 ifso E0
  while E0 do E0
  if E0 do E0
  goto E38
  res E14


En
  BE followed by zero or more
  
    nil        \
    true       |
    false      | These
    int        | are
    real       | all
    string     | function
    name       | calls
    { BE0 }    |
    [ BE0 ]    |
    ( BE0 )    /

    isname possibly followed by : BE
           The name will label the BE

    n<=36 % name E38
    n<=36 ^      E34
    n<=32 *      E34
    n<=32 /      E34
    n<=30 +      E32
    n<=30 -      E32
    n<=26 =      E30
    n<=26 <=     E30
    n<=26 <      E30 
    n<=26 ~=     E30
    n<=26 >=     E30
    n<=26 >      E30
    n<=22 &      E24
    n<=20 |      E22
    n<=18 ->     E18 ! E18
    n<=16 aug    E18
    n<=14 ,      E16
    n<= 6 ;      E6
    n<= 2 where  BD0

