@top T { (Word | Number | Operator)+ }

@skip { whitespace }

@tokens {
  whitespace { @whitespace+ }

  Word { @asciiLetter (letter | @digit)* }

  Number { (@digit+ ("." @digit*)? | "." @digit+) (("e" | "E") ("+" | "-")? @digit+)? }

  Operator { "+" "+"? | "-" }

  letter { $[a-zA-Z] }
}

# Word tokens

Hello		Catch22 Foo
azAZ09

==> T(Word,Word,Word,Word)

# Numbers and operators

50 + 200e-5 ++ .2 - 111.111e+111

==> T(Number,Operator,Number,Operator,Number,Operator,Number)
