Home
last modified time | relevance | path

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

/development/vndk/tools/sourcedr/sourcedr/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/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/sourcedr/blueprint/
Dblueprint.py558 def __init__(self, lexer, message): argument
563 Lexer.compute_line_column(lexer.buf, lexer.start)
575 def __init__(self, lexer, inherited_env=None): argument
577 self.lexer = lexer
586 lexer = self.lexer
587 while lexer.token != Token.EOF:
588 if lexer.token == Token.IDENT:
590 if lexer.token in {Token.ASSIGN, Token.ASSIGNPLUS}:
591 self.parse_assign(ident, lexer.token)
592 elif lexer.token in {Token.LBRACE, Token.LPAREN}:
[all …]
/development/vndk/tools/sourcedr/sourcedr/
Dninja.py529 def _push_context(self, lexer, env): argument
538 self._lexer = lexer