| Index: tools/lexer_generator/rule_parser_test.py
|
| diff --git a/tools/lexer_generator/rule_parser_test.py b/tools/lexer_generator/rule_parser_test.py
|
| index 4af19e183ad5213f7751c22dac58ba7e6899f719..bdf6bb1a8fa431a64f7c3e1480964a648f11bf4f 100644
|
| --- a/tools/lexer_generator/rule_parser_test.py
|
| +++ b/tools/lexer_generator/rule_parser_test.py
|
| @@ -43,10 +43,10 @@ class RuleParserTestCase(unittest.TestCase):
|
| alias = /regex/;
|
| <<cond1>> /regex/ <||cond2>
|
| <<cond1>> alias <||cond2>
|
| -<<cond2>> /regex/ <|{body}|>
|
| -<<cond2>> alias <|{body}|>
|
| -<<cond3>> /regex/ <{body}||>
|
| -<<cond3>> alias <{body}||>''')
|
| +<<cond2>> /regex/ <|body|>
|
| +<<cond2>> alias <|body|>
|
| +<<cond3>> /regex/ <body||>
|
| +<<cond3>> alias <body||>''')
|
|
|
| self.assertTrue(len(self.state.aliases), 1)
|
| self.assertTrue('alias' in self.state.aliases)
|
| @@ -74,8 +74,8 @@ alias = /regex/;
|
| def test_more_complicated(self):
|
| self.parse('''
|
| alias = "regex;with;semicolon";
|
| -<<cond1>> "regex3}with}braces}" <|{body {with} braces }|>
|
| -<<cond1>> "regex4{with{braces}" <{body {with} braces }||>''')
|
| +<<cond1>> "regex3}with}braces}" <|body|>
|
| +<<cond1>> "regex4{with{braces}" <body||>''')
|
|
|
| self.assertEquals(self.state.aliases['alias'],
|
| RegexParser.parse("regex;with;semicolon"))
|
| @@ -85,15 +85,3 @@ alias = "regex;with;semicolon";
|
| # self.assertEquals(
|
| # self.parse['cond1']['regex4{with{braces}'],
|
| # ('body', 'body {with} braces }'))
|
| -
|
| - def test_body_with_if(self):
|
| - self.parse('<<cond>> "regex" <|{ if (foo) { bar } }|>')
|
| - # self.assertEquals(
|
| - # self.parse['cond']['regex'],
|
| - # ('body', 'if (foo) { bar }'))
|
| -
|
| - def test_regexp_with_count(self):
|
| - self.parse('<<cond>> /regex{1,3}/ <|{ if (foo) { bar } }|>')
|
| - # self.assertEquals(
|
| - # self.parse['cond']['regex{1,3}'],
|
| - # ('body', 'if (foo) { bar }'))
|
|
|