2017-01-02 11:45:50 +01:00
|
|
|
#include "{{name}}.h"
|
|
|
|
|
|
|
|
#define TABLE {{name}}___Table___{{name}}
|
|
|
|
#define REDUCE_COUNT {{name}}___Num_Reduces___{{name}}
|
|
|
|
|
|
|
|
const std::uint64_t TABLE[{{num_states}}][{{num_symbols}}] = {
|
|
|
|
{{#states}}
|
2017-01-02 17:02:43 +01:00
|
|
|
{ {{#actions}}({{action}} | ({{data}}) << 2),{{/actions}}
|
|
|
|
{{#gotos}}(({{.}}) << 2),{{/gotos}} },
|
2017-01-02 11:45:50 +01:00
|
|
|
{{/states}}
|
|
|
|
};
|
|
|
|
|
2017-01-02 17:02:43 +01:00
|
|
|
const unsigned char REDUCE_COUNT[{{num_rules}}] = { {{#rules}}{{rhs_length}},{{/rules}} };
|