Make.TA syntax error is detected when the number of nodes in the top set drops to zero. In such a situation, the exception Error is raised. It carries the list of top nodes of the previous generation. This list is nonempty. None of these nodes is capable of shifting the next input symbol.
val token2terminal : token -> inttoken2terminal maps a token to a terminal symbol, represented by its internal integer code.
val merge : int -> Obj.t -> Obj.t -> token Input.input -> int -> int -> Obj.tmerge nt v1 v2 input date1 date2 merges the semantic values v1 and v2, both of which are associated with the nonterminal symbol nt. date1 and date2 are the start date and end date of the input fragment with which the semantic values v1 and v2 are associated. The end user is expected to provide this operation. It might choose just one of the two values or somehow combine them, for example by building a disjunction node.
start is the number of start productions. A production prod is a start production if and only if prod < start holds. This is also the number of start symbols. A nonterminal symbol nt is a start symbol if and only if nt < start holds.
The one-dimensional table lhs maps a production to its left-hand side (a non-terminal symbol).
The default reduction table, a one-dimensional table, maps a state to either dr_NoDefRed or dr_DefRed prod. The following tables, namely unique_action, shift, and reductions are looked up only if there is no default reduction.
The unique action bitmap, a two-dimensional table, maps a state and a terminal symbol to either uab_Fail or uab_DoNotFail. The unique action table is looked up only in the latter case.
This bitmap does not contain a column for the terminal symbol #.
The unique action table, a two-dimensional table, maps a state and a terminal to one of ua_Shift s, ua_Reduce prod, or ua_Fork. The values ua_Shift s and ua_Reduce prod can be used only if this is the unique enabled action.
This table is looked up only if there is no default reduction. This table is looked up only after the unique action bitmap has been looked up and has returned uab_DoNotFail.
This table does not contain a column for the terminal symbol #.
The shift bitmap, a two-dimensional table, maps a state and a terminal symbol to either sb_Fail or sb_DoNotFail. The shift table is looked up only in the latter case.
This bitmap does not contain a column for the terminal symbol #.
The shift table, a two-dimensional table, maps a state and a terminal to s_Shift s.
This table is looked up only if there is no default reduction. This table is looked up only after the shift bitmap has been looked up and has returned sb_DoNotFail.
This table does not contain a column for the terminal symbol #.
The reductions table, a two-dimensional table, maps a state and a terminal to a sequence of productions.
This table is looked up only if there is no default reduction.
This table does not contain a column for the terminal symbol #.
The goto table, a two-dimensional table, maps a state and a non-terminal symbol to encode_Goto s'. This table must be looked up only at well-defined entries: that is, it can be looked up at state s and symbol nt only if s has an outgoing transition labeled nt.
val semantic_action : (token Input.input -> (int, Obj.t) Path.t -> Obj.t) arrayThe semantic action table, a one-dimensional table, maps productions to semantic actions. The calling convention for semantic actions is described in GLRAPI. A state is encoded as an integer number, but this fact should be irrelevant, as a semantic action does not use any information about states. A semantic value has type Obj.t. This table contains ONLY NON-START PRODUCTIONS, so the indexing is off by start. Be careful.