Lines Matching refs:TK
228 class TK(object): class
337 (TK.COMMENT, r'#[^\n]*'),
338 (TK.NEWLINE, r'[\r\n]'),
339 (TK.SPACE, r'[ \t]+'),
340 (TK.ESC_NEWLINE, r'\$[\r\n]'),
341 (TK.IDENT, r'[\w_.-]+'),
342 (TK.PIPE2, r'\|\|'),
343 (TK.PIPE, r'\|'),
344 (TK.COLON, r':'),
345 (TK.ASSIGN, r'='),
354 return Token(TK.EOF, self._line, self._line_pos + 1, '')
363 if ((kind == TK.SPACE and not self._line_start) or
364 (kind == TK.ESC_NEWLINE) or
365 (kind == TK.COMMENT)):
381 self._line_start = token.kind == TK.NEWLINE
470 return self._lex_string_or_path(self._PATH_TOKEN_MATCHER, TK.PATH)
474 return self._lex_string_or_path(self._STR_TOKEN_MATCHER, TK.STRING)
588 if token.kind == TK.EOF:
590 elif token.kind == TK.NEWLINE:
592 elif token.kind == TK.IDENT:
621 elif token.kind != TK.IDENT:
635 key = self._lexer.lex_match({TK.IDENT}).value
636 self._lexer.lex_match({TK.ASSIGN})
639 self._lexer.lex_match({TK.NEWLINE, TK.EOF})
665 if not token or token.kind != TK.SPACE:
683 token = self._lexer.lex_match({TK.IDENT})
689 explicit_outs = self._parse_path_list({TK.PIPE, TK.COLON})
693 if token.kind == TK.PIPE:
695 implicit_outs = self._parse_path_list({TK.COLON})
699 self._lexer.lex_match({TK.COLON})
702 build.rule = self._lexer.lex_match({TK.IDENT}).value
712 {TK.PIPE, TK.PIPE2, TK.NEWLINE, TK.EOF})
716 if token.kind == TK.PIPE:
718 implicit_ins = self._parse_path_list({TK.PIPE2, TK.NEWLINE, TK.EOF})
724 if token.kind == TK.PIPE2:
726 prerequisites = self._parse_path_list({TK.NEWLINE, TK.EOF})
730 self._lexer.lex_match({TK.NEWLINE, TK.EOF})
763 token = self._lexer.lex_match({TK.IDENT})
767 rule.name = self._lexer.lex_match({TK.IDENT}).value
768 self._lexer.lex_match({TK.NEWLINE, TK.EOF})
782 token = self._lexer.lex_match({TK.IDENT})
786 outs = self._parse_path_list({TK.NEWLINE, TK.EOF})
789 self._lexer.lex_match({TK.NEWLINE, TK.EOF})
802 token = self._lexer.lex_match({TK.IDENT})
808 assert token.kind == TK.IDENT
811 self._lexer.lex_match({TK.NEWLINE, TK.EOF})
826 token = self._lexer.lex_match({TK.IDENT})
832 self._lexer.lex_match({TK.NEWLINE, TK.EOF})