Represent repetitions with associative structure
This commit is contained in:
parent
f8704d28da
commit
8c29841adf
9 changed files with 46 additions and 12 deletions
|
|
@ -623,6 +623,8 @@ class CCodeGenerator {
|
|||
case ParseActionTypeShift:
|
||||
if (action.extra) {
|
||||
add("SHIFT_EXTRA()");
|
||||
} else if (action.repetition) {
|
||||
add("SHIFT_REPEAT(" + to_string(action.state_index) + ")");
|
||||
} else {
|
||||
add("SHIFT(" + to_string(action.state_index) + ")");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue