Skip to content

Commit

Permalink
Cleaned up tokRules removing commented out code and newlines.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarah Tattersall committed Nov 20, 2011
1 parent 9e07e94 commit f0d0a7e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions tokRules.py
Expand Up @@ -39,18 +39,16 @@
t_MINUS = r'-'
t_MULTIPLY = r'\*'
t_DIVIDE = r'/'
#t_SEP_COMMA = r'\,'
#t_SEP_PERIOD = r'\.'
t_B_AND = r'\&'
t_B_OR = r'\|'
t_B_XOR = r'\^'
t_B_NOT = r'\~'
t_MOD = r'%'
t_LETTER = r'\'[a-zA-Z]\''

tokens += list(reserved.values())
tokens.extend(reserved.values())

# A string containing ignored characters (spaces and tabs)
# A string containing ignored characters.
t_ignore = ' \t\r'

# A regular expression rule with some action code
Expand All @@ -69,7 +67,6 @@ def t_SEP_PERIOD(t):
t.lexer.clauseno += 1
return t


def t_SEP_AND(t):
r'and$'
t.lexer.clauseno += 1
Expand Down Expand Up @@ -104,5 +101,3 @@ def t_ID(t):
def t_TOO(t):
r'\too'
pass


0 comments on commit f0d0a7e

Please sign in to comment.