Home
last modified time | relevance | path

Searched refs:lexer (Results 1 – 5 of 5) sorted by relevance

/development/vndk/tools/sourcedr/ninja/tests/
Dtest_ninja.py20 def _push_context(self, lexer, env): argument
21 super(MockedParser, self)._push_context(lexer, env)
137 lexer = ninja.Lexer(['#comment'])
138 tok = lexer.peek()
142 lexer = ninja.Lexer(['#comment\n'])
143 tok = lexer.peek()
146 lexer = ninja.Lexer([' #comment\n'])
147 tok = lexer.peek()
150 lexer = ninja.Lexer(['\t#comment\n'])
151 tok = lexer.peek()
[all …]
/development/vndk/tools/sourcedr/blueprint/tests/
Dtest_parser.py72 lexer = Lexer('a = "example"')
74 parser = Parser(lexer)
81 lexer = Lexer('a = []')
83 parser = Parser(lexer)
90 lexer = Lexer('a = ["x"]')
92 parser = Parser(lexer)
99 lexer = Lexer('a = ["x",]')
101 parser = Parser(lexer)
108 lexer = Lexer('a = ["x", "y"]')
110 parser = Parser(lexer)
[all …]
Dtest_lexer.py555 lexer = Lexer('a b //a\n "c"', 0)
557 self.assertEqual(lexer.start, 0)
558 self.assertEqual(lexer.end, 1)
559 self.assertEqual(lexer.token, Token.IDENT)
560 self.assertEqual(lexer.literal, 'a')
561 lexer.consume(Token.IDENT)
563 self.assertEqual(lexer.start, 2)
564 self.assertEqual(lexer.end, 3)
565 self.assertEqual(lexer.token, Token.IDENT)
566 self.assertEqual(lexer.literal, 'b')
[all …]
/development/vndk/tools/sourcedr/blueprint/
Dblueprint.py559 def __init__(self, lexer, message): argument
564 Lexer.compute_line_column(lexer.buf, lexer.start)
576 def __init__(self, lexer, inherited_env=None): argument
578 self.lexer = lexer
587 lexer = self.lexer
588 while lexer.token != Token.EOF:
589 if lexer.token == Token.IDENT:
591 if lexer.token in {Token.ASSIGN, Token.ASSIGNPLUS}:
592 self.parse_assign(ident, lexer.token)
593 elif lexer.token in {Token.LBRACE, Token.LPAREN}:
[all …]
/development/vndk/tools/sourcedr/ninja/
Dninja.py526 def _push_context(self, lexer, env): argument
535 self._lexer = lexer