# Autogenerated from a Treetop grammar. Edits may be lost. module Rasti module DB module NQL module Syntax include Treetop::Runtime def root @root ||= :sentence end module Sentence0 def proposition elements[1] end end def _nt_sentence start_index = index if node_cache[:sentence].has_key?(index) cached = node_cache[:sentence][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] s1, i1 = [], index loop do r2 = _nt_space if r2 s1 << r2 else break end end r1 = instantiate_node(SyntaxNode,input, i1...index, s1) s0 << r1 if r1 r3 = _nt_proposition s0 << r3 if r3 s4, i4 = [], index loop do r5 = _nt_space if r5 s4 << r5 else break end end r4 = instantiate_node(SyntaxNode,input, i4...index, s4) s0 << r4 end end if s0.last r0 = instantiate_node(Nodes::Sentence,input, i0...index, s0) r0.extend(Sentence0) else @index = i0 r0 = nil end node_cache[:sentence][start_index] = r0 r0 end def _nt_proposition start_index = index if node_cache[:proposition].has_key?(index) cached = node_cache[:proposition][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_disjunction if r1 r0 = r1 else r2 = _nt_conjunction if r2 r0 = r2 else r3 = _nt_statement if r3 r0 = r3 else @index = i0 r0 = nil end end end node_cache[:proposition][start_index] = r0 r0 end module Disjunction0 def left elements[0] end def right elements[4] end end def _nt_disjunction start_index = index if node_cache[:disjunction].has_key?(index) cached = node_cache[:disjunction][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_conjunction if r2 r1 = r2 else r3 = _nt_statement if r3 r1 = r3 else @index = i1 r1 = nil end end s0 << r1 if r1 s4, i4 = [], index loop do r5 = _nt_space if r5 s4 << r5 else break end end r4 = instantiate_node(SyntaxNode,input, i4...index, s4) s0 << r4 if r4 if has_terminal?('|', false, index) r6 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('|') r6 = nil end s0 << r6 if r6 s7, i7 = [], index loop do r8 = _nt_space if r8 s7 << r8 else break end end r7 = instantiate_node(SyntaxNode,input, i7...index, s7) s0 << r7 if r7 r9 = _nt_proposition s0 << r9 end end end end if s0.last r0 = instantiate_node(Nodes::Disjunction,input, i0...index, s0) r0.extend(Disjunction0) else @index = i0 r0 = nil end node_cache[:disjunction][start_index] = r0 r0 end module Conjunction0 def left elements[0] end def right elements[4] end end def _nt_conjunction start_index = index if node_cache[:conjunction].has_key?(index) cached = node_cache[:conjunction][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_statement s0 << r1 if r1 s2, i2 = [], index loop do r3 = _nt_space 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 if r4 s5, i5 = [], index loop do r6 = _nt_space if r6 s5 << r6 else break end end r5 = instantiate_node(SyntaxNode,input, i5...index, s5) s0 << r5 if r5 i7 = index r8 = _nt_conjunction if r8 r7 = r8 else r9 = _nt_statement if r9 r7 = r9 else @index = i7 r7 = nil end end s0 << r7 end end end end if s0.last r0 = instantiate_node(Nodes::Conjunction,input, i0...index, s0) r0.extend(Conjunction0) else @index = i0 r0 = nil end node_cache[:conjunction][start_index] = r0 r0 end def _nt_statement start_index = index if node_cache[:statement].has_key?(index) cached = node_cache[:statement][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_parenthesis_sentence if r1 r0 = r1 else r2 = _nt_comparison if r2 r0 = r2 else @index = i0 r0 = nil end end node_cache[:statement][start_index] = r0 r0 end module ParenthesisSentence0 def sentence elements[1] end end def _nt_parenthesis_sentence start_index = index if node_cache[:parenthesis_sentence].has_key?(index) cached = node_cache[:parenthesis_sentence][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_sentence 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(Nodes::ParenthesisSentence,input, i0...index, s0) r0.extend(ParenthesisSentence0) else @index = i0 r0 = nil end node_cache[:parenthesis_sentence][start_index] = r0 r0 end def _nt_comparison start_index = index if node_cache[:comparison].has_key?(index) cached = node_cache[:comparison][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_comparison_not_include if r1 r0 = r1 else r2 = _nt_comparison_include if r2 r0 = r2 else r3 = _nt_comparison_like if r3 r0 = r3 else r4 = _nt_comparison_greater_than_or_equal if r4 r0 = r4 else r5 = _nt_comparison_less_than_or_equal if r5 r0 = r5 else r6 = _nt_comparison_greater_than if r6 r0 = r6 else r7 = _nt_comparison_less_than if r7 r0 = r7 else r8 = _nt_comparison_not_equal if r8 r0 = r8 else r9 = _nt_comparison_equal if r9 r0 = r9 else @index = i0 r0 = nil end end end end end end end end end node_cache[:comparison][start_index] = r0 r0 end module Field0 def table elements[0] end end module Field1 def _tables elements[0] end def _column elements[1] end end def _nt_field start_index = index if node_cache[:field].has_key?(index) cached = node_cache[:field][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] s1, i1 = [], index loop do i2, s2 = index, [] r3 = _nt_field_name s2 << 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 s2 << r4 end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(Field0) else @index = i2 r2 = nil end if r2 s1 << r2 else break end end r1 = instantiate_node(SyntaxNode,input, i1...index, s1) s0 << r1 if r1 r5 = _nt_field_name s0 << r5 end if s0.last r0 = instantiate_node(Nodes::Field,input, i0...index, s0) r0.extend(Field1) else @index = i0 r0 = nil end node_cache[:field][start_index] = r0 r0 end module ComparisonInclude0 def field elements[0] end def comparator elements[2] end def argument elements[4] end end def _nt_comparison_include start_index = index if node_cache[:comparison_include].has_key?(index) cached = node_cache[:comparison_include][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_field s0 << r1 if r1 s2, i2 = [], index loop do r3 = _nt_space 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 if r4 s5, i5 = [], index loop do r6 = _nt_space if r6 s5 << r6 else break end end r5 = instantiate_node(SyntaxNode,input, i5...index, s5) s0 << r5 if r5 r7 = _nt_basic s0 << r7 end end end end if s0.last r0 = instantiate_node(Nodes::Comparisons::Include,input, i0...index, s0) r0.extend(ComparisonInclude0) else @index = i0 r0 = nil end node_cache[:comparison_include][start_index] = r0 r0 end module ComparisonNotInclude0 def field elements[0] end def comparator elements[2] end def argument elements[4] end end def _nt_comparison_not_include start_index = index if node_cache[:comparison_not_include].has_key?(index) cached = node_cache[:comparison_not_include][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_field s0 << r1 if r1 s2, i2 = [], index loop do r3 = _nt_space 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 + 2)) @index += 2 else terminal_parse_failure('!:') r4 = nil end s0 << r4 if r4 s5, i5 = [], index loop do r6 = _nt_space if r6 s5 << r6 else break end end r5 = instantiate_node(SyntaxNode,input, i5...index, s5) s0 << r5 if r5 r7 = _nt_basic s0 << r7 end end end end if s0.last r0 = instantiate_node(Nodes::Comparisons::NotInclude,input, i0...index, s0) r0.extend(ComparisonNotInclude0) else @index = i0 r0 = nil end node_cache[:comparison_not_include][start_index] = r0 r0 end module ComparisonLike0 def field elements[0] end def comparator elements[2] end def argument elements[4] end end def _nt_comparison_like start_index = index if node_cache[:comparison_like].has_key?(index) cached = node_cache[:comparison_like][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_field s0 << r1 if r1 s2, i2 = [], index loop do r3 = _nt_space 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 if r4 s5, i5 = [], index loop do r6 = _nt_space if r6 s5 << r6 else break end end r5 = instantiate_node(SyntaxNode,input, i5...index, s5) s0 << r5 if r5 r7 = _nt_basic s0 << r7 end end end end if s0.last r0 = instantiate_node(Nodes::Comparisons::Like,input, i0...index, s0) r0.extend(ComparisonLike0) else @index = i0 r0 = nil end node_cache[:comparison_like][start_index] = r0 r0 end module ComparisonGreaterThan0 def field elements[0] end def comparator elements[2] end def argument elements[4] end end def _nt_comparison_greater_than start_index = index if node_cache[:comparison_greater_than].has_key?(index) cached = node_cache[:comparison_greater_than][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_field s0 << r1 if r1 s2, i2 = [], index loop do r3 = _nt_space 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 if r4 s5, i5 = [], index loop do r6 = _nt_space if r6 s5 << r6 else break end end r5 = instantiate_node(SyntaxNode,input, i5...index, s5) s0 << r5 if r5 r7 = _nt_basic s0 << r7 end end end end if s0.last r0 = instantiate_node(Nodes::Comparisons::GreaterThan,input, i0...index, s0) r0.extend(ComparisonGreaterThan0) else @index = i0 r0 = nil end node_cache[:comparison_greater_than][start_index] = r0 r0 end module ComparisonGreaterThanOrEqual0 def field elements[0] end def comparator elements[2] end def argument elements[4] end end def _nt_comparison_greater_than_or_equal start_index = index if node_cache[:comparison_greater_than_or_equal].has_key?(index) cached = node_cache[:comparison_greater_than_or_equal][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_field s0 << r1 if r1 s2, i2 = [], index loop do r3 = _nt_space 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 + 2)) @index += 2 else terminal_parse_failure('>=') r4 = nil end s0 << r4 if r4 s5, i5 = [], index loop do r6 = _nt_space if r6 s5 << r6 else break end end r5 = instantiate_node(SyntaxNode,input, i5...index, s5) s0 << r5 if r5 r7 = _nt_basic s0 << r7 end end end end if s0.last r0 = instantiate_node(Nodes::Comparisons::GreaterThanOrEqual,input, i0...index, s0) r0.extend(ComparisonGreaterThanOrEqual0) else @index = i0 r0 = nil end node_cache[:comparison_greater_than_or_equal][start_index] = r0 r0 end module ComparisonLessThan0 def field elements[0] end def comparator elements[2] end def argument elements[4] end end def _nt_comparison_less_than start_index = index if node_cache[:comparison_less_than].has_key?(index) cached = node_cache[:comparison_less_than][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_field s0 << r1 if r1 s2, i2 = [], index loop do r3 = _nt_space 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 if r4 s5, i5 = [], index loop do r6 = _nt_space if r6 s5 << r6 else break end end r5 = instantiate_node(SyntaxNode,input, i5...index, s5) s0 << r5 if r5 r7 = _nt_basic s0 << r7 end end end end if s0.last r0 = instantiate_node(Nodes::Comparisons::LessThan,input, i0...index, s0) r0.extend(ComparisonLessThan0) else @index = i0 r0 = nil end node_cache[:comparison_less_than][start_index] = r0 r0 end module ComparisonLessThanOrEqual0 def field elements[0] end def comparator elements[2] end def argument elements[4] end end def _nt_comparison_less_than_or_equal start_index = index if node_cache[:comparison_less_than_or_equal].has_key?(index) cached = node_cache[:comparison_less_than_or_equal][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_field s0 << r1 if r1 s2, i2 = [], index loop do r3 = _nt_space 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 + 2)) @index += 2 else terminal_parse_failure('<=') r4 = nil end s0 << r4 if r4 s5, i5 = [], index loop do r6 = _nt_space if r6 s5 << r6 else break end end r5 = instantiate_node(SyntaxNode,input, i5...index, s5) s0 << r5 if r5 r7 = _nt_basic s0 << r7 end end end end if s0.last r0 = instantiate_node(Nodes::Comparisons::LessThanOrEqual,input, i0...index, s0) r0.extend(ComparisonLessThanOrEqual0) else @index = i0 r0 = nil end node_cache[:comparison_less_than_or_equal][start_index] = r0 r0 end module ComparisonNotEqual0 def field elements[0] end def comparator elements[2] end def argument elements[4] end end def _nt_comparison_not_equal start_index = index if node_cache[:comparison_not_equal].has_key?(index) cached = node_cache[:comparison_not_equal][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_field s0 << r1 if r1 s2, i2 = [], index loop do r3 = _nt_space 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 + 2)) @index += 2 else terminal_parse_failure('!=') r4 = nil end s0 << r4 if r4 s5, i5 = [], index loop do r6 = _nt_space if r6 s5 << r6 else break end end r5 = instantiate_node(SyntaxNode,input, i5...index, s5) s0 << r5 if r5 r7 = _nt_basic s0 << r7 end end end end if s0.last r0 = instantiate_node(Nodes::Comparisons::NotEqual,input, i0...index, s0) r0.extend(ComparisonNotEqual0) else @index = i0 r0 = nil end node_cache[:comparison_not_equal][start_index] = r0 r0 end module ComparisonEqual0 def field elements[0] end def comparator elements[2] end def argument elements[4] end end def _nt_comparison_equal start_index = index if node_cache[:comparison_equal].has_key?(index) cached = node_cache[:comparison_equal][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_field s0 << r1 if r1 s2, i2 = [], index loop do r3 = _nt_space 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 if r4 s5, i5 = [], index loop do r6 = _nt_space if r6 s5 << r6 else break end end r5 = instantiate_node(SyntaxNode,input, i5...index, s5) s0 << r5 if r5 r7 = _nt_basic s0 << r7 end end end end if s0.last r0 = instantiate_node(Nodes::Comparisons::Equal,input, i0...index, s0) r0.extend(ComparisonEqual0) else @index = i0 r0 = nil end node_cache[:comparison_equal][start_index] = r0 r0 end def _nt_basic start_index = index if node_cache[:basic].has_key?(index) cached = node_cache[:basic][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_boolean if r1 r0 = r1 else r2 = _nt_time if r2 r0 = r2 else r3 = _nt_float if r3 r0 = r3 else r4 = _nt_integer if r4 r0 = r4 else r5 = _nt_literal_string if r5 r0 = r5 else r6 = _nt_string if r6 r0 = r6 else @index = i0 r0 = nil end end end end end end node_cache[:basic][start_index] = r0 r0 end def _nt_space start_index = index if node_cache[:space].has_key?(index) cached = node_cache[:space][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[\\s\\t\\n]', true, index) r0 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else r0 = nil end node_cache[:space][start_index] = r0 r0 end def _nt_field_name start_index = index if node_cache[:field_name].has_key?(index) cached = node_cache[:field_name][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end s0, i0 = [], index loop do if has_terminal?('\G[a-z_]', true, index) r1 = true @index += 1 else r1 = nil end if r1 s0 << r1 else break end end if s0.empty? @index = i0 r0 = nil else r0 = instantiate_node(SyntaxNode,input, i0...index, s0) end node_cache[:field_name][start_index] = r0 r0 end module Time0 def value elements[0] end end module Time1 def digit1 elements[0] end def digit2 elements[1] end end module Time2 def digit1 elements[0] end def digit2 elements[1] end end module Time3 def digit1 elements[0] end def digit2 elements[1] end end module Time4 def value elements[1] end end module Time5 def value elements[0] end end module Time6 def date elements[0] end def hour elements[1] end def minutes elements[3] end def seconds elements[4] end def timezone elements[5] end end def _nt_time start_index = index if node_cache[:time].has_key?(index) cached = node_cache[:time][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] i2, s2 = index, [] r3 = _nt_date s2 << r3 if r3 if has_terminal?('T', false, index) r4 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('T') r4 = nil end s2 << r4 end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(Time0) else @index = i2 r2 = nil end if r2 r1 = r2 else r1 = instantiate_node(SyntaxNode,input, index...index) end s0 << r1 if r1 i5, s5 = index, [] r6 = _nt_digit s5 << r6 if r6 r7 = _nt_digit s5 << r7 end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(Time1) else @index = i5 r5 = nil end s0 << r5 if r5 if has_terminal?(':', false, index) r8 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(':') r8 = nil end s0 << r8 if r8 i9, s9 = index, [] r10 = _nt_digit s9 << r10 if r10 r11 = _nt_digit s9 << r11 end if s9.last r9 = instantiate_node(SyntaxNode,input, i9...index, s9) r9.extend(Time2) else @index = i9 r9 = nil end s0 << r9 if r9 i13, s13 = index, [] if has_terminal?(':', false, index) r14 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(':') r14 = nil end s13 << r14 if r14 i15, s15 = index, [] r16 = _nt_digit s15 << r16 if r16 r17 = _nt_digit s15 << r17 end if s15.last r15 = instantiate_node(SyntaxNode,input, i15...index, s15) r15.extend(Time3) else @index = i15 r15 = nil end s13 << r15 end if s13.last r13 = instantiate_node(SyntaxNode,input, i13...index, s13) r13.extend(Time4) else @index = i13 r13 = nil end if r13 r12 = r13 else r12 = instantiate_node(SyntaxNode,input, index...index) end s0 << r12 if r12 i19, s19 = index, [] r20 = _nt_timezone s19 << r20 if s19.last r19 = instantiate_node(SyntaxNode,input, i19...index, s19) r19.extend(Time5) else @index = i19 r19 = nil end if r19 r18 = r19 else r18 = instantiate_node(SyntaxNode,input, index...index) end s0 << r18 end end end end end if s0.last r0 = instantiate_node(Nodes::Constants::Time,input, i0...index, s0) r0.extend(Time6) else @index = i0 r0 = nil end node_cache[:time][start_index] = r0 r0 end module Date0 def digit1 elements[0] end def digit2 elements[1] end def digit3 elements[2] end def digit4 elements[3] end end module Date1 def digit1 elements[0] end def digit2 elements[1] end end module Date2 def digit1 elements[0] end def digit2 elements[1] end end module Date3 def year elements[0] end def month elements[2] end def day elements[4] end end def _nt_date start_index = index if node_cache[:date].has_key?(index) cached = node_cache[:date][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, s1 = index, [] r2 = _nt_digit s1 << r2 if r2 r3 = _nt_digit s1 << r3 if r3 r4 = _nt_digit s1 << r4 if r4 r5 = _nt_digit s1 << r5 end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(Date0) else @index = i1 r1 = nil end s0 << r1 if r1 if has_terminal?('-', false, index) r6 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('-') r6 = nil end s0 << r6 if r6 i7, s7 = index, [] r8 = _nt_digit s7 << r8 if r8 r9 = _nt_digit s7 << r9 end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(Date1) else @index = i7 r7 = nil end s0 << r7 if r7 if has_terminal?('-', false, index) r10 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('-') r10 = nil end s0 << r10 if r10 i11, s11 = index, [] r12 = _nt_digit s11 << r12 if r12 r13 = _nt_digit s11 << r13 end if s11.last r11 = instantiate_node(SyntaxNode,input, i11...index, s11) r11.extend(Date2) else @index = i11 r11 = nil end s0 << r11 end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(Date3) else @index = i0 r0 = nil end node_cache[:date][start_index] = r0 r0 end module Timezone0 def digit1 elements[0] end def digit2 elements[1] end end module Timezone1 def digit1 elements[0] end def digit2 elements[1] end end module Timezone2 def sign elements[0] end def hour elements[1] end def minutes elements[3] end end def _nt_timezone start_index = index if node_cache[:timezone].has_key?(index) cached = node_cache[:timezone][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_sign s0 << r1 if r1 i2, s2 = index, [] r3 = _nt_digit s2 << r3 if r3 r4 = _nt_digit s2 << r4 end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(Timezone0) else @index = i2 r2 = nil end s0 << r2 if r2 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 i6, s6 = index, [] r7 = _nt_digit s6 << r7 if r7 r8 = _nt_digit s6 << r8 end if s6.last r6 = instantiate_node(SyntaxNode,input, i6...index, s6) r6.extend(Timezone1) else @index = i6 r6 = nil end s0 << r6 end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(Timezone2) else @index = i0 r0 = nil end node_cache[:timezone][start_index] = r0 r0 end def _nt_sign start_index = index if node_cache[:sign].has_key?(index) cached = node_cache[:sign][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?('+', false, index) r1 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('+') r1 = nil end 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[:sign][start_index] = r0 r0 end module LiteralString0 def string elements[1] end end def _nt_literal_string start_index = index if node_cache[:literal_string].has_key?(index) cached = node_cache[:literal_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 r3 = _nt_any_character if r3 s2 << r3 else break end end if s2.empty? @index = i2 r2 = nil else r2 = instantiate_node(SyntaxNode,input, i2...index, s2) end 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(Nodes::Constants::LiteralString,input, i0...index, s0) r0.extend(LiteralString0) else @index = i0 r0 = nil end node_cache[:literal_string][start_index] = r0 r0 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 s0, i0 = [], index loop do r1 = _nt_valid_character if r1 s0 << r1 else break end end if s0.empty? @index = i0 r0 = nil else r0 = instantiate_node(Nodes::Constants::String,input, i0...index, s0) end node_cache[:string][start_index] = r0 r0 end def _nt_any_character start_index = index if node_cache[:any_character].has_key?(index) cached = node_cache[:any_character][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_valid_character if r1 r0 = r1 else r2 = _nt_reserved_character if r2 r0 = r2 else @index = i0 r0 = nil end end node_cache[:any_character][start_index] = r0 r0 end def _nt_valid_character start_index = index if node_cache[:valid_character].has_key?(index) cached = node_cache[:valid_character][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[0-9a-zA-ZÁÀÄÂÃÅĀĂǍáàäâãåāăǎÉÈËÊĒĔĖĚéèëêēĕėěÍÌÏÎĨĬǏíìïîĩĭǐÓÒÖÔÕŌŎŐǑóòöôõōŏőǒÚÙÜÛŨŪŬŮŰǓúùüûũūŭůűǔÑñçÇ%@#+-_\'?!$*/\\s]', true, index) r0 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else r0 = nil end node_cache[:valid_character][start_index] = r0 r0 end def _nt_boolean start_index = index if node_cache[:boolean].has_key?(index) cached = node_cache[:boolean][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_true if r1 r0 = r1 else r2 = _nt_false if r2 r0 = r2 else @index = i0 r0 = nil end end node_cache[:boolean][start_index] = r0 r0 end def _nt_true start_index = index if node_cache[:true].has_key?(index) cached = node_cache[:true][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if has_terminal?('true', false, index) r0 = instantiate_node(Nodes::Constants::True,input, index...(index + 4)) @index += 4 else terminal_parse_failure('true') r0 = nil end node_cache[:true][start_index] = r0 r0 end def _nt_false start_index = index if node_cache[:false].has_key?(index) cached = node_cache[:false][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', false, index) r0 = instantiate_node(Nodes::Constants::False,input, index...(index + 5)) @index += 5 else terminal_parse_failure('false') r0 = nil end node_cache[:false][start_index] = r0 r0 end module Float0 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, s0 = index, [] s1, i1 = [], index loop do r2 = _nt_digit if r2 s1 << r2 else break end end if s1.empty? @index = i1 r1 = nil else r1 = instantiate_node(SyntaxNode,input, i1...index, s1) end s0 << r1 if r1 if has_terminal?('.', false, index) r3 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('.') r3 = nil end s0 << r3 if r3 s4, i4 = [], index loop do r5 = _nt_digit 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(Nodes::Constants::Float,input, i0...index, s0) r0.extend(Float0) else @index = i0 r0 = nil end node_cache[:float][start_index] = r0 r0 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 s0, i0 = [], index loop do r1 = _nt_digit if r1 s0 << r1 else break end end if s0.empty? @index = i0 r0 = nil else r0 = instantiate_node(Nodes::Constants::Integer,input, i0...index, s0) end node_cache[:integer][start_index] = r0 r0 end def _nt_digit start_index = index if node_cache[:digit].has_key?(index) cached = node_cache[:digit][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[0-9]', true, index) r0 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else r0 = nil end node_cache[:digit][start_index] = r0 r0 end def _nt_reserved_character start_index = index if node_cache[:reserved_character].has_key?(index) cached = node_cache[:reserved_character][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[&|.():!=<>~]', true, index) r0 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else r0 = nil end node_cache[:reserved_character][start_index] = r0 r0 end end class SyntaxParser < Treetop::Runtime::CompiledParser include Syntax end end end end