81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
# File 'lib/brevity/parsing/expression/dynamic.rb', line 81
def _nt_ppp
start_index = index
if node_cache[:ppp].has_key?(index)
cached = node_cache[:ppp][index]
if cached
node_cache[:ppp][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
@index = cached.interval.end
end
return cached
end
if (match_len = has_terminal?("ppp", false, index))
r0 = instantiate_node(PianississimoNode,input, index...(index + match_len))
@index += match_len
else
terminal_parse_failure("ppp")
r0 = nil
end
node_cache[:ppp][start_index] = r0
r0
end
|