# Autogenerated from a Treetop grammar. Edits may be lost. require "hemingway/special/special_nodes" module Hemingway module Special include Treetop::Runtime def root @root ||= :special end module Special0 def escape elements[0] end def character elements[1] end end def _nt_special start_index = index if node_cache[:special].has_key?(index) cached = node_cache[:special][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_escape s0 << r1 if r1 i2 = index if has_terminal?("#", false, index) r3 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("#") r3 = nil end if r3 r2 = r3 else if has_terminal?("$", false, index) r4 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("$") r4 = nil end if r4 r2 = r4 else if has_terminal?("%", false, index) r5 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("%") r5 = nil end if r5 r2 = r5 else if has_terminal?("&", false, index) r6 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("&") r6 = nil end if r6 r2 = r6 else if has_terminal?("_", false, index) r7 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("_") r7 = nil end if r7 r2 = r7 else if has_terminal?("{", false, index) r8 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("{") r8 = nil end if r8 r2 = r8 else if has_terminal?("}", false, index) r9 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("}") r9 = nil end if r9 r2 = r9 else @index = i2 r2 = nil end end end end end end end s0 << r2 end if s0.last r0 = instantiate_node(SpecialNode,input, i0...index, s0) r0.extend(Special0) else @index = i0 r0 = nil end node_cache[:special][start_index] = r0 r0 end def _nt_escape start_index = index if node_cache[:escape].has_key?(index) cached = node_cache[:escape][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if has_terminal?("\\", false, index) r0 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("\\") r0 = nil end node_cache[:escape][start_index] = r0 r0 end end class SpecialParser < Treetop::Runtime::CompiledParser include Special end end