API reference
python:arx:arx.parser.core.ParserCore
class ParserCore
ParserCore(tokens: TokenList = TokenList([]))
Source: packages/arx/src/arx/parser/core.py:24
Shared parser state and orchestration.
Attributes
-
bin_op_precedence — Type: dict[str, int]
-
indent_level — Type: int
-
list_scopes — Type: list[set[str]]
-
known_class_names — Type: set[str]
-
imported_type_names — Type: set[str]
-
namespace_roots — Type: set[str]
-
builtin_type_bindings — Type: dict[str, astx.DataType]
-
tensor_scopes — Type: list[dict[str, TensorBinding | None]]
-
dataframe_scopes — Type: list[dict[str, DataFrameBinding | None]]
-
return_type_scopes — Type: list[astx.DataType]
-
template_type_scopes — Type: list[dict[str, astx.DataType]]
-
type_aliases — Type: dict[str, astx.DataType]
-
value_scopes — Type: list[set[str]]
-
tokens — Type: TokenList
Methods
-
__init__ — Instantiate the Parser object.
-
_class_name_from_expr — Return the referenced class name for static access candidates.
-
_collect_class_names — Collect declared class names from the token stream.
-
_consume_identifier_value — Consume one contextual identifier token.
-
_consume_operator — Consume the expected operator token.
-
_current_return_type — Return the active function return type when one exists.
-
_declare_dataframe_name — Record one visible DataFrame binding in the current scope.
-
_declare_list_name — Record one visible list binding in the current scope.
-
_declare_tensor_name — Record one visible tensor binding in the current scope.
-
_declare_value_name — Record one visible value name in the current scope.
-
_is_dataframe_name — Return whether one visible name is declared as a DataFrame.
-
_is_identifier_value — Return whether the current token matches one identifier value.
-
_is_list_name — Return whether one visible name is declared as a list.
-
_is_operator — Check whether the current token matches an operator.
-
_is_tensor_name — Return whether one visible name is declared as a tensor.
-
_lookahead_template_argument_call — Speculatively parse one explicit template-argument list.
-
_lookup_dataframe_binding — Return one visible DataFrame binding by name.
-
_lookup_template_bound — Look up one visible template-type bound by name.
-
_lookup_tensor_binding — Return one visible tensor binding by name.
-
_name_is_shadowed — Return whether a visible value binding shadows a class name.
-
_parse_template_args_for_call — Parse explicit template arguments only for call syntax.
-
_peek_token — Peek one token ahead without consuming it.
-
_pop_return_type_scope — Pop the most recent active function return type.
-
_pop_template_scope — Pop the most recent template-type scope.
-
_pop_value_scope — Pop the most recent visible-name scope.
-
_push_return_type_scope — Push one active function return type.
-
_push_template_scope — Push one template-type scope.
-
_push_value_scope — Push one visible-name scope for expression disambiguation.
-
_skip_import_layout — Consume indentation tokens used only for grouped imports.
-
_skip_template_layout — Consume indentation tokens used only inside template blocks.
-
_token_starts_expression — Return whether one token can start an expression.
-
clean — Reset the Parser static variables.
-
get_tok_precedence — Get the precedence of the pending binary operator token.
-
match_clause — Consume line markers only when a same-level clause follows.
-
parse — Parse the input code.