OmniSciDB
a5dc49c757
|
Public Member Functions | |
def | __init__ |
def | tokens |
def | is_at_end |
def | current_token |
def | advance |
def | expect |
def | consume |
def | current_pos |
def | raise_parser_error |
def | match |
def | lookahead |
def | parse_udtf |
def | parse_args |
def | parse_arg |
def | parse_type |
def | parse_composed |
def | parse_primitive |
def | parse_templates |
def | parse_template |
def | parse_annotation |
def | parse_identifier |
def | parse_string |
def | parse_number |
def | parse_boolean |
def | parse |
Public Attributes | |
line | |
Private Attributes | |
_tokens | |
_curr | |
Definition at line 255 of file TableFunctionsFactory_parser.py.
def TableFunctionsFactory_parser.Parser.__init__ | ( | self, | |
line | |||
) |
Definition at line 256 of file TableFunctionsFactory_parser.py.
def TableFunctionsFactory_parser.Parser.advance | ( | self | ) |
Definition at line 271 of file TableFunctionsFactory_parser.py.
References TableFunctionsFactory_parser.Parser._curr.
Referenced by TableFunctionsFactory_parser.Parser.consume(), and TableFunctionsFactory_parser.Parser.expect().
def TableFunctionsFactory_parser.Parser.consume | ( | self, | |
expected_type | |||
) |
consumes the current token iff its type matches the expected_type. Otherwise, an error is raised
Definition at line 285 of file TableFunctionsFactory_parser.py.
References TableFunctionsFactory_parser.Tokenize._tokens, TableFunctionsFactory_parser.Parser._tokens, TableFunctionsFactory_parser.Tokenize.advance(), TableFunctionsFactory_parser.Parser.advance(), anonymous_namespace{RelAlgDag.cpp}::RANodeIterator.advance(), TableFunctionsFactory_parser.Tokenize.current_token(), TableFunctionsFactory_parser.Parser.current_token(), and TableFunctionsFactory_parser.Parser.raise_parser_error().
Referenced by TableFunctionsFactory_parser.Parser.parse_annotation(), TableFunctionsFactory_parser.Parser.parse_arg(), TableFunctionsFactory_parser.Parser.parse_args(), TableFunctionsFactory_parser.Parser.parse_boolean(), TableFunctionsFactory_parser.Parser.parse_composed(), TableFunctionsFactory_parser.Parser.parse_identifier(), TableFunctionsFactory_parser.Parser.parse_number(), TableFunctionsFactory_parser.Parser.parse_string(), TableFunctionsFactory_parser.Parser.parse_template(), TableFunctionsFactory_parser.Parser.parse_templates(), and TableFunctionsFactory_parser.Parser.parse_udtf().
def TableFunctionsFactory_parser.Parser.current_pos | ( | self | ) |
Definition at line 301 of file TableFunctionsFactory_parser.py.
References TableFunctionsFactory_parser.Parser._curr.
Referenced by TableFunctionsFactory_parser.Parser.raise_parser_error().
def TableFunctionsFactory_parser.Parser.current_token | ( | self | ) |
Definition at line 268 of file TableFunctionsFactory_parser.py.
References TableFunctionsFactory_parser.Parser._curr, TableFunctionsFactory_parser.Tokenize._tokens, and TableFunctionsFactory_parser.Parser._tokens.
Referenced by TableFunctionsFactory_parser.Parser.consume(), TableFunctionsFactory_parser.Parser.expect(), TableFunctionsFactory_parser.Parser.match(), TableFunctionsFactory_parser.Parser.parse_annotation(), and TableFunctionsFactory_parser.Parser.raise_parser_error().
def TableFunctionsFactory_parser.Parser.expect | ( | self, | |
expected_type | |||
) |
Definition at line 274 of file TableFunctionsFactory_parser.py.
References TableFunctionsFactory_parser.Parser._curr, TableFunctionsFactory_parser.Tokenize._tokens, TableFunctionsFactory_parser.Parser._tokens, TableFunctionsFactory_parser.Tokenize.advance(), TableFunctionsFactory_parser.Parser.advance(), anonymous_namespace{RelAlgDag.cpp}::RANodeIterator.advance(), TableFunctionsFactory_parser.Tokenize.current_token(), and TableFunctionsFactory_parser.Parser.current_token().
Referenced by TableFunctionsFactory_parser.Parser.parse_udtf().
def TableFunctionsFactory_parser.Parser.is_at_end | ( | self | ) |
Definition at line 265 of file TableFunctionsFactory_parser.py.
References TableFunctionsFactory_parser.Parser._curr, TableFunctionsFactory_parser.Tokenize._tokens, and TableFunctionsFactory_parser.Parser._tokens.
Referenced by TableFunctionsFactory_parser.Parser.parse_annotation(), TableFunctionsFactory_parser.Parser.parse_arg(), TableFunctionsFactory_parser.Parser.parse_args(), TableFunctionsFactory_parser.Parser.parse_templates(), TableFunctionsFactory_parser.Parser.parse_type(), and TableFunctionsFactory_parser.Parser.parse_udtf().
def TableFunctionsFactory_parser.Parser.lookahead | ( | self | ) |
Definition at line 320 of file TableFunctionsFactory_parser.py.
References TableFunctionsFactory_parser.Parser._curr, TableFunctionsFactory_parser.Tokenize._tokens, and TableFunctionsFactory_parser.Parser._tokens.
Referenced by TableFunctionsFactory_parser.Parser.parse_arg().
def TableFunctionsFactory_parser.Parser.match | ( | self, | |
expected_type | |||
) |
Definition at line 316 of file TableFunctionsFactory_parser.py.
References TableFunctionsFactory_parser.Tokenize.current_token(), and TableFunctionsFactory_parser.Parser.current_token().
Referenced by TableFunctionsFactory_parser.Parser.parse_annotation(), TableFunctionsFactory_parser.Parser.parse_arg(), TableFunctionsFactory_parser.Parser.parse_args(), TableFunctionsFactory_parser.Parser.parse_composed(), TableFunctionsFactory_parser.Parser.parse_primitive(), TableFunctionsFactory_parser.Parser.parse_template(), TableFunctionsFactory_parser.Parser.parse_templates(), TableFunctionsFactory_parser.Parser.parse_type(), and TableFunctionsFactory_parser.Parser.parse_udtf().
def TableFunctionsFactory_parser.Parser.parse | ( | self | ) |
fmt: off udtf: IDENTIFIER "(" (args)? ")" ("|" annotation)* "->" args ("," templates)? ("|" "output_row_size" "=" primitive)? args: arg ("," arg)* arg: type IDENTIFIER? ("|" annotation)* type: composed | primitive composed: "Cursor" "<" arg ("," arg)* ">" | IDENTIFIER "<" type ("," type)* ">" primitive: IDENTIFIER | NUMBER | STRING | BOOLEAN annotation: IDENTIFIER "=" IDENTIFIER ("<" NUMBER ("," NUMBER) ">")? | IDENTIFIER "=" "[" PRIMITIVE? ("," PRIMITIVE)* "]" | "require" "=" STRING | "default" "=" STRING | NUMBER | BOOLEAN templates: template ("," template) template: IDENTIFIER "=" "[" IDENTIFIER ("," IDENTIFIER)* "]" IDENTIFIER: [A-Za-z_][A-Za-z0-9_]* NUMBER: [0-9]+ STRING: \".*?\" BOOLEAN: \bTrue\b|\bFalse\b fmt: on
Definition at line 613 of file TableFunctionsFactory_parser.py.
References TableFunctionsFactory_parser.Parser._curr, and TableFunctionsFactory_parser.Parser.parse_udtf().
def TableFunctionsFactory_parser.Parser.parse_annotation | ( | self | ) |
fmt: off annotation: IDENTIFIER "=" IDENTIFIER ("<" NUMBER ("," NUMBER) ">")? | IDENTIFIER "=" "[" PRIMITIVE? ("," PRIMITIVE)* "]" | "require" "=" STRING | "default" "=" STRING | NUMBER | BOOLEAN fmt: on
Definition at line 514 of file TableFunctionsFactory_parser.py.
References TableFunctionsFactory_parser.Parser.consume(), TableFunctionsFactory_parser.Tokenize.current_token(), TableFunctionsFactory_parser.Parser.current_token(), TableFunctionsFactory_parser.Tokenize.is_at_end(), TableFunctionsFactory_parser.Parser.is_at_end(), TableFunctionsFactory_parser.Parser.match(), TableFunctionsFactory_parser.Parser.parse_boolean(), TableFunctionsFactory_parser.Parser.parse_identifier(), TableFunctionsFactory_parser.Parser.parse_number(), TableFunctionsFactory_parser.Parser.parse_primitive(), TableFunctionsFactory_parser.Parser.parse_string(), and TableFunctionsFactory_parser.Parser.raise_parser_error().
Referenced by TableFunctionsFactory_parser.Parser.parse_arg(), and TableFunctionsFactory_parser.Parser.parse_udtf().
def TableFunctionsFactory_parser.Parser.parse_arg | ( | self | ) |
fmt: off arg: type IDENTIFIER? ("|" annotation)* fmt: on
Definition at line 393 of file TableFunctionsFactory_parser.py.
References TableFunctionsFactory_parser.Parser.consume(), TableFunctionsFactory_parser.Tokenize.is_at_end(), TableFunctionsFactory_parser.Parser.is_at_end(), TableFunctionsFactory_parser.Tokenize.lookahead(), TableFunctionsFactory_parser.Parser.lookahead(), TableFunctionsFactory_parser.Parser.match(), TableFunctionsFactory_parser.Parser.parse_annotation(), TableFunctionsFactory_parser.Parser.parse_identifier(), and TableFunctionsFactory_parser.Parser.parse_type().
Referenced by TableFunctionsFactory_parser.Parser.parse_args(), and TableFunctionsFactory_parser.Parser.parse_composed().
def TableFunctionsFactory_parser.Parser.parse_args | ( | self | ) |
fmt: off args: arg IDENTIFIER ("," arg)* fmt: on
Definition at line 371 of file TableFunctionsFactory_parser.py.
References TableFunctionsFactory_parser.Parser._curr, TableFunctionsFactory_parser.Parser.consume(), TableFunctionsFactory_parser.Tokenize.is_at_end(), TableFunctionsFactory_parser.Parser.is_at_end(), TableFunctionsFactory_parser.Parser.match(), TableFunctionsFactory_parser.Parser.parse_arg(), and TableFunctionsFactory_parser.Parser.parse_type().
Referenced by TableFunctionsFactory_parser.Parser.parse_udtf().
def TableFunctionsFactory_parser.Parser.parse_boolean | ( | self | ) |
fmt: off BOOLEAN: \bTrue\b|\bFalse\b fmt: on
Definition at line 599 of file TableFunctionsFactory_parser.py.
References TableFunctionsFactory_parser.Parser.consume().
Referenced by TableFunctionsFactory_parser.Parser.parse_annotation(), and TableFunctionsFactory_parser.Parser.parse_primitive().
def TableFunctionsFactory_parser.Parser.parse_composed | ( | self | ) |
fmt: off composed: "Cursor" "<" arg ("," arg)* ">" | IDENTIFIER "<" type ("," type)* ">" fmt: on
Definition at line 437 of file TableFunctionsFactory_parser.py.
References TableFunctionsFactory_parser.Parser.consume(), TableFunctionsFactory_parser.is_identifier_cursor(), TableFunctionsFactory_parser.Parser.match(), TableFunctionsFactory_parser.Parser.parse_arg(), TableFunctionsFactory_parser.Parser.parse_identifier(), and TableFunctionsFactory_parser.Parser.parse_type().
Referenced by TableFunctionsFactory_parser.Parser.parse_type().
def TableFunctionsFactory_parser.Parser.parse_identifier | ( | self | ) |
fmt: off IDENTIFIER: [A-Za-z_][A-Za-z0-9_]* fmt: on
Definition at line 569 of file TableFunctionsFactory_parser.py.
References TableFunctionsFactory_parser.Parser.consume().
Referenced by TableFunctionsFactory_parser.Parser.parse_annotation(), TableFunctionsFactory_parser.Parser.parse_arg(), TableFunctionsFactory_parser.Parser.parse_composed(), TableFunctionsFactory_parser.Parser.parse_primitive(), TableFunctionsFactory_parser.Parser.parse_template(), and TableFunctionsFactory_parser.Parser.parse_udtf().
def TableFunctionsFactory_parser.Parser.parse_number | ( | self | ) |
fmt: off NUMBER: [-]([0-9]*[.])?[0-9]+ fmt: on
Definition at line 589 of file TableFunctionsFactory_parser.py.
References TableFunctionsFactory_parser.Parser.consume().
Referenced by TableFunctionsFactory_parser.Parser.parse_annotation(), and TableFunctionsFactory_parser.Parser.parse_primitive().
def TableFunctionsFactory_parser.Parser.parse_primitive | ( | self | ) |
fmt: off primitive: IDENTIFIER | NUMBER | STRING | BOOLEAN fmt: on
Definition at line 460 of file TableFunctionsFactory_parser.py.
References TableFunctionsFactory_parser.Parser.match(), TableFunctionsFactory_parser.Parser.parse_boolean(), TableFunctionsFactory_parser.Parser.parse_identifier(), TableFunctionsFactory_parser.Parser.parse_number(), TableFunctionsFactory_parser.Parser.parse_string(), and TableFunctionsFactory_parser.Parser.raise_parser_error().
Referenced by TableFunctionsFactory_parser.Parser.parse_annotation(), TableFunctionsFactory_parser.Parser.parse_type(), and TableFunctionsFactory_parser.Parser.parse_udtf().
def TableFunctionsFactory_parser.Parser.parse_string | ( | self | ) |
fmt: off STRING: \".*?\" fmt: on
Definition at line 579 of file TableFunctionsFactory_parser.py.
References TableFunctionsFactory_parser.Parser.consume().
Referenced by TableFunctionsFactory_parser.Parser.parse_annotation(), and TableFunctionsFactory_parser.Parser.parse_primitive().
def TableFunctionsFactory_parser.Parser.parse_template | ( | self | ) |
fmt: off template: IDENTIFIER "=" "[" IDENTIFIER ("," IDENTIFIER)* "]" fmt: on
Definition at line 496 of file TableFunctionsFactory_parser.py.
References TableFunctionsFactory_parser.Parser.consume(), TableFunctionsFactory_parser.Parser.match(), and TableFunctionsFactory_parser.Parser.parse_identifier().
Referenced by TableFunctionsFactory_parser.Parser.parse_templates().
def TableFunctionsFactory_parser.Parser.parse_templates | ( | self | ) |
fmt: off templates: template ("," template)* fmt: on
Definition at line 482 of file TableFunctionsFactory_parser.py.
References TableFunctionsFactory_parser.Parser.consume(), TableFunctionsFactory_parser.Tokenize.is_at_end(), TableFunctionsFactory_parser.Parser.is_at_end(), TableFunctionsFactory_parser.Parser.match(), and TableFunctionsFactory_parser.Parser.parse_template().
Referenced by TableFunctionsFactory_parser.Parser.parse_udtf().
def TableFunctionsFactory_parser.Parser.parse_type | ( | self | ) |
fmt: off type: composed | primitive fmt: on
Definition at line 417 of file TableFunctionsFactory_parser.py.
References TableFunctionsFactory_parser.Parser._curr, TableFunctionsFactory_parser.Tokenize.is_at_end(), TableFunctionsFactory_parser.Parser.is_at_end(), TableFunctionsFactory_parser.Parser.match(), TableFunctionsFactory_parser.Parser.parse_composed(), and TableFunctionsFactory_parser.Parser.parse_primitive().
Referenced by TableFunctionsFactory_parser.Parser.parse_arg(), TableFunctionsFactory_parser.Parser.parse_args(), and TableFunctionsFactory_parser.Parser.parse_composed().
def TableFunctionsFactory_parser.Parser.parse_udtf | ( | self | ) |
fmt: off udtf: IDENTIFIER "(" (args)? ")" ("|" annotation)* "->" args ("," templates)? ("|" "output_row_size" "=" primitive)? fmt: on
Definition at line 323 of file TableFunctionsFactory_parser.py.
References TableFunctionsFactory_parser.Parser.consume(), TableFunctionsFactory_parser.Parser.expect(), TableFunctionsFactory_parser.Tokenize.is_at_end(), TableFunctionsFactory_parser.Parser.is_at_end(), TableFunctionsFactory_node.UdtfNode.line, TableFunctionsFactory_parser.Parser.line, TableFunctionsFactory_parser.Parser.match(), TableFunctionsFactory_parser.Parser.parse_annotation(), TableFunctionsFactory_parser.Parser.parse_args(), TableFunctionsFactory_parser.Parser.parse_identifier(), TableFunctionsFactory_parser.Parser.parse_primitive(), and TableFunctionsFactory_parser.Parser.parse_templates().
Referenced by TableFunctionsFactory_parser.Parser.parse().
def TableFunctionsFactory_parser.Parser.raise_parser_error | ( | self, | |
msg = None |
|||
) |
Definition at line 304 of file TableFunctionsFactory_parser.py.
References ChunkIter.current_pos, TableFunctionsFactory_parser.Parser.current_pos(), TableFunctionsFactory_parser.Tokenize.current_token(), TableFunctionsFactory_parser.Parser.current_token(), TableFunctionsFactory_parser.Tokenize.tokens(), and TableFunctionsFactory_parser.Parser.tokens().
Referenced by TableFunctionsFactory_parser.Parser.consume(), TableFunctionsFactory_parser.Parser.parse_annotation(), and TableFunctionsFactory_parser.Parser.parse_primitive().
def TableFunctionsFactory_parser.Parser.tokens | ( | self | ) |
Definition at line 262 of file TableFunctionsFactory_parser.py.
References TableFunctionsFactory_parser.Tokenize._tokens, and TableFunctionsFactory_parser.Parser._tokens.
Referenced by TableFunctionsFactory_parser.Parser.raise_parser_error().
|
private |
Definition at line 258 of file TableFunctionsFactory_parser.py.
Referenced by TableFunctionsFactory_parser.Parser.advance(), TableFunctionsFactory_parser.Parser.current_pos(), TableFunctionsFactory_parser.Parser.current_token(), TableFunctionsFactory_parser.Parser.expect(), TableFunctionsFactory_parser.Parser.is_at_end(), TableFunctionsFactory_parser.Parser.lookahead(), TableFunctionsFactory_parser.Parser.parse(), TableFunctionsFactory_parser.Parser.parse_args(), and TableFunctionsFactory_parser.Parser.parse_type().
|
private |
Definition at line 257 of file TableFunctionsFactory_parser.py.
Referenced by TableFunctionsFactory_parser.Parser.consume(), TableFunctionsFactory_parser.Parser.current_token(), TableFunctionsFactory_parser.Parser.expect(), TableFunctionsFactory_parser.Parser.is_at_end(), TableFunctionsFactory_parser.Parser.lookahead(), and TableFunctionsFactory_parser.Parser.tokens().
TableFunctionsFactory_parser.Parser.line |
Definition at line 259 of file TableFunctionsFactory_parser.py.
Referenced by TableFunctionsFactory_parser.Tokenize.add_token(), TableFunctionsFactory_parser.Tokenize.current_token(), TableFunctionsFactory_parser.Tokenize.is_at_end(), TableFunctionsFactory_parser.Tokenize.lookahead(), TableFunctionsFactory_parser.Parser.parse_udtf(), TableFunctionsFactory_parser.Tokenize.peek(), and TableFunctionsFactory_parser.Tokenize.raise_tokenize_error().