Added all token names
This commit is contained in:
parent
fc1cff2d31
commit
5be6fab3b4
3 changed files with 53 additions and 5 deletions
|
|
@ -1,2 +1,44 @@
|
|||
import ply.lex as lex
|
||||
import ply.yacc as yacc
|
||||
import ply.yacc as yacc
|
||||
|
||||
tokens = [
|
||||
'program',
|
||||
'id',
|
||||
'end',
|
||||
'doubleColon',
|
||||
'coma',
|
||||
'integer',
|
||||
'real',
|
||||
'openBra',
|
||||
'closedBra',
|
||||
'int',
|
||||
'rea',
|
||||
'subroutine',
|
||||
'parens',
|
||||
'openParen',
|
||||
'closedParen',
|
||||
'read',
|
||||
'print',
|
||||
'if',
|
||||
'then',
|
||||
'else',
|
||||
'elif',
|
||||
'do',
|
||||
'swap',
|
||||
'exit',
|
||||
'string',
|
||||
'plus',
|
||||
'minus',
|
||||
'mul',
|
||||
'div',
|
||||
'or',
|
||||
'and',
|
||||
'not',
|
||||
'equals',
|
||||
'doubleEquals',
|
||||
'notEquals',
|
||||
'less',
|
||||
'more',
|
||||
'lessEquals',
|
||||
'moreEquals',
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue