380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
|
# File 'lib/ntail/formatting.rb', line 380
def _nt_http_user_agent
start_index = index
if node_cache[:http_user_agent].has_key?(index)
cached = node_cache[:http_user_agent][index]
if cached
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
@index = cached.interval.end
end
return cached
end
if has_terminal?('%U', false, index)
r0 = instantiate_node(Node,input, index...(index + 2))
r0.extend(HttpUserAgent0)
@index += 2
else
terminal_parse_failure('%U')
r0 = nil
end
node_cache[:http_user_agent][start_index] = r0
r0
end
|