3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
|
# File 'lib/coral.rb', line 3166
def _nt_BINDIG
start_index = index
if node_cache[:BINDIG].has_key?(index)
cached = node_cache[:BINDIG][index]
if cached
node_cache[:BINDIG][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
@index = cached.interval.end
end
return cached
end
if has_terminal?(@regexps[gr = '\A[0-1]'] ||= Regexp.new(gr), :regexp, index)
r0 = instantiate_node(SyntaxNode,input, index...(index + 1))
@index += 1
else
terminal_parse_failure('[0-1]')
r0 = nil
end
node_cache[:BINDIG][start_index] = r0
r0
end
|