List, Str, Mat tokens
This commit is contained in:
parent
30c2d0e6d4
commit
a4683c3f72
7
lexer.py
7
lexer.py
|
@ -19,6 +19,9 @@ reserved = {
|
|||
'Not': 'NOT',
|
||||
'And': 'And',
|
||||
'Or': 'OR',
|
||||
'List': 'LIST',
|
||||
'Mat': 'MAT',
|
||||
'Str': 'STR',
|
||||
}
|
||||
|
||||
literals = '+-*/%(){}[]=,'
|
||||
|
@ -41,10 +44,10 @@ t_ISEQUAL = r'=='
|
|||
t_PLUSASSIGN = r'\+='
|
||||
t_MINUSASSIGN = r'\-='
|
||||
t_TIMESASSIGN = r'\*='
|
||||
t_DIVASSIGN = r'\/='
|
||||
t_DIVASSIGN = r'/='
|
||||
t_MODASSIGN = r'\%='
|
||||
# Comments
|
||||
t_ignore_COMMENT = r'\//.*'
|
||||
t_ignore_COMMENT = r'//.*'
|
||||
|
||||
# A regex rule with some action code
|
||||
def t_NUMBER(t):
|
||||
|
|
Loading…
Reference in New Issue