| Index: tools/lexer_generator/rule_lexer.py
|
| diff --git a/tools/lexer_generator/rule_lexer.py b/tools/lexer_generator/rule_lexer.py
|
| index 62df8139af21a112469c1cb5c89f9c8c638606e8..51744afb916ea52fd7f67eb393598e308d7f373e 100644
|
| --- a/tools/lexer_generator/rule_lexer.py
|
| +++ b/tools/lexer_generator/rule_lexer.py
|
| @@ -51,20 +51,10 @@ class RuleLexer:
|
| 'ACTION_OPEN',
|
| 'ACTION_CLOSE',
|
|
|
| - 'LEFT_BRACKET',
|
| - 'RIGHT_BRACKET',
|
| -
|
| - 'CODE_FRAGMENT',
|
| -
|
| 'COMMA',
|
| )
|
|
|
| - states = (
|
| - ('code','exclusive'),
|
| - )
|
| -
|
| t_ignore = " \t\n\r"
|
| - t_code_ignore = ""
|
|
|
| def t_COMMENT(self, t):
|
| r'\#.*[\n\r]+'
|
| @@ -103,23 +93,6 @@ class RuleLexer:
|
| self.nesting = 1
|
| return t
|
|
|
| - t_code_CODE_FRAGMENT = r'[^{}]+'
|
| -
|
| - def t_code_LEFT_BRACKET(self, t):
|
| - r'{'
|
| - self.nesting += 1
|
| - t.type = 'CODE_FRAGMENT'
|
| - return t
|
| -
|
| - def t_code_RIGHT_BRACKET(self, t):
|
| - r'}'
|
| - self.nesting -= 1
|
| - if self.nesting:
|
| - t.type = 'CODE_FRAGMENT'
|
| - else:
|
| - self.lexer.pop_state()
|
| - return t
|
| -
|
| def t_ANY_error(self, t):
|
| raise Exception("Illegal character '%s'" % t.value[0])
|
|
|
|
|