Rizin
unix-like reverse engineering framework and cli tools
|
#include <time.h>
#include <assert.h>
#include <stdio.h>
#include <limits.h>
#include <stdbool.h>
#include "tree_sitter/api.h"
#include "./alloc.h"
#include "./array.h"
#include "./atomic.h"
#include "./clock.h"
#include "./error_costs.h"
#include "./get_changed_ranges.h"
#include "./language.h"
#include "./length.h"
#include "./lexer.h"
#include "./reduce_action.h"
#include "./reusable_node.h"
#include "./stack.h"
#include "./subtree.h"
#include "./tree.h"
Go to the source code of this file.
Classes | |
struct | TokenCache |
struct | TSParser |
struct | ErrorStatus |
struct | TSStringInput |
Macros | |
#define | LOG(...) |
#define | LOG_LOOKAHEAD(symbol_name, size) |
#define | LOG_STACK() |
#define | LOG_TREE(tree) |
#define | SYM_NAME(symbol) ts_language_symbol_name(self->language, symbol) |
#define | TREE_NAME(tree) SYM_NAME(ts_subtree_symbol(tree)) |
Enumerations | |
enum | ErrorComparison { ErrorComparisonTakeLeft , ErrorComparisonPreferLeft , ErrorComparisonNone , ErrorComparisonPreferRight , ErrorComparisonTakeRight } |
Variables | |
static const unsigned | MAX_VERSION_COUNT = 6 |
static const unsigned | MAX_VERSION_COUNT_OVERFLOW = 4 |
static const unsigned | MAX_SUMMARY_DEPTH = 16 |
static const unsigned | MAX_COST_DIFFERENCE = 16 * ERROR_COST_PER_SKIPPED_TREE |
static const unsigned | OP_COUNT_PER_TIMEOUT_CHECK = 100 |
#define LOG | ( | ... | ) |
#define LOG_LOOKAHEAD | ( | symbol_name, | |
size | |||
) |
#define LOG_STACK | ( | ) |
#define LOG_TREE | ( | tree | ) |
#define SYM_NAME | ( | symbol | ) | ts_language_symbol_name(self->language, symbol) |
#define TREE_NAME | ( | tree | ) | SYM_NAME(ts_subtree_symbol(tree)) |
enum ErrorComparison |
|
static |
Definition at line 920 of file parser.c.
References array_splice, assert(), Subtree::data, i, SubtreeInlineData::is_inline, k, NULL_SUBTREE, SubtreeHeapData::production_id, Subtree::ptr, root, ts_parser__select_tree(), ts_stack_halt(), ts_stack_pop_all(), ts_stack_push(), ts_stack_remove_version(), ts_subtree_child_count(), ts_subtree_children, ts_subtree_extra(), ts_subtree_from_mut(), ts_subtree_is_eof(), ts_subtree_new_node(), ts_subtree_release(), ts_subtree_retain(), and ts_subtree_symbol().
Referenced by ts_parser__advance(), and ts_parser__recover().
|
static |
Definition at line 1387 of file parser.c.
References test-lz4-speed::action, TableEntry::action_count, TableEntry::actions, atomic_load(), Length::bytes, clock_is_gt(), clock_is_null(), clock_now(), ERROR_STATE, i, LOG, LOG_STACK, NULL, NULL_SUBTREE, OP_COUNT_PER_TIMEOUT_CHECK, Subtree::ptr, reusable_node_advance(), STACK_VERSION_NONE, SYM_NAME, TREE_NAME, ts_builtin_sym_end, ts_language_next_state(), ts_language_table_entry(), ts_parser__accept(), ts_parser__breakdown_lookahead(), ts_parser__breakdown_top_of_stack(), ts_parser__get_cached_token(), ts_parser__lex(), ts_parser__recover(), ts_parser__reduce(), ts_parser__reuse_node(), ts_parser__set_cached_token(), ts_parser__shift(), ts_stack_last_external_token(), ts_stack_pause(), ts_stack_position(), ts_stack_renumber_version(), ts_stack_state(), ts_subtree_child_count(), ts_subtree_from_mut(), ts_subtree_is_keyword(), ts_subtree_leaf_symbol(), ts_subtree_make_mut(), ts_subtree_release(), ts_subtree_set_symbol(), ts_subtree_symbol(), TSParseActionTypeAccept, TSParseActionTypeRecover, TSParseActionTypeReduce, and TSParseActionTypeShift.
Referenced by ts_parser_parse().
|
static |
Definition at line 298 of file parser.c.
References Length::bytes, ErrorComparisonPreferRight, ErrorComparisonTakeRight, i, n, status, ts_parser__compare_versions(), ts_parser__version_status(), ts_stack_can_merge(), ts_stack_dynamic_precedence(), ts_stack_is_active(), ts_stack_node_count_since_error(), ts_stack_position(), ts_stack_version_count(), and ts_subtree_error_cost().
Referenced by ts_parser__recover().
|
static |
Definition at line 218 of file parser.c.
References LOG, reusable_node_descend(), reusable_node_tree(), TREE_NAME, ts_subtree_child_count(), ts_subtree_parse_state(), ts_subtree_release(), and ts_subtree_retain().
Referenced by ts_parser__advance(), and ts_parser__handle_error().
|
static |
Definition at line 170 of file parser.c.
References array_delete, array_front, ERROR_STATE, i, LOG, LOG_STACK, n, StackSlice::subtrees, TREE_NAME, ts_language_next_state(), ts_stack_pop_pending(), ts_stack_push(), ts_stack_state(), ts_subtree_child_count(), ts_subtree_children, ts_subtree_extra(), ts_subtree_is_error(), ts_subtree_release(), ts_subtree_retain(), ts_subtree_symbol(), and StackSlice::version.
Referenced by ts_parser__advance(), and ts_parser__reuse_node().
|
static |
Definition at line 350 of file parser.c.
References TableEntry::action_count, bytes, TSLexMode::external_lex_state, TableEntry::is_reusable, TSLexMode::lex_state, ts_builtin_sym_end, ts_subtree_is_keyword(), ts_subtree_leaf_parse_state(), ts_subtree_leaf_symbol(), ts_subtree_parse_state(), and ts_subtree_size().
Referenced by ts_parser__get_cached_token(), and ts_parser__reuse_node().
|
static |
Definition at line 240 of file parser.c.
References a, b, ErrorComparisonNone, ErrorComparisonPreferLeft, ErrorComparisonPreferRight, ErrorComparisonTakeLeft, ErrorComparisonTakeRight, and MAX_COST_DIFFERENCE.
Referenced by ts_parser__better_version_exists(), and ts_parser__condense_stack().
Definition at line 1595 of file parser.c.
References ErrorStatus::cost, ErrorComparisonNone, ErrorComparisonPreferLeft, ErrorComparisonPreferRight, ErrorComparisonTakeLeft, ErrorComparisonTakeRight, i, ErrorStatus::is_in_error, LOG, LOG_STACK, MAX_VERSION_COUNT, n, ts_parser__compare_versions(), ts_parser__handle_error(), ts_parser__version_status(), ts_stack_error_cost(), ts_stack_is_halted(), ts_stack_is_paused(), ts_stack_merge(), ts_stack_remove_version(), ts_stack_resume(), ts_stack_swap_versions(), ts_stack_version_count(), and UINT_MAX.
Referenced by ts_parser_parse().
|
static |
Definition at line 973 of file parser.c.
References test-lz4-speed::action, array_clear, i, MAX_VERSION_COUNT, STACK_VERSION_NONE, ts_language_table_entry(), ts_parser__reduce(), ts_reduce_action_set_add(), ts_stack_merge(), ts_stack_remove_version(), ts_stack_renumber_version(), ts_stack_state(), ts_stack_version_count(), TSParseActionTypeRecover, TSParseActionTypeReduce, TSParseActionTypeShift, and version.
Referenced by ts_parser__handle_error().
|
static |
Definition at line 577 of file parser.c.
References TokenCache::byte_index, TokenCache::last_external_token, NULL_SUBTREE, Subtree::ptr, TokenCache::token, ts_language_table_entry(), ts_parser__can_reuse_first_leaf(), ts_subtree_external_scanner_state_eq(), ts_subtree_retain(), and ts_subtree_symbol().
Referenced by ts_parser__advance().
|
static |
Definition at line 1290 of file parser.c.
References assert(), ERROR_STATE, i, length_sub(), LOG, LOG_STACK, MAX_SUMMARY_DEPTH, NULL_SUBTREE, SYM_NAME, ts_language_has_reduce_action(), ts_language_next_state(), ts_lexer_mark_end(), ts_lexer_reset(), ts_parser__breakdown_lookahead(), ts_parser__do_all_potential_reductions(), ts_parser__recover(), ts_stack_copy_version(), ts_stack_merge(), ts_stack_position(), ts_stack_push(), ts_stack_record_summary(), ts_stack_state(), ts_stack_version_count(), ts_subtree_child_count(), ts_subtree_leaf_symbol(), ts_subtree_lookahead_bytes(), ts_subtree_new_missing_leaf(), ts_subtree_total_bytes(), v, and version.
Referenced by ts_parser__condense_stack().
|
static |
Definition at line 614 of file parser.c.
References ts_range_array_intersects().
Referenced by ts_parser__reuse_node().
|
static |
Definition at line 385 of file parser.c.
References bytes, Length::bytes, TSPoint::column, ERROR_STATE, Length::extent, TSLexMode::external_lex_state, length, length_sub(), length_zero(), TSLexMode::lex_state, LOG, LOG_LOOKAHEAD, NULL_SUBTREE, Subtree::ptr, TSPoint::row, SYM_NAME, ts_builtin_sym_error, ts_external_scanner_state_init(), ts_language_enabled_external_tokens(), ts_language_has_actions(), ts_lexer_finish(), ts_lexer_reset(), ts_lexer_start(), ts_parser__restore_external_scanner(), ts_stack_has_advanced_since_error(), ts_stack_last_external_token(), ts_stack_position(), ts_subtree_new_error(), ts_subtree_new_leaf(), ts_subtree_symbol(), and ts_subtree_total_size().
Referenced by ts_parser__advance().
|
static |
|
static |
Definition at line 1122 of file parser.c.
References array_new, array_push, array_reserve, Length::bytes, ERROR_COST_PER_SKIPPED_CHAR, ERROR_COST_PER_SKIPPED_LINE, ERROR_COST_PER_SKIPPED_TREE, ERROR_STATE, Length::extent, i, LOG, LOG_STACK, MAX_VERSION_COUNT, n, TSPoint::row, shift(), summary, TREE_NAME, ts_builtin_sym_error_repeat, ts_language_actions(), ts_language_has_actions(), ts_parser__accept(), ts_parser__better_version_exists(), ts_parser__recover_to_state(), ts_stack_error_cost(), ts_stack_get_summary(), ts_stack_halt(), ts_stack_is_active(), ts_stack_node_count_since_error(), ts_stack_pop_count(), ts_stack_position(), ts_stack_push(), ts_stack_remove_version(), ts_stack_renumber_version(), ts_stack_set_last_external_token(), ts_stack_state(), ts_stack_version_count(), ts_subtree_array_delete(), ts_subtree_from_mut(), ts_subtree_has_external_tokens(), ts_subtree_is_eof(), ts_subtree_is_error(), ts_subtree_last_external_token(), ts_subtree_make_mut(), ts_subtree_new_error_node(), ts_subtree_new_node(), ts_subtree_release(), ts_subtree_set_extra(), ts_subtree_symbol(), ts_subtree_total_bytes(), ts_subtree_total_size(), TSParseActionTypeShift, and type.
Referenced by ts_parser__advance(), and ts_parser__handle_error().
|
static |
Definition at line 1063 of file parser.c.
References array_delete, array_erase, array_splice, assert(), error(), i, STACK_VERSION_NONE, StackSlice::subtrees, ts_stack_halt(), ts_stack_pop_count(), ts_stack_pop_error(), ts_stack_push(), ts_stack_state(), ts_subtree_array_delete(), ts_subtree_array_remove_trailing_extras(), ts_subtree_child_count(), ts_subtree_children, ts_subtree_new_error_node(), ts_subtree_retain(), and StackSlice::version.
Referenced by ts_parser__recover().
|
static |
Definition at line 805 of file parser.c.
References array_clear, array_swap, count, SubtreeHeapData::dynamic_precedence, SubtreeHeapData::extra, SubtreeHeapData::fragile_left, SubtreeHeapData::fragile_right, i, MAX_VERSION_COUNT, MAX_VERSION_COUNT_OVERFLOW, SubtreeHeapData::parse_state, MutableSubtree::ptr, STACK_VERSION_NONE, StackSlice::subtrees, ts_language_next_state(), ts_parser__select_children(), ts_stack_merge(), ts_stack_pop_count(), ts_stack_push(), ts_stack_remove_version(), ts_stack_state(), ts_stack_version_count(), ts_subtree_array_clear(), ts_subtree_array_delete(), ts_subtree_array_remove_trailing_extras(), ts_subtree_from_mut(), ts_subtree_new_node(), ts_subtree_release(), TS_TREE_STATE_NONE, and StackSlice::version.
Referenced by ts_parser__advance(), and ts_parser__do_all_potential_reductions().
Definition at line 335 of file parser.c.
References SubtreeHeapData::external_scanner_state, ExternalScannerState::length, NULL, Subtree::ptr, and ts_external_scanner_state_data().
Referenced by ts_parser__lex().
|
static |
Definition at line 627 of file parser.c.
References LOG, NULL, NULL_SUBTREE, reusable_node_advance(), reusable_node_advance_past_leaf(), reusable_node_byte_offset(), reusable_node_descend(), reusable_node_tree(), SYM_NAME, TREE_NAME, ts_language_table_entry(), ts_parser__breakdown_top_of_stack(), ts_parser__can_reuse_first_leaf(), ts_parser__has_included_range_difference(), ts_stack_state(), ts_subtree_external_scanner_state_eq(), ts_subtree_has_changes(), ts_subtree_is_eof(), ts_subtree_is_error(), ts_subtree_is_fragile(), ts_subtree_leaf_symbol(), ts_subtree_missing(), ts_subtree_retain(), ts_subtree_total_bytes(), and UINT32_MAX.
Referenced by ts_parser__advance().
|
static |
Definition at line 757 of file parser.c.
References array_assign, ts_parser__select_tree(), ts_subtree_from_mut(), ts_subtree_new_node(), and ts_subtree_symbol().
Referenced by ts_parser__reduce().
Definition at line 710 of file parser.c.
References LOG, Subtree::ptr, TREE_NAME, ts_subtree_compare(), ts_subtree_dynamic_precedence(), and ts_subtree_error_cost().
Referenced by ts_parser__accept(), and ts_parser__select_children().
|
static |
Definition at line 598 of file parser.c.
References TokenCache::byte_index, TokenCache::last_external_token, Subtree::ptr, TokenCache::token, ts_subtree_release(), and ts_subtree_retain().
Referenced by ts_parser__advance(), ts_parser_delete(), ts_parser_new(), and ts_parser_reset().
|
static |
Definition at line 782 of file parser.c.
References ts_stack_push(), ts_stack_set_last_external_token(), ts_subtree_child_count(), ts_subtree_extra(), ts_subtree_from_mut(), ts_subtree_has_external_tokens(), ts_subtree_last_external_token(), ts_subtree_make_mut(), and ts_subtree_set_extra().
Referenced by ts_parser__advance().
|
static |
Definition at line 283 of file parser.c.
References ERROR_COST_PER_SKIPPED_TREE, ERROR_STATE, ts_stack_dynamic_precedence(), ts_stack_error_cost(), ts_stack_is_paused(), ts_stack_node_count_since_error(), and ts_stack_state().
Referenced by ts_parser__better_version_exists(), and ts_parser__condense_stack().
void ts_parser_delete | ( | TSParser * | parser | ) |
Delete the parser, freeing all of the memory that it used.
Definition at line 1725 of file parser.c.
References array_delete, NULL, NULL_SUBTREE, reusable_node_delete(), ts_free, ts_lexer_delete(), ts_parser__set_cached_token(), ts_parser_set_language(), ts_stack_delete(), ts_subtree_pool_delete(), and ts_subtree_release().
Referenced by core_cmd_tsrzcmd(), guess_data_free(), guess_next_autocmplt_token(), rz_type_parse_string_declaration_single(), rz_type_parse_string_single(), and type_parse_string().
Definition at line 1695 of file parser.c.
References ts_stack_node_count_since_error(), and ts_stack_state().
Referenced by ts_parser_parse().
Get the ranges of text that the parser will include when parsing.
The returned pointer is owned by the parser. The caller should not free it or write to it. The length of the array will be written to the given length
pointer.
Definition at line 1819 of file parser.c.
References count, and ts_lexer_included_ranges().
const TSLanguage* ts_parser_language | ( | const TSParser * | self | ) |
TSParser* ts_parser_new | ( | void | ) |
Create a new parser.
Definition at line 1704 of file parser.c.
References array_init, array_new, array_reserve, clock_null(), NULL, NULL_SUBTREE, reusable_node_new(), ts_calloc, ts_lexer_init(), ts_parser__set_cached_token(), ts_stack_new(), and ts_subtree_pool_new().
Referenced by core_cmd_tsrzcmd(), guess_next_autocmplt_token(), rz_type_parse_string_declaration_single(), rz_type_parse_string_single(), ts_parser_new_wasm(), and type_parse_string().
Use the parser to parse some source code and create a syntax tree.
If you are parsing this document for the first time, pass NULL
for the old_tree
parameter. Otherwise, if you have already parsed an earlier version of this document and the document has since been edited, pass the previous syntax tree so that the unchanged parts of it can be reused. This will save time and memory. For this to work correctly, you must have already edited the old syntax tree using the ts_tree_edit
function in a way that exactly matches the source code changes.
The TSInput
parameter lets you specify how to read the text. It has the following three fields:
read
: A function to retrieve a chunk of text at a given byte offset and (row, column) position. The function should return a pointer to the text and write its length to the bytes_read
pointer. The parser does not take ownership of this buffer; it just borrows it until it has finished reading it. The function should write a zero value to the bytes_read
pointer to indicate the end of the document.payload
: An arbitrary pointer that will be passed to each invocation of the read
function.encoding
: An indication of how the text is encoded. Either TSInputEncodingUTF8
or TSInputEncodingUTF16
.This function returns a syntax tree on success, and NULL
on failure. There are three possible reasons for failure:
ts_parser_language
function.ts_parser_set_timeout_micros
function. You can resume parsing from where the parser left out by calling ts_parser_parse
again with the same arguments. Or you can start parsing from scratch by first calling ts_parser_reset
.ts_parser_set_cancellation_flag
. You can resume parsing from where the parser left out by calling ts_parser_parse
again with the same arguments. Definition at line 1844 of file parser.c.
References array_clear, Length::bytes, clock_after(), clock_now(), clock_null(), TSPoint::column, Length::extent, i, TSTree::included_range_count, TSTree::included_ranges, input(), LOG, LOG_STACK, LOG_TREE, NULL, NULL_SUBTREE, capstone::range, reusable_node_clear(), reusable_node_reset(), TSTree::root, TSPoint::row, ts_lexer_set_input(), ts_parser__advance(), ts_parser__condense_stack(), ts_parser_has_outstanding_parse(), ts_parser_reset(), ts_range_array_get_changed_ranges(), ts_stack_is_active(), ts_stack_position(), ts_stack_state(), ts_stack_version_count(), ts_subtree_balance(), ts_subtree_error_cost(), ts_subtree_retain(), and ts_tree_new().
Referenced by ts_parser_parse_string_encoding(), and ts_parser_parse_wasm().
TSTree* ts_parser_parse_string | ( | TSParser * | self, |
const TSTree * | old_tree, | ||
const char * | string, | ||
uint32_t | length | ||
) |
Use the parser to parse some source code stored in one contiguous buffer. The first two parameters are the same as in the ts_parser_parse
function above. The second two parameters indicate the location of the buffer and its length in bytes.
Definition at line 1945 of file parser.c.
References length, ts_parser_parse_string_encoding(), and TSInputEncodingUTF8.
Referenced by apply_edits(), core_cmd_tsrzcmd(), guess_next_autocmplt_token(), rz_type_parse_string_declaration_single(), rz_type_parse_string_single(), and type_parse_string().
TSTree* ts_parser_parse_string_encoding | ( | TSParser * | self, |
const TSTree * | old_tree, | ||
const char * | string, | ||
uint32_t | length, | ||
TSInputEncoding | encoding | ||
) |
Use the parser to parse some source code stored in one contiguous buffer with a given encoding. The first four parameters work the same as in the ts_parser_parse_string
method above. The final parameter indicates whether the text is encoded as UTF8 or UTF16.
Definition at line 1954 of file parser.c.
References cmd_descs_generate::encoding, input(), length, ts_parser_parse(), and ts_string_input_read().
Referenced by ts_parser_parse_string().
Set the file descriptor to which the parser should write debugging graphs during parsing. The graphs are formatted in the DOT language. You may want to pipe these graphs directly to a dot(1)
process in order to generate SVG output. You can turn off this logging by passing a negative number.
Definition at line 1783 of file parser.c.
void ts_parser_reset | ( | TSParser * | self | ) |
Instruct the parser to start the next parse from the beginning.
If the parser previously failed because of a timeout or a cancellation, then by default, it will resume where it left off on the next call to ts_parser_parse
or other parsing functions. If you don't want to resume, and instead intend to use this parser to parse some other document, you must call ts_parser_reset
first.
Definition at line 1823 of file parser.c.
References length_zero(), NULL, NULL_SUBTREE, reusable_node_clear(), ts_lexer_reset(), ts_parser__set_cached_token(), ts_stack_clear(), and ts_subtree_release().
Referenced by ts_parser_parse(), and ts_parser_set_language().
Set the parser's current cancellation flag pointer.
If a non-null pointer is assigned, then the parser will periodically read from this pointer during parsing. If it reads a non-zero value, it will halt early, returning NULL. See ts_parser_parse
for more information.
Set the ranges of text that the parser should include when parsing.
By default, the parser will always include entire documents. This function allows you to parse only a portion of a document but still return a syntax tree whose ranges match up with the document as a whole. You can also pass multiple disjoint ranges.
The second and third parameters specify the location and length of an array of ranges. The parser does not take ownership of these ranges; it copies the data, so it doesn't matter how these ranges are allocated.
If length
is zero, then the entire document will be parsed. Otherwise, the given ranges must be ordered from earliest to latest in the document, and they must not overlap. That is, the following must hold for all i
< length - 1
: ranges[i].end_byte <= ranges[i + 1].start_byte
If this requirement is not satisfied, the operation will fail, the ranges will not be assigned, and this function will return false
. On success, this function returns true
Definition at line 1811 of file parser.c.
References count, and ts_lexer_set_included_ranges().
Referenced by ts_parser_parse_wasm().
bool ts_parser_set_language | ( | TSParser * | self, |
const TSLanguage * | language | ||
) |
Set the language that the parser should use for parsing.
Returns a boolean indicating whether or not the language was successfully assigned. True means assignment succeeded. False means there was a version mismatch: the language was generated with an incompatible version of the Tree-sitter CLI. Check the language's version using ts_language_version
and compare it to this library's TREE_SITTER_LANGUAGE_VERSION
and TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION
constants.
Definition at line 1754 of file parser.c.
References TSLanguage::create, TSLanguage::external_scanner, NULL, TREE_SITTER_LANGUAGE_VERSION, TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION, ts_parser_reset(), and TSLanguage::version.
Referenced by core_cmd_tsrzcmd(), guess_next_autocmplt_token(), rz_type_parse_string_declaration_single(), rz_type_parse_string_single(), ts_parser_delete(), and type_parse_string().
Set the logger that a parser should use during parsing.
The parser does not take ownership over the logger payload. If a logger was previously assigned, the caller is responsible for releasing any memory owned by the previous logger.
Definition at line 1779 of file parser.c.
Referenced by ts_parser_enable_logger_wasm().
Set the maximum duration in microseconds that parsing should be allowed to take before halting.
If parsing takes longer than this, it will halt early, returning NULL. See ts_parser_parse
for more information.
Definition at line 1807 of file parser.c.
References duration_from_micros().
Get the duration in microseconds that parsing is allowed to take.
Definition at line 1803 of file parser.c.
References duration_to_micros().
|
static |
Definition at line 132 of file parser.c.
References length.
Referenced by ts_parser_parse_string_encoding().
|
static |
Definition at line 77 of file parser.c.
Referenced by ts_parser__compare_versions().
Definition at line 76 of file parser.c.
Referenced by ts_parser__handle_error().
Definition at line 74 of file parser.c.
Referenced by ts_parser__condense_stack(), ts_parser__do_all_potential_reductions(), ts_parser__recover(), and ts_parser__reduce().
Definition at line 75 of file parser.c.
Referenced by ts_parser__reduce().
Definition at line 78 of file parser.c.
Referenced by ts_parser__advance().