# Autogenerated from a Treetop grammar. Edits may be lost. module WebIDL module Parser # http://dev.w3.org/2006/webapi/WebIDL/#idl-grammar module IDL include Treetop::Runtime def root @root ||= :Definitions end module Definitions0 def eal elements[0] end def ws1 elements[1] end def d elements[2] end def ws2 elements[3] end def defs elements[4] end end module Definitions1 def ws1 elements[0] end def metadef elements[1] end def ws2 elements[2] end end def _nt_Definitions start_index = index if node_cache[:Definitions].has_key?(index) cached = node_cache[:Definitions][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_ws s0 << r1 if r1 i3, s3 = index, [] r4 = _nt_ExtendedAttributeList s3 << r4 if r4 r5 = _nt_ws s3 << r5 if r5 r6 = _nt_Definition s3 << r6 if r6 r7 = _nt_ws s3 << r7 if r7 r8 = _nt_Definitions s3 << r8 end end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(Definitions0) else @index = i3 r3 = nil end if r3 r2 = r3 else r2 = instantiate_node(SyntaxNode,input, index...index) end s0 << r2 if r2 r9 = _nt_ws s0 << r9 end end if s0.last r0 = instantiate_node(ParseTree::Definitions,input, i0...index, s0) r0.extend(Definitions1) else @index = i0 r0 = nil end node_cache[:Definitions][start_index] = r0 r0 end def _nt_Definition start_index = index if node_cache[:Definition].has_key?(index) cached = node_cache[:Definition][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_Module if r1 r0 = r1 else r2 = _nt_Interface if r2 r0 = r2 else r3 = _nt_Exception if r3 r0 = r3 else r4 = _nt_TypeDef if r4 r0 = r4 else r5 = _nt_ImplementsStatement if r5 r0 = r5 else @index = i0 r0 = nil end end end end end node_cache[:Definition][start_index] = r0 r0 end module Module0 def ws1 elements[1] end def name elements[2] end def ws2 elements[3] end def ws3 elements[5] end def defs elements[6] end def ws4 elements[7] end def ws5 elements[9] end end def _nt_Module start_index = index if node_cache[:Module].has_key?(index) cached = node_cache[:Module][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if has_terminal?("module", false, index) r1 = instantiate_node(SyntaxNode,input, index...(index + 6)) @index += 6 else terminal_parse_failure("module") r1 = nil end s0 << r1 if r1 r2 = _nt_ws s0 << r2 if r2 r3 = _nt_identifier s0 << r3 if r3 r4 = _nt_ws s0 << r4 if r4 if has_terminal?("{", false, index) r5 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("{") r5 = nil end s0 << r5 if r5 r6 = _nt_ws s0 << r6 if r6 r7 = _nt_Definitions s0 << r7 if r7 r8 = _nt_ws s0 << r8 if r8 if has_terminal?("}", false, index) r9 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("}") r9 = nil end s0 << r9 if r9 r10 = _nt_ws s0 << r10 if r10 if has_terminal?(";", false, index) r11 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(";") r11 = nil end s0 << r11 end end end end end end end end end end if s0.last r0 = instantiate_node(ParseTree::Module,input, i0...index, s0) r0.extend(Module0) else @index = i0 r0 = nil end node_cache[:Module][start_index] = r0 r0 end module Interface0 def ws1 elements[1] end def name elements[2] end def ws2 elements[3] end def inherits elements[4] end def ws3 elements[5] end def ws4 elements[7] end def members elements[8] end def ws5 elements[9] end def ws6 elements[11] end end def _nt_Interface start_index = index if node_cache[:Interface].has_key?(index) cached = node_cache[:Interface][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if has_terminal?("interface", false, index) r1 = instantiate_node(SyntaxNode,input, index...(index + 9)) @index += 9 else terminal_parse_failure("interface") r1 = nil end s0 << r1 if r1 r2 = _nt_ws s0 << r2 if r2 r3 = _nt_identifier s0 << r3 if r3 r4 = _nt_ws s0 << r4 if r4 r5 = _nt_InterfaceInheritance s0 << r5 if r5 r6 = _nt_ws s0 << r6 if r6 if has_terminal?("{", false, index) r7 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("{") r7 = nil end s0 << r7 if r7 r8 = _nt_ws s0 << r8 if r8 r9 = _nt_InterfaceMembers s0 << r9 if r9 r10 = _nt_ws s0 << r10 if r10 if has_terminal?("}", false, index) r11 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("}") r11 = nil end s0 << r11 if r11 r12 = _nt_ws s0 << r12 if r12 if has_terminal?(";", false, index) r13 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(";") r13 = nil end s0 << r13 end end end end end end end end end end end end if s0.last r0 = instantiate_node(ParseTree::Interface,input, i0...index, s0) r0.extend(Interface0) else @index = i0 r0 = nil end node_cache[:Interface][start_index] = r0 r0 end module InterfaceInheritance0 def ws elements[1] end def names elements[2] end end def _nt_InterfaceInheritance start_index = index if node_cache[:InterfaceInheritance].has_key?(index) cached = node_cache[:InterfaceInheritance][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i1, s1 = index, [] if has_terminal?(":", false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(":") r2 = nil end s1 << r2 if r2 r3 = _nt_ws s1 << r3 if r3 r4 = _nt_ScopedNameList s1 << r4 end end if s1.last r1 = instantiate_node(ParseTree::InterfaceInheritance,input, i1...index, s1) r1.extend(InterfaceInheritance0) else @index = i1 r1 = nil end if r1 r0 = r1 else r0 = instantiate_node(SyntaxNode,input, index...index) end node_cache[:InterfaceInheritance][start_index] = r0 r0 end module InterfaceMembers0 def eal elements[0] end def ws1 elements[1] end def member elements[2] end def ws2 elements[3] end def members elements[4] end def ws3 elements[5] end end def _nt_InterfaceMembers start_index = index if node_cache[:InterfaceMembers].has_key?(index) cached = node_cache[:InterfaceMembers][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i1, s1 = index, [] r2 = _nt_ExtendedAttributeList s1 << r2 if r2 r3 = _nt_ws s1 << r3 if r3 r4 = _nt_InterfaceMember s1 << r4 if r4 r5 = _nt_ws s1 << r5 if r5 r6 = _nt_InterfaceMembers s1 << r6 if r6 r7 = _nt_ws s1 << r7 end end end end end if s1.last r1 = instantiate_node(ParseTree::InterfaceMembers,input, i1...index, s1) r1.extend(InterfaceMembers0) else @index = i1 r1 = nil end if r1 r0 = r1 else r0 = instantiate_node(SyntaxNode,input, index...index) end node_cache[:InterfaceMembers][start_index] = r0 r0 end def _nt_InterfaceMember start_index = index if node_cache[:InterfaceMember].has_key?(index) cached = node_cache[:InterfaceMember][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_Const if r1 r0 = r1 else r2 = _nt_AttributeOrOperation if r2 r0 = r2 else @index = i0 r0 = nil end end node_cache[:InterfaceMember][start_index] = r0 r0 end module Exception0 def ws1 elements[1] end def name elements[2] end def ws2 elements[3] end def ws3 elements[5] end def members elements[6] end def ws4 elements[7] end def ws5 elements[9] end end def _nt_Exception start_index = index if node_cache[:Exception].has_key?(index) cached = node_cache[:Exception][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if has_terminal?("exception", false, index) r1 = instantiate_node(SyntaxNode,input, index...(index + 9)) @index += 9 else terminal_parse_failure("exception") r1 = nil end s0 << r1 if r1 r2 = _nt_ws s0 << r2 if r2 r3 = _nt_identifier s0 << r3 if r3 r4 = _nt_ws s0 << r4 if r4 if has_terminal?("{", false, index) r5 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("{") r5 = nil end s0 << r5 if r5 r6 = _nt_ws s0 << r6 if r6 r7 = _nt_ExceptionMembers s0 << r7 if r7 r8 = _nt_ws s0 << r8 if r8 if has_terminal?("}", false, index) r9 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("}") r9 = nil end s0 << r9 if r9 r10 = _nt_ws s0 << r10 if r10 if has_terminal?(";", false, index) r11 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(";") r11 = nil end s0 << r11 end end end end end end end end end end if s0.last r0 = instantiate_node(ParseTree::Exception,input, i0...index, s0) r0.extend(Exception0) else @index = i0 r0 = nil end node_cache[:Exception][start_index] = r0 r0 end module ExceptionMembers0 def eal elements[0] end def ws1 elements[1] end def member elements[2] end def ws2 elements[3] end def members elements[4] end def ws3 elements[5] end end def _nt_ExceptionMembers start_index = index if node_cache[:ExceptionMembers].has_key?(index) cached = node_cache[:ExceptionMembers][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i1, s1 = index, [] r2 = _nt_ExtendedAttributeList s1 << r2 if r2 r3 = _nt_ws s1 << r3 if r3 r4 = _nt_ExceptionMember s1 << r4 if r4 r5 = _nt_ws s1 << r5 if r5 r6 = _nt_ExceptionMembers s1 << r6 if r6 r7 = _nt_ws s1 << r7 end end end end end if s1.last r1 = instantiate_node(ParseTree::InterfaceMembers,input, i1...index, s1) r1.extend(ExceptionMembers0) else @index = i1 r1 = nil end if r1 r0 = r1 else r0 = instantiate_node(SyntaxNode,input, index...index) end node_cache[:ExceptionMembers][start_index] = r0 r0 end module TypeDef0 def ws1 elements[1] end def type elements[2] end def ws2 elements[3] end def name elements[4] end def ws3 elements[5] end end def _nt_TypeDef start_index = index if node_cache[:TypeDef].has_key?(index) cached = node_cache[:TypeDef][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if has_terminal?("typedef", false, index) r1 = instantiate_node(SyntaxNode,input, index...(index + 7)) @index += 7 else terminal_parse_failure("typedef") r1 = nil end s0 << r1 if r1 r2 = _nt_ws s0 << r2 if r2 r3 = _nt_Type s0 << r3 if r3 r4 = _nt_ws s0 << r4 if r4 r5 = _nt_identifier s0 << r5 if r5 r6 = _nt_ws s0 << r6 if r6 if has_terminal?(";", false, index) r7 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(";") r7 = nil end s0 << r7 end end end end end end if s0.last r0 = instantiate_node(ParseTree::TypeDef,input, i0...index, s0) r0.extend(TypeDef0) else @index = i0 r0 = nil end node_cache[:TypeDef][start_index] = r0 r0 end module ImplementsStatement0 def implementor elements[0] end def ws1 elements[1] end def ws2 elements[3] end def implementee elements[4] end def ws3 elements[5] end end def _nt_ImplementsStatement start_index = index if node_cache[:ImplementsStatement].has_key?(index) cached = node_cache[:ImplementsStatement][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_ScopedName s0 << r1 if r1 r2 = _nt_ws s0 << r2 if r2 if has_terminal?("implements", false, index) r3 = instantiate_node(SyntaxNode,input, index...(index + 10)) @index += 10 else terminal_parse_failure("implements") r3 = nil end s0 << r3 if r3 r4 = _nt_ws s0 << r4 if r4 r5 = _nt_ScopedName s0 << r5 if r5 r6 = _nt_ws s0 << r6 if r6 if has_terminal?(";", false, index) r7 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(";") r7 = nil end s0 << r7 end end end end end end if s0.last r0 = instantiate_node(ParseTree::ImplementsStatement,input, i0...index, s0) r0.extend(ImplementsStatement0) else @index = i0 r0 = nil end node_cache[:ImplementsStatement][start_index] = r0 r0 end module Const0 def ws1 elements[1] end def type elements[2] end def ws2 elements[3] end def name elements[4] end def ws3 elements[5] end def ws4 elements[7] end def const_expr elements[8] end def ws5 elements[9] end end def _nt_Const start_index = index if node_cache[:Const].has_key?(index) cached = node_cache[:Const][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if has_terminal?("const", false, index) r1 = instantiate_node(SyntaxNode,input, index...(index + 5)) @index += 5 else terminal_parse_failure("const") r1 = nil end s0 << r1 if r1 r2 = _nt_ws s0 << r2 if r2 r3 = _nt_Type s0 << r3 if r3 r4 = _nt_ws s0 << r4 if r4 r5 = _nt_identifier s0 << r5 if r5 r6 = _nt_ws s0 << r6 if r6 if has_terminal?("=", false, index) r7 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("=") r7 = nil end s0 << r7 if r7 r8 = _nt_ws s0 << r8 if r8 r9 = _nt_ConstExpr s0 << r9 if r9 r10 = _nt_ws s0 << r10 if r10 if has_terminal?(";", false, index) r11 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(";") r11 = nil end s0 << r11 end end end end end end end end end end if s0.last r0 = instantiate_node(ParseTree::Const,input, i0...index, s0) r0.extend(Const0) else @index = i0 r0 = nil end node_cache[:Const][start_index] = r0 r0 end def _nt_ConstExpr start_index = index if node_cache[:ConstExpr].has_key?(index) cached = node_cache[:ConstExpr][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_BooleanLiteral if r1 r0 = r1 else r2 = _nt_integer if r2 r0 = r2 else r3 = _nt_float if r3 r0 = r3 else @index = i0 r0 = nil end end end node_cache[:ConstExpr][start_index] = r0 r0 end module BooleanLiteral0 def build() text_value == "true" end end def _nt_BooleanLiteral start_index = index if node_cache[:BooleanLiteral].has_key?(index) cached = node_cache[:BooleanLiteral][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index if has_terminal?("true", false, index) r1 = instantiate_node(SyntaxNode,input, index...(index + 4)) @index += 4 else terminal_parse_failure("true") r1 = nil end if r1 r0 = r1 r0.extend(BooleanLiteral0) else if has_terminal?("false", false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 5)) @index += 5 else terminal_parse_failure("false") r2 = nil end if r2 r0 = r2 r0.extend(BooleanLiteral0) else @index = i0 r0 = nil end end node_cache[:BooleanLiteral][start_index] = r0 r0 end def _nt_AttributeOrOperation start_index = index if node_cache[:AttributeOrOperation].has_key?(index) cached = node_cache[:AttributeOrOperation][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_StringifierAttributeOrOperation if r1 r0 = r1 else r2 = _nt_Attribute if r2 r0 = r2 else r3 = _nt_Operation if r3 r0 = r3 else @index = i0 r0 = nil end end end node_cache[:AttributeOrOperation][start_index] = r0 r0 end module StringifierAttributeOrOperation0 def ws elements[1] end def a_or_op elements[2] end end def _nt_StringifierAttributeOrOperation start_index = index if node_cache[:StringifierAttributeOrOperation].has_key?(index) cached = node_cache[:StringifierAttributeOrOperation][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if has_terminal?("stringifier", false, index) r1 = instantiate_node(SyntaxNode,input, index...(index + 11)) @index += 11 else terminal_parse_failure("stringifier") r1 = nil end s0 << r1 if r1 r2 = _nt_ws s0 << r2 if r2 i3 = index r4 = _nt_Attribute if r4 r3 = r4 else r5 = _nt_OperationRest if r5 r3 = 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 r3 = r6 else @index = i3 r3 = nil end end end s0 << r3 end end if s0.last r0 = instantiate_node(ParseTree::StringifierAttributeOrOperation,input, i0...index, s0) r0.extend(StringifierAttributeOrOperation0) else @index = i0 r0 = nil end node_cache[:StringifierAttributeOrOperation][start_index] = r0 r0 end module Attribute0 def readonly elements[0] end def ws1 elements[1] end def ws2 elements[3] end def type elements[4] end def ws3 elements[5] end def name elements[6] end def ws4 elements[7] end def getraises elements[8] end def ws5 elements[9] end def setraises elements[10] end def ws6 elements[11] end end def _nt_Attribute start_index = index if node_cache[:Attribute].has_key?(index) cached = node_cache[:Attribute][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_ReadOnly s0 << r1 if r1 r2 = _nt_ws s0 << r2 if r2 if has_terminal?("attribute", false, index) r3 = instantiate_node(SyntaxNode,input, index...(index + 9)) @index += 9 else terminal_parse_failure("attribute") r3 = nil end s0 << r3 if r3 r4 = _nt_ws s0 << r4 if r4 r5 = _nt_Type s0 << r5 if r5 r6 = _nt_ws s0 << r6 if r6 r7 = _nt_identifier s0 << r7 if r7 r8 = _nt_ws s0 << r8 if r8 r9 = _nt_GetRaises s0 << r9 if r9 r10 = _nt_ws s0 << r10 if r10 r11 = _nt_SetRaises s0 << r11 if r11 r12 = _nt_ws s0 << r12 if r12 if has_terminal?(";", false, index) r13 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(";") r13 = nil end s0 << r13 end end end end end end end end end end end end if s0.last r0 = instantiate_node(ParseTree::Attribute,input, i0...index, s0) r0.extend(Attribute0) else @index = i0 r0 = nil end node_cache[:Attribute][start_index] = r0 r0 end def _nt_ReadOnly start_index = index if node_cache[:ReadOnly].has_key?(index) cached = node_cache[:ReadOnly][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if has_terminal?("readonly", false, index) r1 = instantiate_node(SyntaxNode,input, index...(index + 8)) @index += 8 else terminal_parse_failure("readonly") r1 = nil end if r1 r0 = r1 else r0 = instantiate_node(SyntaxNode,input, index...index) end node_cache[:ReadOnly][start_index] = r0 r0 end module GetRaises0 def ws elements[1] end def list elements[2] end end def _nt_GetRaises start_index = index if node_cache[:GetRaises].has_key?(index) cached = node_cache[:GetRaises][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i1, s1 = index, [] if has_terminal?("getraises", false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 9)) @index += 9 else terminal_parse_failure("getraises") r2 = nil end s1 << r2 if r2 r3 = _nt_ws s1 << r3 if r3 r4 = _nt_ExceptionList s1 << r4 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(GetRaises0) else @index = i1 r1 = nil end if r1 r0 = r1 else r0 = instantiate_node(SyntaxNode,input, index...index) end node_cache[:GetRaises][start_index] = r0 r0 end module SetRaises0 def ws elements[1] end def list elements[2] end end def _nt_SetRaises start_index = index if node_cache[:SetRaises].has_key?(index) cached = node_cache[:SetRaises][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i1, s1 = index, [] if has_terminal?("setraises", false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 9)) @index += 9 else terminal_parse_failure("setraises") r2 = nil end s1 << r2 if r2 r3 = _nt_ws s1 << r3 if r3 r4 = _nt_ExceptionList s1 << r4 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(SetRaises0) else @index = i1 r1 = nil end if r1 r0 = r1 else r0 = instantiate_node(SyntaxNode,input, index...index) end node_cache[:SetRaises][start_index] = r0 r0 end module Operation0 def specials elements[0] end def ws elements[1] end def op elements[2] end end def _nt_Operation start_index = index if node_cache[:Operation].has_key?(index) cached = node_cache[:Operation][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] i1 = index r2 = _nt_OmittableSpecials if r2 r1 = r2 else r3 = _nt_Specials if r3 r1 = r3 else @index = i1 r1 = nil end end s0 << r1 if r1 r4 = _nt_ws s0 << r4 if r4 r5 = _nt_OperationRest s0 << r5 end end if s0.last r0 = instantiate_node(ParseTree::Operation,input, i0...index, s0) r0.extend(Operation0) else @index = i0 r0 = nil end node_cache[:Operation][start_index] = r0 r0 end module OmittableSpecials0 def omit elements[0] end def ws elements[1] end def Specials elements[2] end end def _nt_OmittableSpecials start_index = index if node_cache[:OmittableSpecials].has_key?(index) cached = node_cache[:OmittableSpecials][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if has_terminal?("omittable", false, index) r1 = instantiate_node(SyntaxNode,input, index...(index + 9)) @index += 9 else terminal_parse_failure("omittable") r1 = nil end s0 << r1 if r1 r2 = _nt_ws s0 << r2 if r2 r3 = _nt_Specials s0 << r3 end end if s0.last r0 = instantiate_node(ParseTree::OmittableSpecials,input, i0...index, s0) r0.extend(OmittableSpecials0) else @index = i0 r0 = nil end node_cache[:OmittableSpecials][start_index] = r0 r0 end module Specials0 def first elements[0] end def ws elements[1] end def rest elements[2] end end def _nt_Specials start_index = index if node_cache[:Specials].has_key?(index) cached = node_cache[:Specials][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i1, s1 = index, [] r2 = _nt_Special s1 << r2 if r2 r3 = _nt_ws s1 << r3 if r3 r4 = _nt_Specials s1 << r4 end end if s1.last r1 = instantiate_node(ParseTree::Specials,input, i1...index, s1) r1.extend(Specials0) else @index = i1 r1 = nil end if r1 r0 = r1 else r0 = instantiate_node(SyntaxNode,input, index...index) end node_cache[:Specials][start_index] = r0 r0 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 = index if has_terminal?("getter", false, index) r1 = instantiate_node(SyntaxNode,input, index...(index + 6)) @index += 6 else terminal_parse_failure("getter") r1 = nil end if r1 r0 = r1 else if has_terminal?("setter", false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 6)) @index += 6 else terminal_parse_failure("setter") r2 = nil end if r2 r0 = r2 else if has_terminal?("creator", false, index) r3 = instantiate_node(SyntaxNode,input, index...(index + 7)) @index += 7 else terminal_parse_failure("creator") r3 = nil end if r3 r0 = r3 else if has_terminal?("deleter", false, index) r4 = instantiate_node(SyntaxNode,input, index...(index + 7)) @index += 7 else terminal_parse_failure("deleter") r4 = nil end if r4 r0 = r4 else if has_terminal?("caller", false, index) r5 = instantiate_node(SyntaxNode,input, index...(index + 6)) @index += 6 else terminal_parse_failure("caller") r5 = nil end if r5 r0 = r5 else @index = i0 r0 = nil end end end end end node_cache[:Special][start_index] = r0 r0 end module OperationRest0 def type elements[0] end def ws1 elements[1] end def optional_id elements[2] end def ws2 elements[3] end def ws3 elements[5] end def args elements[6] end def ws4 elements[7] end def ws5 elements[9] end def raises elements[10] end def ws6 elements[11] end end def _nt_OperationRest start_index = index if node_cache[:OperationRest].has_key?(index) cached = node_cache[:OperationRest][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_ReturnType s0 << r1 if r1 r2 = _nt_ws s0 << r2 if r2 r3 = _nt_OptionalIdentifier s0 << r3 if r3 r4 = _nt_ws s0 << r4 if r4 if has_terminal?("(", false, index) r5 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("(") r5 = nil end s0 << r5 if r5 r6 = _nt_ws s0 << r6 if r6 r7 = _nt_ArgumentList s0 << r7 if r7 r8 = _nt_ws s0 << r8 if r8 if has_terminal?(")", false, index) r9 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(")") r9 = nil end s0 << r9 if r9 r10 = _nt_ws s0 << r10 if r10 r11 = _nt_Raises s0 << r11 if r11 r12 = _nt_ws s0 << r12 if r12 if has_terminal?(";", false, index) r13 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(";") r13 = nil end s0 << r13 end end end end end end end end end end end end if s0.last r0 = instantiate_node(ParseTree::Operation,input, i0...index, s0) r0.extend(OperationRest0) else @index = i0 r0 = nil end node_cache[:OperationRest][start_index] = r0 r0 end def _nt_OptionalIdentifier start_index = index if node_cache[:OptionalIdentifier].has_key?(index) cached = node_cache[:OptionalIdentifier][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r1 = _nt_identifier if r1 r0 = r1 else r0 = instantiate_node(SyntaxNode,input, index...index) end node_cache[:OptionalIdentifier][start_index] = r0 r0 end module Raises0 def ExceptionList elements[1] end end def _nt_Raises start_index = index if node_cache[:Raises].has_key?(index) cached = node_cache[:Raises][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i1, s1 = index, [] if has_terminal?("raises", false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 6)) @index += 6 else terminal_parse_failure("raises") r2 = nil end s1 << r2 if r2 r3 = _nt_ExceptionList s1 << r3 end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(Raises0) else @index = i1 r1 = nil end if r1 r0 = r1 else r0 = instantiate_node(SyntaxNode,input, index...index) end node_cache[:Raises][start_index] = r0 r0 end module ExceptionList0 def ScopedNameList elements[1] end end def _nt_ExceptionList start_index = index if node_cache[:ExceptionList].has_key?(index) cached = node_cache[:ExceptionList][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if has_terminal?("(", false, index) r1 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("(") r1 = nil end s0 << r1 if r1 r2 = _nt_ScopedNameList s0 << r2 if r2 if has_terminal?(")", false, index) r3 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(")") r3 = nil end s0 << r3 end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ExceptionList0) else @index = i0 r0 = nil end node_cache[:ExceptionList][start_index] = r0 r0 end module ArgumentList0 def arg elements[0] end def ws elements[1] end def args elements[2] end end def _nt_ArgumentList start_index = index if node_cache[:ArgumentList].has_key?(index) cached = node_cache[:ArgumentList][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i1, s1 = index, [] r2 = _nt_Argument s1 << r2 if r2 r3 = _nt_ws s1 << r3 if r3 r4 = _nt_Arguments s1 << r4 end end if s1.last r1 = instantiate_node(ParseTree::ArgumentList,input, i1...index, s1) r1.extend(ArgumentList0) else @index = i1 r1 = nil end if r1 r0 = r1 else r0 = instantiate_node(SyntaxNode,input, index...index) end node_cache[:ArgumentList][start_index] = r0 r0 end module Arguments0 def ws1 elements[1] end def arg elements[2] end def ws2 elements[3] end def args elements[4] end end def _nt_Arguments start_index = index if node_cache[:Arguments].has_key?(index) cached = node_cache[:Arguments][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i1, s1 = index, [] if has_terminal?(",", false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(",") r2 = nil end s1 << r2 if r2 r3 = _nt_ws s1 << r3 if r3 r4 = _nt_Argument s1 << r4 if r4 r5 = _nt_ws s1 << r5 if r5 r6 = _nt_Arguments s1 << r6 end end end end if s1.last r1 = instantiate_node(ParseTree::ArgumentList,input, i1...index, s1) r1.extend(Arguments0) else @index = i1 r1 = nil end if r1 r0 = r1 else r0 = instantiate_node(SyntaxNode,input, index...index) end node_cache[:Arguments][start_index] = r0 r0 end module Argument0 def eal elements[0] end def ws1 elements[1] end def In elements[2] end def ws2 elements[3] end def optional elements[4] end def ws3 elements[5] end def type elements[6] end def ws4 elements[7] end def variadic elements[8] end def ws5 elements[9] end def id elements[10] end end def _nt_Argument start_index = index if node_cache[:Argument].has_key?(index) cached = node_cache[:Argument][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_ExtendedAttributeList s0 << r1 if r1 r2 = _nt_ws s0 << r2 if r2 r3 = _nt_In s0 << r3 if r3 r4 = _nt_ws s0 << r4 if r4 r5 = _nt_Optional s0 << r5 if r5 r6 = _nt_ws s0 << r6 if r6 r7 = _nt_Type s0 << r7 if r7 r8 = _nt_ws s0 << r8 if r8 r9 = _nt_Ellipsis s0 << r9 if r9 r10 = _nt_ws s0 << r10 if r10 r11 = _nt_identifier s0 << r11 end end end end end end end end end end if s0.last r0 = instantiate_node(ParseTree::Argument,input, i0...index, s0) r0.extend(Argument0) else @index = i0 r0 = nil end node_cache[:Argument][start_index] = r0 r0 end def _nt_In start_index = index if node_cache[:In].has_key?(index) cached = node_cache[:In][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if has_terminal?("in", false, index) r1 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure("in") r1 = nil end if r1 r0 = r1 else r0 = instantiate_node(SyntaxNode,input, index...index) end node_cache[:In][start_index] = r0 r0 end def _nt_Optional start_index = index if node_cache[:Optional].has_key?(index) cached = node_cache[:Optional][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if has_terminal?("optional", false, index) r1 = instantiate_node(SyntaxNode,input, index...(index + 8)) @index += 8 else terminal_parse_failure("optional") r1 = nil end if r1 r0 = r1 else r0 = instantiate_node(SyntaxNode,input, index...index) end node_cache[:Optional][start_index] = r0 r0 end def _nt_Ellipsis start_index = index if node_cache[:Ellipsis].has_key?(index) cached = node_cache[:Ellipsis][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) r1 = instantiate_node(SyntaxNode,input, index...(index + 3)) @index += 3 else terminal_parse_failure("...") r1 = nil end if r1 r0 = r1 else r0 = instantiate_node(SyntaxNode,input, index...index) end node_cache[:Ellipsis][start_index] = r0 r0 end def _nt_ExceptionMember start_index = index if node_cache[:ExceptionMember].has_key?(index) cached = node_cache[:ExceptionMember][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_Const if r1 r0 = r1 else r2 = _nt_ExceptionField if r2 r0 = r2 else @index = i0 r0 = nil end end node_cache[:ExceptionMember][start_index] = r0 r0 end module ExceptionField0 def type elements[0] end def ws1 elements[1] end def id elements[2] end def ws2 elements[3] end end def _nt_ExceptionField start_index = index if node_cache[:ExceptionField].has_key?(index) cached = node_cache[:ExceptionField][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_Type s0 << r1 if r1 r2 = _nt_ws s0 << r2 if r2 r3 = _nt_identifier s0 << r3 if r3 r4 = _nt_ws s0 << r4 if r4 if has_terminal?(";", false, index) r5 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(";") r5 = nil end s0 << r5 end end end end if s0.last r0 = instantiate_node(ParseTree::ExceptionField,input, i0...index, s0) r0.extend(ExceptionField0) else @index = i0 r0 = nil end node_cache[:ExceptionField][start_index] = r0 r0 end module ExtendedAttributeList0 def ws1 elements[1] end def attribute elements[2] end def ws2 elements[3] end def attributes elements[4] end def ws3 elements[5] end end def _nt_ExtendedAttributeList start_index = index if node_cache[:ExtendedAttributeList].has_key?(index) cached = node_cache[:ExtendedAttributeList][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i1, s1 = index, [] if has_terminal?("[", false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("[") r2 = nil end s1 << r2 if r2 r3 = _nt_ws s1 << r3 if r3 r4 = _nt_ExtendedAttribute s1 << r4 if r4 r5 = _nt_ws s1 << r5 if r5 r6 = _nt_ExtendedAttributes s1 << r6 if r6 r7 = _nt_ws s1 << r7 if r7 if has_terminal?("]", false, index) r8 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("]") r8 = nil end s1 << r8 end end end end end end if s1.last r1 = instantiate_node(ParseTree::ExtendedAttributeList,input, i1...index, s1) r1.extend(ExtendedAttributeList0) else @index = i1 r1 = nil end if r1 r0 = r1 else r0 = instantiate_node(SyntaxNode,input, index...index) end node_cache[:ExtendedAttributeList][start_index] = r0 r0 end module ExtendedAttributes0 def ws1 elements[1] end def attribute elements[2] end def ws2 elements[3] end def attributes elements[4] end end def _nt_ExtendedAttributes start_index = index if node_cache[:ExtendedAttributes].has_key?(index) cached = node_cache[:ExtendedAttributes][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i1, s1 = index, [] if has_terminal?(",", false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(",") r2 = nil end s1 << r2 if r2 r3 = _nt_ws s1 << r3 if r3 r4 = _nt_ExtendedAttribute s1 << r4 if r4 r5 = _nt_ws s1 << r5 if r5 r6 = _nt_ExtendedAttributes s1 << r6 end end end end if s1.last r1 = instantiate_node(ParseTree::ExtendedAttributeList,input, i1...index, s1) r1.extend(ExtendedAttributes0) else @index = i1 r1 = nil end if r1 r0 = r1 else r0 = instantiate_node(SyntaxNode,input, index...index) end node_cache[:ExtendedAttributes][start_index] = r0 r0 end def _nt_ExtendedAttribute start_index = index if node_cache[:ExtendedAttribute].has_key?(index) cached = node_cache[:ExtendedAttribute][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_ExtendedAttributeNamedArgList if r1 r0 = r1 else r2 = _nt_ExtendedAttributeIdent if r2 r0 = r2 else r3 = _nt_ExtendedAttributeScopedName if r3 r0 = r3 else r4 = _nt_ExtendedAttributeArgList if r4 r0 = r4 else r5 = _nt_ExtendedAttributeNoArg if r5 r0 = r5 else @index = i0 r0 = nil end end end end end node_cache[:ExtendedAttribute][start_index] = r0 r0 end module ExtendedAttributeNoArg0 def build(parent) Ast::ExtendedAttribute.new(text_value) end end def _nt_ExtendedAttributeNoArg start_index = index if node_cache[:ExtendedAttributeNoArg].has_key?(index) cached = node_cache[:ExtendedAttributeNoArg][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier r0.extend(ExtendedAttributeNoArg0) node_cache[:ExtendedAttributeNoArg][start_index] = r0 r0 end module ExtendedAttributeArgList0 def name elements[0] end def ws1 elements[2] end def args elements[3] end def ws2 elements[4] end end def _nt_ExtendedAttributeArgList start_index = index if node_cache[:ExtendedAttributeArgList].has_key?(index) cached = node_cache[:ExtendedAttributeArgList][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_identifier s0 << r1 if r1 if has_terminal?("(", false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("(") r2 = nil end s0 << r2 if r2 r3 = _nt_ws s0 << r3 if r3 r4 = _nt_ArgumentList s0 << r4 if r4 r5 = _nt_ws s0 << r5 if r5 if has_terminal?(")", false, index) r6 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(")") r6 = nil end s0 << r6 end end end end end if s0.last r0 = instantiate_node(ParseTree::ExtendedAttributeArgList,input, i0...index, s0) r0.extend(ExtendedAttributeArgList0) else @index = i0 r0 = nil end node_cache[:ExtendedAttributeArgList][start_index] = r0 r0 end module ExtendedAttributeScopedName0 def key elements[0] end def scoped_name elements[2] end end def _nt_ExtendedAttributeScopedName start_index = index if node_cache[:ExtendedAttributeScopedName].has_key?(index) cached = node_cache[:ExtendedAttributeScopedName][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_identifier s0 << r1 if r1 if has_terminal?("=", false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("=") r2 = nil end s0 << r2 if r2 r3 = _nt_ScopedName s0 << r3 end end if s0.last r0 = instantiate_node(ParseTree::ExtendedAttributeScopedName,input, i0...index, s0) r0.extend(ExtendedAttributeScopedName0) else @index = i0 r0 = nil end node_cache[:ExtendedAttributeScopedName][start_index] = r0 r0 end module ExtendedAttributeIdent0 def key elements[0] end def value elements[2] end end def _nt_ExtendedAttributeIdent start_index = index if node_cache[:ExtendedAttributeIdent].has_key?(index) cached = node_cache[:ExtendedAttributeIdent][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_identifier s0 << r1 if r1 if has_terminal?("=", false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("=") r2 = nil end s0 << r2 if r2 r3 = _nt_identifier s0 << r3 if r3 i4 = index if has_terminal?("::", false, index) r5 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure("::") r5 = nil end if r5 r4 = nil else @index = i4 r4 = instantiate_node(SyntaxNode,input, index...index) end s0 << r4 end end end if s0.last r0 = instantiate_node(ParseTree::ExtendedAttributeIdent,input, i0...index, s0) r0.extend(ExtendedAttributeIdent0) else @index = i0 r0 = nil end node_cache[:ExtendedAttributeIdent][start_index] = r0 r0 end module ExtendedAttributeNamedArgList0 def name elements[0] end def ws1 elements[2] end def args elements[3] end def ws2 elements[4] end end module ExtendedAttributeNamedArgList1 def key elements[0] end def value elements[2] end end def _nt_ExtendedAttributeNamedArgList start_index = index if node_cache[:ExtendedAttributeNamedArgList].has_key?(index) cached = node_cache[:ExtendedAttributeNamedArgList][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_identifier s0 << r1 if r1 if has_terminal?("=", false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("=") r2 = nil end s0 << r2 if r2 i3, s3 = index, [] r4 = _nt_identifier s3 << r4 if r4 if has_terminal?("(", false, index) r5 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("(") r5 = nil end s3 << r5 if r5 r6 = _nt_ws s3 << r6 if r6 r7 = _nt_ArgumentList s3 << r7 if r7 r8 = _nt_ws s3 << r8 if r8 if has_terminal?(")", false, index) r9 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(")") r9 = nil end s3 << r9 end end end end end if s3.last r3 = instantiate_node(ParseTree::ExtendedAttributeArgList,input, i3...index, s3) r3.extend(ExtendedAttributeNamedArgList0) else @index = i3 r3 = nil end s0 << r3 end end if s0.last r0 = instantiate_node(ParseTree::ExtendedAttributeNamedArgList,input, i0...index, s0) r0.extend(ExtendedAttributeNamedArgList1) else @index = i0 r0 = nil end node_cache[:ExtendedAttributeNamedArgList][start_index] = r0 r0 end def _nt_Other start_index = index if node_cache[:Other].has_key?(index) cached = node_cache[:Other][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_integer if r1 r0 = r1 else r2 = _nt_float if r2 r0 = r2 else r3 = _nt_identifier if r3 r0 = r3 else r4 = _nt_string if r4 r0 = r4 else r5 = _nt_other if r5 r0 = r5 else if has_terminal?("...", false, index) r6 = instantiate_node(SyntaxNode,input, index...(index + 3)) @index += 3 else terminal_parse_failure("...") r6 = nil end if r6 r0 = 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 r0 = r7 else if has_terminal?("::", false, index) r8 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure("::") r8 = nil end if r8 r0 = 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 r0 = r9 else if has_terminal?("<", false, index) r10 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("<") r10 = nil end if r10 r0 = r10 else if has_terminal?("=", false, index) r11 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("=") r11 = nil end if r11 r0 = r11 else if has_terminal?(">", false, index) r12 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(">") r12 = nil end if r12 r0 = r12 else if has_terminal?("?", false, index) r13 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("?") r13 = nil end if r13 r0 = r13 else if has_terminal?("false", false, index) r14 = instantiate_node(SyntaxNode,input, index...(index + 5)) @index += 5 else terminal_parse_failure("false") r14 = nil end if r14 r0 = r14 else if has_terminal?("object", false, index) r15 = instantiate_node(SyntaxNode,input, index...(index + 6)) @index += 6 else terminal_parse_failure("object") r15 = nil end if r15 r0 = r15 else if has_terminal?("true", false, index) r16 = instantiate_node(SyntaxNode,input, index...(index + 4)) @index += 4 else terminal_parse_failure("true") r16 = nil end if r16 r0 = r16 else if has_terminal?("any", false, index) r17 = instantiate_node(SyntaxNode,input, index...(index + 3)) @index += 3 else terminal_parse_failure("any") r17 = nil end if r17 r0 = r17 else if has_terminal?("attribute", false, index) r18 = instantiate_node(SyntaxNode,input, index...(index + 9)) @index += 9 else terminal_parse_failure("attribute") r18 = nil end if r18 r0 = r18 else if has_terminal?("boolean", false, index) r19 = instantiate_node(SyntaxNode,input, index...(index + 7)) @index += 7 else terminal_parse_failure("boolean") r19 = nil end if r19 r0 = r19 else if has_terminal?("caller", false, index) r20 = instantiate_node(SyntaxNode,input, index...(index + 6)) @index += 6 else terminal_parse_failure("caller") r20 = nil end if r20 r0 = r20 else if has_terminal?("const", false, index) r21 = instantiate_node(SyntaxNode,input, index...(index + 5)) @index += 5 else terminal_parse_failure("const") r21 = nil end if r21 r0 = r21 else if has_terminal?("creator", false, index) r22 = instantiate_node(SyntaxNode,input, index...(index + 7)) @index += 7 else terminal_parse_failure("creator") r22 = nil end if r22 r0 = r22 else if has_terminal?("deleter", false, index) r23 = instantiate_node(SyntaxNode,input, index...(index + 7)) @index += 7 else terminal_parse_failure("deleter") r23 = nil end if r23 r0 = r23 else if has_terminal?("double", false, index) r24 = instantiate_node(SyntaxNode,input, index...(index + 6)) @index += 6 else terminal_parse_failure("double") r24 = nil end if r24 r0 = r24 else if has_terminal?("exception", false, index) r25 = instantiate_node(SyntaxNode,input, index...(index + 9)) @index += 9 else terminal_parse_failure("exception") r25 = nil end if r25 r0 = r25 else if has_terminal?("float", false, index) r26 = instantiate_node(SyntaxNode,input, index...(index + 5)) @index += 5 else terminal_parse_failure("float") r26 = nil end if r26 r0 = r26 else if has_terminal?("getraises", false, index) r27 = instantiate_node(SyntaxNode,input, index...(index + 9)) @index += 9 else terminal_parse_failure("getraises") r27 = nil end if r27 r0 = r27 else if has_terminal?("getter", false, index) r28 = instantiate_node(SyntaxNode,input, index...(index + 6)) @index += 6 else terminal_parse_failure("getter") r28 = nil end if r28 r0 = r28 else if has_terminal?("implements", false, index) r29 = instantiate_node(SyntaxNode,input, index...(index + 10)) @index += 10 else terminal_parse_failure("implements") r29 = nil end if r29 r0 = r29 else if has_terminal?("in", false, index) r30 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure("in") r30 = nil end if r30 r0 = r30 else if has_terminal?("interface", false, index) r31 = instantiate_node(SyntaxNode,input, index...(index + 9)) @index += 9 else terminal_parse_failure("interface") r31 = nil end if r31 r0 = r31 else if has_terminal?("long", false, index) r32 = instantiate_node(SyntaxNode,input, index...(index + 4)) @index += 4 else terminal_parse_failure("long") r32 = nil end if r32 r0 = r32 else if has_terminal?("module", false, index) r33 = instantiate_node(SyntaxNode,input, index...(index + 6)) @index += 6 else terminal_parse_failure("module") r33 = nil end if r33 r0 = r33 else if has_terminal?("octet", false, index) r34 = instantiate_node(SyntaxNode,input, index...(index + 5)) @index += 5 else terminal_parse_failure("octet") r34 = nil end if r34 r0 = r34 else if has_terminal?("omittable", false, index) r35 = instantiate_node(SyntaxNode,input, index...(index + 9)) @index += 9 else terminal_parse_failure("omittable") r35 = nil end if r35 r0 = r35 else if has_terminal?("optional", false, index) r36 = instantiate_node(SyntaxNode,input, index...(index + 8)) @index += 8 else terminal_parse_failure("optional") r36 = nil end if r36 r0 = r36 else if has_terminal?("raises", false, index) r37 = instantiate_node(SyntaxNode,input, index...(index + 6)) @index += 6 else terminal_parse_failure("raises") r37 = nil end if r37 r0 = r37 else if has_terminal?("sequence", false, index) r38 = instantiate_node(SyntaxNode,input, index...(index + 8)) @index += 8 else terminal_parse_failure("sequence") r38 = nil end if r38 r0 = r38 else if has_terminal?("setraises", false, index) r39 = instantiate_node(SyntaxNode,input, index...(index + 9)) @index += 9 else terminal_parse_failure("setraises") r39 = nil end if r39 r0 = r39 else if has_terminal?("setter", false, index) r40 = instantiate_node(SyntaxNode,input, index...(index + 6)) @index += 6 else terminal_parse_failure("setter") r40 = nil end if r40 r0 = r40 else if has_terminal?("short", false, index) r41 = instantiate_node(SyntaxNode,input, index...(index + 5)) @index += 5 else terminal_parse_failure("short") r41 = nil end if r41 r0 = r41 else if has_terminal?("DOMString", false, index) r42 = instantiate_node(SyntaxNode,input, index...(index + 9)) @index += 9 else terminal_parse_failure("DOMString") r42 = nil end if r42 r0 = r42 else if has_terminal?("stringifier", false, index) r43 = instantiate_node(SyntaxNode,input, index...(index + 11)) @index += 11 else terminal_parse_failure("stringifier") r43 = nil end if r43 r0 = r43 else if has_terminal?("typedef", false, index) r44 = instantiate_node(SyntaxNode,input, index...(index + 7)) @index += 7 else terminal_parse_failure("typedef") r44 = nil end if r44 r0 = r44 else if has_terminal?("unsigned", false, index) r45 = instantiate_node(SyntaxNode,input, index...(index + 8)) @index += 8 else terminal_parse_failure("unsigned") r45 = nil end if r45 r0 = r45 else if has_terminal?("void", false, index) r46 = instantiate_node(SyntaxNode,input, index...(index + 4)) @index += 4 else terminal_parse_failure("void") r46 = nil end if r46 r0 = r46 else @index = i0 r0 = nil end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end node_cache[:Other][start_index] = r0 r0 end def _nt_OtherOrComma start_index = index if node_cache[:OtherOrComma].has_key?(index) cached = node_cache[:OtherOrComma][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_Other if r1 r0 = r1 else if has_terminal?(",", false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(",") r2 = nil end if r2 r0 = r2 else @index = i0 r0 = nil end end node_cache[:OtherOrComma][start_index] = r0 r0 end module Type0 def type elements[0] end def array elements[1] end end def _nt_Type start_index = index if node_cache[:Type].has_key?(index) cached = node_cache[:Type][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] i1 = index r2 = _nt_NullableType if r2 r1 = r2 else r3 = _nt_ScopedName if r3 r1 = r3 else if has_terminal?("any", false, index) r4 = instantiate_node(SyntaxNode,input, index...(index + 3)) @index += 3 else terminal_parse_failure("any") r4 = nil end if r4 r1 = r4 else if has_terminal?("object", false, index) r5 = instantiate_node(SyntaxNode,input, index...(index + 6)) @index += 6 else terminal_parse_failure("object") r5 = nil end if r5 r1 = r5 else @index = i1 r1 = nil end end end end s0 << r1 if r1 r6 = _nt_Array s0 << r6 end if s0.last r0 = instantiate_node(ParseTree::Type,input, i0...index, s0) r0.extend(Type0) else @index = i0 r0 = nil end node_cache[:Type][start_index] = r0 r0 end module NullableType0 def type elements[0] end def null elements[1] end end module NullableType1 def type elements[0] end def null elements[1] end end module NullableType2 def type elements[0] end def null elements[1] end end module NullableType3 def type elements[0] end def null elements[1] end end module NullableType4 def type elements[0] end def null elements[1] end end module NullableType5 def type elements[0] end def null elements[1] end end module NullableType6 def type elements[0] end def ws1 elements[1] end def ws2 elements[3] end def Type elements[4] end def ws3 elements[5] end def null elements[7] end end def _nt_NullableType start_index = index if node_cache[:NullableType].has_key?(index) cached = node_cache[:NullableType][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index i1, s1 = index, [] r2 = _nt_UnsignedIntegerType s1 << r2 if r2 r3 = _nt_Nullable s1 << r3 end if s1.last r1 = instantiate_node(ParseTree::NullableType,input, i1...index, s1) r1.extend(NullableType0) else @index = i1 r1 = nil end if r1 r0 = r1 else i4, s4 = index, [] if has_terminal?("boolean", false, index) r5 = instantiate_node(SyntaxNode,input, index...(index + 7)) @index += 7 else terminal_parse_failure("boolean") r5 = nil end s4 << r5 if r5 r6 = _nt_Nullable s4 << r6 if r6 i7 = index r8 = _nt_NonSpace if r8 r7 = nil else @index = i7 r7 = instantiate_node(SyntaxNode,input, index...index) end s4 << r7 end end if s4.last r4 = instantiate_node(ParseTree::NullableType,input, i4...index, s4) r4.extend(NullableType1) else @index = i4 r4 = nil end if r4 r0 = r4 else i9, s9 = index, [] if has_terminal?("octet", false, index) r10 = instantiate_node(SyntaxNode,input, index...(index + 5)) @index += 5 else terminal_parse_failure("octet") r10 = nil end s9 << r10 if r10 r11 = _nt_Nullable s9 << r11 if r11 i12 = index r13 = _nt_NonSpace if r13 r12 = nil else @index = i12 r12 = instantiate_node(SyntaxNode,input, index...index) end s9 << r12 end end if s9.last r9 = instantiate_node(ParseTree::NullableType,input, i9...index, s9) r9.extend(NullableType2) else @index = i9 r9 = nil end if r9 r0 = r9 else i14, s14 = index, [] if has_terminal?("float", false, index) r15 = instantiate_node(SyntaxNode,input, index...(index + 5)) @index += 5 else terminal_parse_failure("float") r15 = nil end s14 << r15 if r15 r16 = _nt_Nullable s14 << r16 if r16 i17 = index r18 = _nt_NonSpace if r18 r17 = nil else @index = i17 r17 = instantiate_node(SyntaxNode,input, index...index) end s14 << r17 end end if s14.last r14 = instantiate_node(ParseTree::NullableType,input, i14...index, s14) r14.extend(NullableType3) else @index = i14 r14 = nil end if r14 r0 = r14 else i19, s19 = index, [] if has_terminal?("double", false, index) r20 = instantiate_node(SyntaxNode,input, index...(index + 6)) @index += 6 else terminal_parse_failure("double") r20 = nil end s19 << r20 if r20 r21 = _nt_Nullable s19 << r21 if r21 i22 = index r23 = _nt_NonSpace if r23 r22 = nil else @index = i22 r22 = instantiate_node(SyntaxNode,input, index...index) end s19 << r22 end end if s19.last r19 = instantiate_node(ParseTree::NullableType,input, i19...index, s19) r19.extend(NullableType4) else @index = i19 r19 = nil end if r19 r0 = r19 else i24, s24 = index, [] if has_terminal?("DOMString", false, index) r25 = instantiate_node(SyntaxNode,input, index...(index + 9)) @index += 9 else terminal_parse_failure("DOMString") r25 = nil end s24 << r25 if r25 r26 = _nt_Nullable s24 << r26 if r26 i27 = index r28 = _nt_NonSpace if r28 r27 = nil else @index = i27 r27 = instantiate_node(SyntaxNode,input, index...index) end s24 << r27 end end if s24.last r24 = instantiate_node(ParseTree::NullableType,input, i24...index, s24) r24.extend(NullableType5) else @index = i24 r24 = nil end if r24 r0 = r24 else i29, s29 = index, [] if has_terminal?("sequence", false, index) r30 = instantiate_node(SyntaxNode,input, index...(index + 8)) @index += 8 else terminal_parse_failure("sequence") r30 = nil end s29 << r30 if r30 r31 = _nt_ws s29 << r31 if r31 if has_terminal?("<", false, index) r32 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("<") r32 = nil end s29 << r32 if r32 r33 = _nt_ws s29 << r33 if r33 r34 = _nt_Type s29 << r34 if r34 r35 = _nt_ws s29 << r35 if r35 if has_terminal?(">", false, index) r36 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(">") r36 = nil end s29 << r36 if r36 r37 = _nt_Nullable s29 << r37 if r37 i38 = index r39 = _nt_NonSpace if r39 r38 = nil else @index = i38 r38 = instantiate_node(SyntaxNode,input, index...index) end s29 << r38 end end end end end end end end if s29.last r29 = instantiate_node(ParseTree::NullableType,input, i29...index, s29) r29.extend(NullableType6) else @index = i29 r29 = nil end if r29 r0 = r29 else @index = i0 r0 = nil end end end end end end end node_cache[:NullableType][start_index] = r0 r0 end module UnsignedIntegerType0 def ws elements[1] end def IntegerType elements[2] end end def _nt_UnsignedIntegerType start_index = index if node_cache[:UnsignedIntegerType].has_key?(index) cached = node_cache[:UnsignedIntegerType][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index i1, s1 = index, [] if has_terminal?("unsigned", false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 8)) @index += 8 else terminal_parse_failure("unsigned") r2 = nil end s1 << r2 if r2 r3 = _nt_ws s1 << r3 if r3 r4 = _nt_IntegerType s1 << r4 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(UnsignedIntegerType0) else @index = i1 r1 = nil end if r1 r0 = r1 else r5 = _nt_IntegerType if r5 r0 = r5 else @index = i0 r0 = nil end end node_cache[:UnsignedIntegerType][start_index] = r0 r0 end module IntegerType0 def ws elements[1] end def OptionalLong elements[2] end end def _nt_IntegerType start_index = index if node_cache[:IntegerType].has_key?(index) cached = node_cache[:IntegerType][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index if has_terminal?("short", false, index) r1 = instantiate_node(SyntaxNode,input, index...(index + 5)) @index += 5 else terminal_parse_failure("short") r1 = nil end if r1 r0 = r1 else i2, s2 = index, [] if has_terminal?("long", false, index) r3 = instantiate_node(SyntaxNode,input, index...(index + 4)) @index += 4 else terminal_parse_failure("long") r3 = nil end s2 << r3 if r3 r4 = _nt_ws s2 << r4 if r4 r5 = _nt_OptionalLong s2 << r5 end end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(IntegerType0) else @index = i2 r2 = nil end if r2 r0 = r2 else @index = i0 r0 = nil end end node_cache[:IntegerType][start_index] = r0 r0 end def _nt_OptionalLong start_index = index if node_cache[:OptionalLong].has_key?(index) cached = node_cache[:OptionalLong][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if has_terminal?("long", false, index) r1 = instantiate_node(SyntaxNode,input, index...(index + 4)) @index += 4 else terminal_parse_failure("long") r1 = nil end if r1 r0 = r1 else r0 = instantiate_node(SyntaxNode,input, index...index) end node_cache[:OptionalLong][start_index] = r0 r0 end def _nt_Nullable start_index = index if node_cache[:Nullable].has_key?(index) cached = node_cache[:Nullable][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) r1 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("?") r1 = nil end if r1 r0 = r1 else r0 = instantiate_node(SyntaxNode,input, index...index) end node_cache[:Nullable][start_index] = r0 r0 end module Array0 def ws elements[1] end end def _nt_Array start_index = index if node_cache[:Array].has_key?(index) cached = node_cache[:Array][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i1, s1 = index, [] if has_terminal?("[", false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("[") r2 = nil end s1 << r2 if r2 r3 = _nt_ws s1 << r3 if r3 if has_terminal?("]", false, index) r4 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("]") r4 = nil end s1 << r4 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(Array0) else @index = i1 r1 = nil end if r1 r0 = r1 else r0 = instantiate_node(SyntaxNode,input, index...index) end node_cache[:Array][start_index] = r0 r0 end module NonSpace0 end def _nt_NonSpace start_index = index if node_cache[:NonSpace].has_key?(index) cached = node_cache[:NonSpace][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] i1 = index if has_terminal?(' ', false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(' ') r2 = nil end if r2 r1 = nil else @index = i1 r1 = instantiate_node(SyntaxNode,input, index...index) end s0 << r1 if r1 if index < input_length r3 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("any character") r3 = nil end s0 << r3 end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(NonSpace0) else @index = i0 r0 = nil end node_cache[:NonSpace][start_index] = r0 r0 end def _nt_ReturnType start_index = index if node_cache[:ReturnType].has_key?(index) cached = node_cache[:ReturnType][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_Type if r1 r0 = r1 else if has_terminal?("void", false, index) r2 = instantiate_node(ParseTree::VoidType,input, index...(index + 4)) @index += 4 else terminal_parse_failure("void") r2 = nil end if r2 r0 = r2 else @index = i0 r0 = nil end end node_cache[:ReturnType][start_index] = r0 r0 end module ScopedNameList0 def name elements[0] end def ws elements[1] end def names elements[2] end end def _nt_ScopedNameList start_index = index if node_cache[:ScopedNameList].has_key?(index) cached = node_cache[:ScopedNameList][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_ScopedName s0 << r1 if r1 r2 = _nt_ws s0 << r2 if r2 r3 = _nt_ScopedNames s0 << r3 end end if s0.last r0 = instantiate_node(ParseTree::ScopedNameList,input, i0...index, s0) r0.extend(ScopedNameList0) else @index = i0 r0 = nil end node_cache[:ScopedNameList][start_index] = r0 r0 end module ScopedNames0 def ScopedName elements[1] end def ws elements[2] end def ScopedNames elements[3] end end def _nt_ScopedNames start_index = index if node_cache[:ScopedNames].has_key?(index) cached = node_cache[:ScopedNames][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i1, s1 = index, [] if has_terminal?(",", false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(",") r2 = nil end s1 << r2 if r2 r3 = _nt_ScopedName s1 << r3 if r3 r4 = _nt_ws s1 << r4 if r4 r5 = _nt_ScopedNames s1 << r5 end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(ScopedNames0) else @index = i1 r1 = nil end if r1 r0 = r1 else r0 = instantiate_node(SyntaxNode,input, index...index) end node_cache[:ScopedNames][start_index] = r0 r0 end def _nt_ScopedName start_index = index if node_cache[:ScopedName].has_key?(index) cached = node_cache[:ScopedName][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_AbsoluteScopedName if r1 r0 = r1 else r2 = _nt_RelativeScopedName if r2 r0 = r2 else @index = i0 r0 = nil end end node_cache[:ScopedName][start_index] = r0 r0 end module AbsoluteScopedName0 def name elements[1] end def parts elements[2] end end def _nt_AbsoluteScopedName start_index = index if node_cache[:AbsoluteScopedName].has_key?(index) cached = node_cache[:AbsoluteScopedName][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if has_terminal?("::", false, index) r1 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure("::") r1 = nil end s0 << r1 if r1 r2 = _nt_identifier s0 << r2 if r2 r3 = _nt_ScopedNameParts s0 << r3 end end if s0.last r0 = instantiate_node(ParseTree::AbsoluteScopedName,input, i0...index, s0) r0.extend(AbsoluteScopedName0) else @index = i0 r0 = nil end node_cache[:AbsoluteScopedName][start_index] = r0 r0 end module RelativeScopedName0 def name elements[0] end def parts elements[1] end end def _nt_RelativeScopedName start_index = index if node_cache[:RelativeScopedName].has_key?(index) cached = node_cache[:RelativeScopedName][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_identifier s0 << r1 if r1 r2 = _nt_ScopedNameParts s0 << r2 end if s0.last r0 = instantiate_node(ParseTree::RelativeScopedName,input, i0...index, s0) r0.extend(RelativeScopedName0) else @index = i0 r0 = nil end node_cache[:RelativeScopedName][start_index] = r0 r0 end module ScopedNameParts0 def ws elements[1] end def name elements[2] end def parts elements[3] end end def _nt_ScopedNameParts start_index = index if node_cache[:ScopedNameParts].has_key?(index) cached = node_cache[:ScopedNameParts][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i1, s1 = index, [] if has_terminal?("::", false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure("::") r2 = nil end s1 << r2 if r2 r3 = _nt_ws s1 << r3 if r3 r4 = _nt_identifier s1 << r4 if r4 r5 = _nt_ScopedNameParts s1 << r5 end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(ScopedNameParts0) else @index = i1 r1 = nil end if r1 r0 = r1 else r0 = instantiate_node(SyntaxNode,input, index...index) end node_cache[:ScopedNameParts][start_index] = r0 r0 end module Integer0 def build() Integer(text_value) end end def _nt_integer start_index = index if node_cache[:integer].has_key?(index) cached = node_cache[:integer][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_hexint if r1 r0 = r1 r0.extend(Integer0) else r2 = _nt_octint if r2 r0 = r2 r0.extend(Integer0) else r3 = _nt_decint if r3 r0 = r3 r0.extend(Integer0) else @index = i0 r0 = nil end end end node_cache[:integer][start_index] = r0 r0 end module Hexint0 end def _nt_hexint start_index = index if node_cache[:hexint].has_key?(index) cached = node_cache[:hexint][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if has_terminal?("-", false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("-") r2 = nil end if r2 r1 = r2 else r1 = instantiate_node(SyntaxNode,input, index...index) end s0 << r1 if r1 if has_terminal?("0", false, index) r3 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("0") r3 = nil end s0 << r3 if r3 if has_terminal?('\G[Xx]', true, index) r4 = true @index += 1 else r4 = nil end s0 << r4 if r4 s5, i5 = [], index loop do if has_terminal?('\G[0-9A-Fa-f]', true, index) r6 = true @index += 1 else r6 = nil end if r6 s5 << r6 else break end end if s5.empty? @index = i5 r5 = nil else r5 = instantiate_node(SyntaxNode,input, i5...index, s5) end s0 << r5 end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(Hexint0) else @index = i0 r0 = nil end node_cache[:hexint][start_index] = r0 r0 end module Octint0 end def _nt_octint start_index = index if node_cache[:octint].has_key?(index) cached = node_cache[:octint][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if has_terminal?("-", false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("-") r2 = nil end if r2 r1 = r2 else r1 = instantiate_node(SyntaxNode,input, index...index) end s0 << r1 if r1 if has_terminal?("0", false, index) r3 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("0") r3 = nil end s0 << r3 if r3 s4, i4 = [], index loop do if has_terminal?('\G[0-7]', true, index) r5 = true @index += 1 else r5 = nil end if r5 s4 << r5 else break end end if s4.empty? @index = i4 r4 = nil else r4 = instantiate_node(SyntaxNode,input, i4...index, s4) end s0 << r4 end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(Octint0) else @index = i0 r0 = nil end node_cache[:octint][start_index] = r0 r0 end module Decint0 end def _nt_decint start_index = index if node_cache[:decint].has_key?(index) cached = node_cache[:decint][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if has_terminal?("-", false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("-") r2 = nil end if r2 r1 = r2 else r1 = instantiate_node(SyntaxNode,input, index...index) end s0 << r1 if r1 s3, i3 = [], index loop do if has_terminal?('\G[0-9]', true, index) r4 = true @index += 1 else r4 = nil end if r4 s3 << r4 else break end end r3 = instantiate_node(SyntaxNode,input, i3...index, s3) s0 << r3 end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(Decint0) else @index = i0 r0 = nil end node_cache[:decint][start_index] = r0 r0 end module Float0 end module Float1 end module Float2 end module Float3 end module Float4 end module Float5 def build() Float(text_value) end end def _nt_float start_index = index if node_cache[:float].has_key?(index) cached = node_cache[:float][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index i1, s1 = 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 r2 = instantiate_node(SyntaxNode,input, index...index) end s1 << r2 if r2 i4 = index i5, s5 = index, [] s6, i6 = [], index loop do if has_terminal?('\G[0-9]', true, index) r7 = true @index += 1 else r7 = nil end if r7 s6 << r7 else break end end if s6.empty? @index = i6 r6 = nil else r6 = instantiate_node(SyntaxNode,input, i6...index, s6) end s5 << r6 if r6 if has_terminal?(".", false, index) r8 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(".") r8 = nil end s5 << r8 if r8 s9, i9 = [], index loop do if has_terminal?('\G[0-9]', true, index) r10 = true @index += 1 else r10 = nil end if r10 s9 << r10 else break end end r9 = instantiate_node(SyntaxNode,input, i9...index, s9) s5 << r9 end end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(Float0) else @index = i5 r5 = nil end if r5 r4 = r5 else i11, s11 = index, [] s12, i12 = [], index loop do if has_terminal?('\G[0-9]', true, index) r13 = true @index += 1 else r13 = nil end if r13 s12 << r13 else break end end r12 = instantiate_node(SyntaxNode,input, i12...index, s12) s11 << r12 if r12 if has_terminal?(".", false, index) r14 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(".") r14 = nil end s11 << r14 if r14 s15, i15 = [], index loop do if has_terminal?('\G[0-9]', true, index) r16 = true @index += 1 else r16 = nil end if r16 s15 << r16 else break end end if s15.empty? @index = i15 r15 = nil else r15 = instantiate_node(SyntaxNode,input, i15...index, s15) end s11 << r15 end end if s11.last r11 = instantiate_node(SyntaxNode,input, i11...index, s11) r11.extend(Float1) else @index = i11 r11 = nil end if r11 r4 = r11 else @index = i4 r4 = nil end end s1 << r4 if r4 i18, s18 = index, [] if has_terminal?('\G[Ee]', true, index) r19 = true @index += 1 else r19 = nil end s18 << r19 if r19 if has_terminal?('\G[+-]', true, index) r21 = true @index += 1 else r21 = nil end if r21 r20 = r21 else r20 = instantiate_node(SyntaxNode,input, index...index) end s18 << r20 if r20 s22, i22 = [], index loop do if has_terminal?('\G[0-9]', true, index) r23 = true @index += 1 else r23 = nil end if r23 s22 << r23 else break end end if s22.empty? @index = i22 r22 = nil else r22 = instantiate_node(SyntaxNode,input, i22...index, s22) end s18 << r22 end end if s18.last r18 = instantiate_node(SyntaxNode,input, i18...index, s18) r18.extend(Float2) else @index = i18 r18 = nil end if r18 r17 = r18 else r17 = instantiate_node(SyntaxNode,input, index...index) end s1 << r17 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(Float3) else @index = i1 r1 = nil end if r1 r0 = r1 r0.extend(Float5) else i24, s24 = index, [] s25, i25 = [], index loop do if has_terminal?('\G[0-9]', true, index) r26 = true @index += 1 else r26 = nil end if r26 s25 << r26 else break end end if s25.empty? @index = i25 r25 = nil else r25 = instantiate_node(SyntaxNode,input, i25...index, s25) end s24 << r25 if r25 if has_terminal?('\G[Ee]', true, index) r27 = true @index += 1 else r27 = nil end s24 << r27 if r27 if has_terminal?('\G[+-]', true, index) r29 = true @index += 1 else r29 = nil end if r29 r28 = r29 else r28 = instantiate_node(SyntaxNode,input, index...index) end s24 << r28 if r28 s30, i30 = [], index loop do if has_terminal?('\G[0-9]', true, index) r31 = true @index += 1 else r31 = nil end if r31 s30 << r31 else break end end if s30.empty? @index = i30 r30 = nil else r30 = instantiate_node(SyntaxNode,input, i30...index, s30) end s24 << r30 end end end if s24.last r24 = instantiate_node(SyntaxNode,input, i24...index, s24) r24.extend(Float4) else @index = i24 r24 = nil end if r24 r0 = r24 r0.extend(Float5) else @index = i0 r0 = nil end end node_cache[:float][start_index] = r0 r0 end module Identifier0 end module Identifier1 def build() text_value[/^_?(.+)/, 1] end end def _nt_identifier start_index = index if node_cache[:identifier].has_key?(index) cached = node_cache[:identifier][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if has_terminal?('\G[A-Z_a-z]', true, index) r1 = true @index += 1 else r1 = nil end s0 << r1 if r1 s2, i2 = [], index loop do if has_terminal?('\G[0-9A-Z_a-z]', true, index) r3 = true @index += 1 else r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s0 << r2 end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(Identifier0) r0.extend(Identifier1) else @index = i0 r0 = nil end node_cache[:identifier][start_index] = r0 r0 end module String0 end def _nt_string start_index = index if node_cache[:string].has_key?(index) cached = node_cache[:string][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if has_terminal?("\"", false, index) r1 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("\"") r1 = nil end s0 << r1 if r1 s2, i2 = [], index loop do if has_terminal?('\G[^"]', true, index) r3 = true @index += 1 else r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s0 << r2 if r2 if has_terminal?("\"", false, index) r4 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("\"") r4 = nil end s0 << r4 end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(String0) else @index = i0 r0 = nil end node_cache[:string][start_index] = r0 r0 end module Ws0 end module Ws1 end def _nt_ws start_index = index if node_cache[:ws].has_key?(index) cached = node_cache[:ws][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i1 = index i2, s2 = index, [] s3, i3 = [], index loop do if has_terminal?('\G[\\t\\n\\r ]', true, index) r4 = true @index += 1 else r4 = nil end if r4 s3 << r4 else break end end r3 = instantiate_node(SyntaxNode,input, i3...index, s3) s2 << r3 if r3 s5, i5 = [], index loop do i6, s6 = index, [] i7 = index r8 = _nt_line_comment if r8 r7 = r8 else r9 = _nt_block_comment if r9 r7 = r9 else @index = i7 r7 = nil end end s6 << r7 if r7 s10, i10 = [], index loop do if has_terminal?('\G[\\t\\n\\r ]', true, index) r11 = true @index += 1 else r11 = nil end if r11 s10 << r11 else break end end r10 = instantiate_node(SyntaxNode,input, i10...index, s10) s6 << r10 end if s6.last r6 = instantiate_node(SyntaxNode,input, i6...index, s6) r6.extend(Ws0) else @index = i6 r6 = nil end if r6 s5 << r6 else break end end if s5.empty? @index = i5 r5 = nil else r5 = instantiate_node(SyntaxNode,input, i5...index, s5) end s2 << r5 end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(Ws1) else @index = i2 r2 = nil end if r2 r1 = r2 else s12, i12 = [], index loop do if has_terminal?('\G[\\t\\n\\r ]', true, index) r13 = true @index += 1 else r13 = nil end if r13 s12 << r13 else break end end if s12.empty? @index = i12 r12 = nil else r12 = instantiate_node(SyntaxNode,input, i12...index, s12) end if r12 r1 = r12 else @index = i1 r1 = nil end end if r1 r0 = r1 else r0 = instantiate_node(SyntaxNode,input, index...index) end node_cache[:ws][start_index] = r0 r0 end def _nt_other start_index = index if node_cache[:other].has_key?(index) cached = node_cache[:other][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if has_terminal?('\G[^\\t\\n\\r 0-9A-Z_a-z]', true, index) r0 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else r0 = nil end node_cache[:other][start_index] = r0 r0 end module LineComment0 end module LineComment1 end def _nt_line_comment start_index = index if node_cache[:line_comment].has_key?(index) cached = node_cache[:line_comment][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if has_terminal?("//", false, index) r1 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure("//") r1 = nil end s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] i4 = index if has_terminal?('\G[\\n\\r]', true, index) r5 = true @index += 1 else r5 = nil end if r5 r4 = nil else @index = i4 r4 = instantiate_node(SyntaxNode,input, index...index) end s3 << r4 if r4 if index < input_length r6 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("any character") r6 = nil end s3 << r6 end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(LineComment0) else @index = i3 r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s0 << r2 end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(LineComment1) else @index = i0 r0 = nil end node_cache[:line_comment][start_index] = r0 r0 end module BlockComment0 end module BlockComment1 end def _nt_block_comment start_index = index if node_cache[:block_comment].has_key?(index) cached = node_cache[:block_comment][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if has_terminal?('/*', false, index) r1 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure('/*') r1 = nil end s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] i4 = index if has_terminal?('*/', false, index) r5 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure('*/') r5 = nil end if r5 r4 = nil else @index = i4 r4 = instantiate_node(SyntaxNode,input, index...index) end s3 << r4 if r4 if index < input_length r6 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("any character") r6 = nil end s3 << r6 end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(BlockComment0) else @index = i3 r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s0 << r2 if r2 if has_terminal?('*/', false, index) r7 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure('*/') r7 = nil end s0 << r7 end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(BlockComment1) else @index = i0 r0 = nil end node_cache[:block_comment][start_index] = r0 r0 end end class IDLParser < Treetop::Runtime::CompiledParser include IDL end # IDL end # Parser end # WebIDL