Do not generate token names for drop tokens
This commit is contained in:
1 parent
61dd5bc5a0
commit
93cb25df62
2 files changed
+14
-2
No files matched your search
@@ -62,6 +62,16 @@ module Imbecile
|
||||
state_table = []
|
||||
states = enumerate
|
||||
states.each do |state, id|
|
||||
accepts =
|
||||
if state.accepts
|
||||
if state.accepts.name
|
||||
state.accepts.id
|
||||
else
|
||||
0xFFFFFFFE # drop token
|
||||
end
|
||||
else
|
||||
0xFFFFFFFF # not an accepting state
|
||||
end
|
||||
state_table << {
|
||||
transition_table_index: transition_table.size,
|
||||
n_transitions: state.transitions.size,
|
||||
|
||||
Reference in new issue
Block a user