*** empty log message ***
1 parent 16ae4ab commit 1369708619444db8a1d8c28660d53df3e0bf01c1
@glproj03 glproj03 authored on 20 Nov 2005
Showing 1 changed file
View
67
sources/zweic/Tokens.py 0 → 100755
# (c) 2005 Andreas Jaggi, Michael Karlen
#
# GNU Public License http://opensource.org/licenses/gpl-license.php
 
import sys
import Enum
 
class Tokens (Enum.Enum):
EOF = "<eof>"
BAD = "<bad>"
 
IDENT = "ident"
NUMBER = "number"
STRING = "string"
 
TRUE = "true"
FALSE = "false"
THIS = "this"
NULLTYPE = "Null"
NULLFACTOR = "null"
 
READINT = "readInt"
READCHAR = "readChar"
PRINTINT = "printInt"
PRINTCHAR = "printChar"
 
VAL = "val"
INT = "Int"
DEF = "def"
SET = "set"
VAR = "var"
CLASS = "class"
NEW = "new"
EXTENDS = "extends"
 
SUB = "-"
NOT = "!"
ADD = "+"
MUL = "*"
MOD = "%"
DIV = "/"
EQ = "=="
NE = "!="
LT = "<"
GT = ">"
LE = "<="
GE = ">="
 
AND = "and"
OR = "or"
IF = "if"
ELSE = "else"
DO = "do"
WHILE = "while"
 
LPAREN = "("
RPAREN = ")"
LACCOLADE = "{"
RACCOLADE = "}"
EQUALS = "="
SEMICOLON = ";"
PERIOD = ","
DOT = "."
COLON = ":"