Regenerate the output results for test fixtures of racc

This commit is contained in:
Hiroshi SHIBATA 2019-10-30 21:01:30 +09:00
Родитель d3272fcba3
Коммит e6d611ad37
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: F9CF13417264FAC2
29 изменённых файлов: 2556 добавлений и 2556 удалений

Просмотреть файл

@ -32,4 +32,4 @@ end
---- footer ---- footer
InfiniteLoop.new.parse InfiniteLoop.new.parse

Просмотреть файл

@ -27,7 +27,7 @@ rule
result.push val[1] result.push val[1]
} }
| stmt_list EOL | stmt_list EOL
stmt : expr stmt : expr
| assign | assign
| IDENT realprim | IDENT realprim
@ -38,7 +38,7 @@ rule
| if_stmt | if_stmt
| while_stmt | while_stmt
| defun | defun
if_stmt : IF stmt THEN EOL stmt_list else_stmt END if_stmt : IF stmt THEN EOL stmt_list else_stmt END
{ {
result = IfNode.new( @fname, val[0][0], result = IfNode.new( @fname, val[0][0],
@ -261,7 +261,7 @@ module Intp
class Core class Core
def initialize def initialize
@ftab = {} @ftab = {}
@obj = Object.new @obj = Object.new
@stack = [] @stack = []
@ -318,7 +318,7 @@ module Intp
def lvar?(name) def lvar?(name)
@lvars.key? name @lvars.key? name
end end
def [](key) def [](key)
@lvars[key] @lvars[key]
end end

Просмотреть файл

@ -310,4 +310,4 @@ rule
args << [ :kwarg, retag([ k, v ]), k, v ] args << [ :kwarg, retag([ k, v ]), k, v ]
end end
} }
end end

Просмотреть файл

@ -35,7 +35,7 @@ rule
@field.domain = mb.domain @field.domain = mb.domain
} }
; ;
datetime : day DIGIT ATOM DIGIT hour zone datetime : day DIGIT ATOM DIGIT hour zone
# 0 1 2 3 4 5 # 0 1 2 3 4 5
# day month year # day month year
@ -44,11 +44,11 @@ rule
result = (t + val[4] - val[5]).localtime result = (t + val[4] - val[5]).localtime
} }
; ;
day : /* none */ day : /* none */
| ATOM ',' | ATOM ','
; ;
hour : DIGIT ':' DIGIT hour : DIGIT ':' DIGIT
{ {
result = (result.to_i * 60 * 60) + (val[2].to_i * 60) result = (result.to_i * 60 * 60) + (val[2].to_i * 60)
@ -60,16 +60,16 @@ rule
+ val[4].to_i + val[4].to_i
} }
; ;
zone : ATOM zone : ATOM
{ {
result = ::TMail.zonestr2i( val[0] ) * 60 result = ::TMail.zonestr2i( val[0] ) * 60
} }
; ;
received : from by via with id for recvdatetime received : from by via with id for recvdatetime
; ;
from : /* none */ from : /* none */
| FROM domain | FROM domain
{ {
@ -84,28 +84,28 @@ rule
@field.from = Address.join( val[1] ) @field.from = Address.join( val[1] )
} }
; ;
by : /* none */ by : /* none */
| BY domain | BY domain
{ {
@field.by = Address.join( val[1] ) @field.by = Address.join( val[1] )
} }
; ;
via : /* none */ via : /* none */
| VIA ATOM | VIA ATOM
{ {
@field.via = val[1] @field.via = val[1]
} }
; ;
with : /* none */ with : /* none */
| WITH ATOM | WITH ATOM
{ {
@field.with.push val[1] @field.with.push val[1]
} }
; ;
id : /* none */ id : /* none */
| ID msgid | ID msgid
{ {
@ -116,14 +116,14 @@ rule
@field.msgid = val[1] @field.msgid = val[1]
} }
; ;
for : /* none */ for : /* none */
| FOR addr | FOR addr
{ {
@field.for_ = val[1].address @field.for_ = val[1].address
} }
; ;
recvdatetime recvdatetime
: /* none */ : /* none */
| ';' datetime | ';' datetime
@ -131,7 +131,7 @@ rule
@field.date = val[1] @field.date = val[1]
} }
; ;
returnpath: '<' '>' returnpath: '<' '>'
| routeaddr | routeaddr
{ {
@ -173,7 +173,7 @@ rule
} }
# | phrase ':' ';' { result = AddressGroup.new( result ) } # | phrase ':' ';' { result = AddressGroup.new( result ) }
; ;
routeaddr : '<' route spec '>' routeaddr : '<' route spec '>'
{ {
result = val[2] result = val[2]
@ -184,22 +184,22 @@ rule
result = val[1] result = val[1]
} }
; ;
route : at_domains ':' route : at_domains ':'
; ;
at_domains: '@' domain { result = [ val[1] ] } at_domains: '@' domain { result = [ val[1] ] }
| at_domains ',' '@' domain { result.push val[3] } | at_domains ',' '@' domain { result.push val[3] }
; ;
spec : local '@' domain { result = Address.new( val[0], val[2] ) } spec : local '@' domain { result = Address.new( val[0], val[2] ) }
| local { result = Address.new( result, nil ) } | local { result = Address.new( result, nil ) }
; ;
local : word { result = val } local : word { result = val }
| local '.' word { result.push val[2] } | local '.' word { result.push val[2] }
; ;
domain : domword { result = val } domain : domword { result = val }
| domain '.' domword { result.push val[2] } | domain '.' domword { result.push val[2] }
; ;
@ -215,11 +215,11 @@ rule
result = val.join('') result = val.join('')
} }
; ;
phrase : word phrase : word
| phrase word { result << ' ' << val[1] } | phrase word { result << ' ' << val[1] }
; ;
word : atom word : atom
| QUOTED | QUOTED
| DIGIT | DIGIT
@ -228,7 +228,7 @@ rule
keys : phrase keys : phrase
| keys ',' phrase | keys ',' phrase
; ;
enc : word enc : word
{ {
@field.encrypter = val[0] @field.encrypter = val[0]
@ -258,7 +258,7 @@ rule
@field.sub = '' @field.sub = ''
} }
; ;
params : /* none */ params : /* none */
| params ';' TOKEN '=' value | params ';' TOKEN '=' value
{ {
@ -281,7 +281,7 @@ rule
@field.disposition = val[0] @field.disposition = val[0]
} }
; ;
disp_params disp_params
: /* none */ : /* none */
| disp_params ';' disp_param | disp_params ';' disp_param
@ -293,7 +293,7 @@ rule
@field.params[ val[0].downcase ] = val[2] @field.params[ val[0].downcase ] = val[2]
} }
; ;
atom : ATOM atom : ATOM
| FROM | FROM
| BY | BY
@ -302,7 +302,7 @@ rule
| ID | ID
| FOR | FOR
; ;
end end
@ -382,7 +382,7 @@ module TMail
@scanner.scan @pass_array @scanner.scan @pass_array
end end
end end
def on_error( tok, val, vstack ) def on_error( tok, val, vstack )
raise ParseError, raise ParseError,
"\nparse error in '#{@field.name}' header, on token #{val.inspect}" "\nparse error in '#{@field.name}' header, on token #{val.inspect}"

Просмотреть файл

@ -33,7 +33,7 @@ class MOF::Parser
octalValue octalValue
decimalValue decimalValue
hexValue hexValue
rule rule
/* Returns a Hash of filename and MofResult */ /* Returns a Hash of filename and MofResult */
@ -47,7 +47,7 @@ rule
result[@name] = @result result[@name] = @result
} }
; ;
mofProduction mofProduction
: compilerDirective : compilerDirective
| classDeclaration | classDeclaration
@ -66,7 +66,7 @@ rule
* compilerDirective * compilerDirective
* *
*/ */
compilerDirective compilerDirective
: "#" PRAGMA INCLUDE pragmaParameters_opt : "#" PRAGMA INCLUDE pragmaParameters_opt
{ raise MOF::Helper::Error.new(@name,@lineno,@line,"Missing filename after '#pragma include'") unless val[3] { raise MOF::Helper::Error.new(@name,@lineno,@line,"Missing filename after '#pragma include'") unless val[3]
@ -107,7 +107,7 @@ rule
* classDeclaration * classDeclaration
* *
*/ */
classDeclaration classDeclaration
: qualifierList_opt CLASS className alias_opt superClass_opt "{" classFeatures "}" ";" : qualifierList_opt CLASS className alias_opt superClass_opt "{" classFeatures "}" ";"
{ qualifiers = val[0] { qualifiers = val[0]
@ -151,7 +151,7 @@ rule
result << val[2] if val[2] result << val[2] if val[2]
} }
; ;
qualifier qualifier
: qualifierName qualifierParameter_opt flavor_opt : qualifierName qualifierParameter_opt flavor_opt
{ # Get qualifier decl { # Get qualifier decl
@ -242,7 +242,7 @@ rule
result = CIM::Property.new(type,val[2],val[0],val[4]) result = CIM::Property.new(type,val[2],val[0],val[4])
} }
; ;
referenceDeclaration referenceDeclaration
: qualifierList_opt objectRef referenceName array_opt defaultValue_opt ";" : qualifierList_opt objectRef referenceName array_opt defaultValue_opt ";"
{ if val[4] { if val[4]
@ -308,7 +308,7 @@ rule
: /* empty */ : /* empty */
| parameterList | parameterList
; ;
parameterList parameterList
: parameter parameters : parameter parameters
{ result = val[1].unshift val[0] } { result = val[1].unshift val[0] }
@ -367,7 +367,7 @@ rule
: /* empty */ : /* empty */
| defaultValue | defaultValue
; ;
defaultValue defaultValue
: "=" initializer : "=" initializer
{ result = val[1] } { result = val[1] }
@ -416,7 +416,7 @@ rule
| string stringValue | string stringValue
{ result = val[0] + val[1] } { result = val[0] + val[1] }
; ;
referenceInitializer referenceInitializer
: objectHandle : objectHandle
| aliasIdentifier | aliasIdentifier
@ -465,7 +465,7 @@ rule
* qualifierDeclaration * qualifierDeclaration
* *
*/ */
qualifierDeclaration qualifierDeclaration
/* 0 1 2 3 4 */ /* 0 1 2 3 4 */
: QUALIFIER qualifierName qualifierType scope defaultFlavor_opt ";" : QUALIFIER qualifierName qualifierType scope defaultFlavor_opt ";"
@ -534,7 +534,7 @@ rule
* instanceDeclaration * instanceDeclaration
* *
*/ */
instanceDeclaration instanceDeclaration
: instance ";" : instance ";"
; ;
@ -583,7 +583,7 @@ def initialize options = {}
@includes = options[:includes] || [] @includes = options[:includes] || []
@quiet = options[:quiet] @quiet = options[:quiet]
@style = options[:style] || :cim # default to style CIM v2.2 syntax @style = options[:style] || :cim # default to style CIM v2.2 syntax
@lineno = 1 @lineno = 1
@file = nil @file = nil
@iconv = nil @iconv = nil

Просмотреть файл

@ -6,10 +6,10 @@ class A
rule rule
targ: operation voidhead targ: operation voidhead
| variable | variable
voidhead : void B voidhead : void B
void: void:
operation: A operation: A
variable : A variable : A
end end

Просмотреть файл

@ -4,19 +4,19 @@ rule
content: RecvH received content: RecvH received
; ;
datetime: day datetime: day
; ;
msgid: '<' spec '>'; msgid: '<' spec '>';
day: day:
| ATOM ',' | ATOM ','
; ;
received: recvitem_list recvdatetime received: recvitem_list recvdatetime
; ;
recvitem_list: recvitem_list:
| recvitem_list recvitem | recvitem_list recvitem
; ;
@ -26,25 +26,25 @@ rule
by: by:
| BY domain | BY domain
; ;
via: via:
| VIA ATOM | VIA ATOM
; ;
with: WITH ATOM with: WITH ATOM
; ;
for: for:
| FOR addr | FOR addr
; ;
recvdatetime: recvdatetime:
| ';' datetime | ';' datetime
; ;
addr: mbox | group ; addr: mbox | group ;
mboxes: mbox mboxes: mbox
| mboxes ',' mbox | mboxes ',' mbox
; ;
@ -59,21 +59,21 @@ rule
routeaddr: '<' route spec '>' routeaddr: '<' route spec '>'
| '<' spec '>' | '<' spec '>'
; ;
route: at_domains ':' ; route: at_domains ':' ;
at_domains: '@' domain at_domains: '@' domain
| at_domains ',' '@' domain | at_domains ',' '@' domain
; ;
spec: local '@' domain spec: local '@' domain
| local | local
; ;
local: word local: word
| local '.' word | local '.' word
; ;
domain: domword domain: domword
| domain '.' domword | domain '.' domword
; ;
@ -86,12 +86,12 @@ rule
phrase: word phrase: word
| phrase word | phrase word
; ;
word: atom word: atom
| QUOTED | QUOTED
| DIGIT | DIGIT
; ;
atom: ATOM | FROM | BY | VIA | WITH | ID | FOR ; atom: ATOM | FROM | BY | VIA | WITH | ID | FOR ;
end end

Просмотреть файл

@ -31,7 +31,7 @@ rule
print 'cba' print 'cba'
} }
| cont | cont
cont : A c2 B c2 C cont : A c2 B c2 C
c2 : C C C C C c2 : C C C C C

Просмотреть файл

@ -196,7 +196,7 @@ def parse( io )
# @q.push [ false, nil ] # @q.push [ false, nil ]
@q.push [ false, [@s.pos, nil] ] @q.push [ false, [@s.pos, nil] ]
## call racc's private parse method ## call racc's private parse method
do_parse do_parse
end end

Просмотреть файл

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.4.14 # This file is automatically generated by Racc 1.4.16.pre.1
# from Racc grammer file "". # from Racc grammer file "".
# #
@ -369,63 +369,63 @@ Racc_debug_parser = false
module_eval(<<'.,.,', 'cadenza.y', 12) module_eval(<<'.,.,', 'cadenza.y', 12)
def _reduce_2(val, _values, result) def _reduce_2(val, _values, result)
result = nil result = nil
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 16) module_eval(<<'.,.,', 'cadenza.y', 16)
def _reduce_3(val, _values, result) def _reduce_3(val, _values, result)
result = [val[0]] result = [val[0]]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 17) module_eval(<<'.,.,', 'cadenza.y', 17)
def _reduce_4(val, _values, result) def _reduce_4(val, _values, result)
result = val[0].push(val[2]) result = val[0].push(val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 22) module_eval(<<'.,.,', 'cadenza.y', 22)
def _reduce_5(val, _values, result) def _reduce_5(val, _values, result)
result = VariableNode.new(val[0].value) result = VariableNode.new(val[0].value)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 23) module_eval(<<'.,.,', 'cadenza.y', 23)
def _reduce_6(val, _values, result) def _reduce_6(val, _values, result)
result = VariableNode.new(val[0].value, val[1]) result = VariableNode.new(val[0].value, val[1])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 24) module_eval(<<'.,.,', 'cadenza.y', 24)
def _reduce_7(val, _values, result) def _reduce_7(val, _values, result)
result = ConstantNode.new(val[0].value) result = ConstantNode.new(val[0].value)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 25) module_eval(<<'.,.,', 'cadenza.y', 25)
def _reduce_8(val, _values, result) def _reduce_8(val, _values, result)
result = ConstantNode.new(val[0].value) result = ConstantNode.new(val[0].value)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 26) module_eval(<<'.,.,', 'cadenza.y', 26)
def _reduce_9(val, _values, result) def _reduce_9(val, _values, result)
result = ConstantNode.new(val[0].value) result = ConstantNode.new(val[0].value)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 27) module_eval(<<'.,.,', 'cadenza.y', 27)
def _reduce_10(val, _values, result) def _reduce_10(val, _values, result)
result = val[1] result = val[1]
result result
end end
.,., .,.,
@ -434,14 +434,14 @@ module_eval(<<'.,.,', 'cadenza.y', 27)
module_eval(<<'.,.,', 'cadenza.y', 32) module_eval(<<'.,.,', 'cadenza.y', 32)
def _reduce_12(val, _values, result) def _reduce_12(val, _values, result)
result = OperationNode.new(val[0], "*", val[2]) result = OperationNode.new(val[0], "*", val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 33) module_eval(<<'.,.,', 'cadenza.y', 33)
def _reduce_13(val, _values, result) def _reduce_13(val, _values, result)
result = OperationNode.new(val[0], "/", val[2]) result = OperationNode.new(val[0], "/", val[2])
result result
end end
.,., .,.,
@ -450,14 +450,14 @@ module_eval(<<'.,.,', 'cadenza.y', 33)
module_eval(<<'.,.,', 'cadenza.y', 38) module_eval(<<'.,.,', 'cadenza.y', 38)
def _reduce_15(val, _values, result) def _reduce_15(val, _values, result)
result = OperationNode.new(val[0], "+", val[2]) result = OperationNode.new(val[0], "+", val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 39) module_eval(<<'.,.,', 'cadenza.y', 39)
def _reduce_16(val, _values, result) def _reduce_16(val, _values, result)
result = OperationNode.new(val[0], "-", val[2]) result = OperationNode.new(val[0], "-", val[2])
result result
end end
.,., .,.,
@ -466,42 +466,42 @@ module_eval(<<'.,.,', 'cadenza.y', 39)
module_eval(<<'.,.,', 'cadenza.y', 44) module_eval(<<'.,.,', 'cadenza.y', 44)
def _reduce_18(val, _values, result) def _reduce_18(val, _values, result)
result = OperationNode.new(val[0], "==", val[2]) result = OperationNode.new(val[0], "==", val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 45) module_eval(<<'.,.,', 'cadenza.y', 45)
def _reduce_19(val, _values, result) def _reduce_19(val, _values, result)
result = OperationNode.new(val[0], "!=", val[2]) result = OperationNode.new(val[0], "!=", val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 46) module_eval(<<'.,.,', 'cadenza.y', 46)
def _reduce_20(val, _values, result) def _reduce_20(val, _values, result)
result = OperationNode.new(val[0], "<=", val[2]) result = OperationNode.new(val[0], "<=", val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 47) module_eval(<<'.,.,', 'cadenza.y', 47)
def _reduce_21(val, _values, result) def _reduce_21(val, _values, result)
result = OperationNode.new(val[0], ">=", val[2]) result = OperationNode.new(val[0], ">=", val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 48) module_eval(<<'.,.,', 'cadenza.y', 48)
def _reduce_22(val, _values, result) def _reduce_22(val, _values, result)
result = OperationNode.new(val[0], ">", val[2]) result = OperationNode.new(val[0], ">", val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 49) module_eval(<<'.,.,', 'cadenza.y', 49)
def _reduce_23(val, _values, result) def _reduce_23(val, _values, result)
result = OperationNode.new(val[0], "<", val[2]) result = OperationNode.new(val[0], "<", val[2])
result result
end end
.,., .,.,
@ -510,7 +510,7 @@ module_eval(<<'.,.,', 'cadenza.y', 49)
module_eval(<<'.,.,', 'cadenza.y', 54) module_eval(<<'.,.,', 'cadenza.y', 54)
def _reduce_25(val, _values, result) def _reduce_25(val, _values, result)
result = BooleanInverseNode.new(val[1]) result = BooleanInverseNode.new(val[1])
result result
end end
.,., .,.,
@ -519,42 +519,42 @@ module_eval(<<'.,.,', 'cadenza.y', 54)
module_eval(<<'.,.,', 'cadenza.y', 59) module_eval(<<'.,.,', 'cadenza.y', 59)
def _reduce_27(val, _values, result) def _reduce_27(val, _values, result)
result = OperationNode.new(val[0], "and", val[2]) result = OperationNode.new(val[0], "and", val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 60) module_eval(<<'.,.,', 'cadenza.y', 60)
def _reduce_28(val, _values, result) def _reduce_28(val, _values, result)
result = OperationNode.new(val[0], "or", val[2]) result = OperationNode.new(val[0], "or", val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 64) module_eval(<<'.,.,', 'cadenza.y', 64)
def _reduce_29(val, _values, result) def _reduce_29(val, _values, result)
result = FilterNode.new(val[0].value) result = FilterNode.new(val[0].value)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 65) module_eval(<<'.,.,', 'cadenza.y', 65)
def _reduce_30(val, _values, result) def _reduce_30(val, _values, result)
result = FilterNode.new(val[0].value, val[2]) result = FilterNode.new(val[0].value, val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 69) module_eval(<<'.,.,', 'cadenza.y', 69)
def _reduce_31(val, _values, result) def _reduce_31(val, _values, result)
result = [val[0]] result = [val[0]]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 70) module_eval(<<'.,.,', 'cadenza.y', 70)
def _reduce_32(val, _values, result) def _reduce_32(val, _values, result)
result = val[0].push(val[2]) result = val[0].push(val[2])
result result
end end
.,., .,.,
@ -563,189 +563,189 @@ module_eval(<<'.,.,', 'cadenza.y', 70)
module_eval(<<'.,.,', 'cadenza.y', 75) module_eval(<<'.,.,', 'cadenza.y', 75)
def _reduce_34(val, _values, result) def _reduce_34(val, _values, result)
result = FilteredValueNode.new(val[0], val[2]) result = FilteredValueNode.new(val[0], val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 79) module_eval(<<'.,.,', 'cadenza.y', 79)
def _reduce_35(val, _values, result) def _reduce_35(val, _values, result)
result = val[1] result = val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 83) module_eval(<<'.,.,', 'cadenza.y', 83)
def _reduce_36(val, _values, result) def _reduce_36(val, _values, result)
open_scope!; result = val[2] open_scope!; result = val[2]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 84) module_eval(<<'.,.,', 'cadenza.y', 84)
def _reduce_37(val, _values, result) def _reduce_37(val, _values, result)
open_scope!; result = BooleanInverseNode.new(val[2]) open_scope!; result = BooleanInverseNode.new(val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 88) module_eval(<<'.,.,', 'cadenza.y', 88)
def _reduce_38(val, _values, result) def _reduce_38(val, _values, result)
result = close_scope!; open_scope! result = close_scope!; open_scope!
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 92) module_eval(<<'.,.,', 'cadenza.y', 92)
def _reduce_39(val, _values, result) def _reduce_39(val, _values, result)
result = close_scope! result = close_scope!
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 93) module_eval(<<'.,.,', 'cadenza.y', 93)
def _reduce_40(val, _values, result) def _reduce_40(val, _values, result)
result = close_scope! result = close_scope!
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 97) module_eval(<<'.,.,', 'cadenza.y', 97)
def _reduce_41(val, _values, result) def _reduce_41(val, _values, result)
result = IfNode.new(val[0], val[1]) result = IfNode.new(val[0], val[1])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 98) module_eval(<<'.,.,', 'cadenza.y', 98)
def _reduce_42(val, _values, result) def _reduce_42(val, _values, result)
result = IfNode.new(val[0], val[2]) result = IfNode.new(val[0], val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 99) module_eval(<<'.,.,', 'cadenza.y', 99)
def _reduce_43(val, _values, result) def _reduce_43(val, _values, result)
result = IfNode.new(val[0], val[1], val[3]) result = IfNode.new(val[0], val[1], val[3])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 100) module_eval(<<'.,.,', 'cadenza.y', 100)
def _reduce_44(val, _values, result) def _reduce_44(val, _values, result)
result = IfNode.new(val[0], val[2], val[3]) result = IfNode.new(val[0], val[2], val[3])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 101) module_eval(<<'.,.,', 'cadenza.y', 101)
def _reduce_45(val, _values, result) def _reduce_45(val, _values, result)
result = IfNode.new(val[0], val[2], val[4]) result = IfNode.new(val[0], val[2], val[4])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 105) module_eval(<<'.,.,', 'cadenza.y', 105)
def _reduce_46(val, _values, result) def _reduce_46(val, _values, result)
open_scope!; result = [val[2].value, val[4]] open_scope!; result = [val[2].value, val[4]]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 109) module_eval(<<'.,.,', 'cadenza.y', 109)
def _reduce_47(val, _values, result) def _reduce_47(val, _values, result)
result = close_scope! result = close_scope!
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 114) module_eval(<<'.,.,', 'cadenza.y', 114)
def _reduce_48(val, _values, result) def _reduce_48(val, _values, result)
result = ForNode.new(VariableNode.new(val[0].first), val[0].last, val[1]) result = ForNode.new(VariableNode.new(val[0].first), val[0].last, val[1])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 115) module_eval(<<'.,.,', 'cadenza.y', 115)
def _reduce_49(val, _values, result) def _reduce_49(val, _values, result)
result = ForNode.new(VariableNode.new(val[0].first), val[0].last, val[2]) result = ForNode.new(VariableNode.new(val[0].first), val[0].last, val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 119) module_eval(<<'.,.,', 'cadenza.y', 119)
def _reduce_50(val, _values, result) def _reduce_50(val, _values, result)
result = open_block_scope!(val[2].value) result = open_block_scope!(val[2].value)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 123) module_eval(<<'.,.,', 'cadenza.y', 123)
def _reduce_51(val, _values, result) def _reduce_51(val, _values, result)
result = close_block_scope! result = close_block_scope!
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 128) module_eval(<<'.,.,', 'cadenza.y', 128)
def _reduce_52(val, _values, result) def _reduce_52(val, _values, result)
result = BlockNode.new(val[0], val[1]) result = BlockNode.new(val[0], val[1])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 129) module_eval(<<'.,.,', 'cadenza.y', 129)
def _reduce_53(val, _values, result) def _reduce_53(val, _values, result)
result = BlockNode.new(val[0], val[2]) result = BlockNode.new(val[0], val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 133) module_eval(<<'.,.,', 'cadenza.y', 133)
def _reduce_54(val, _values, result) def _reduce_54(val, _values, result)
open_scope!; result = [val[1].value, []] open_scope!; result = [val[1].value, []]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 134) module_eval(<<'.,.,', 'cadenza.y', 134)
def _reduce_55(val, _values, result) def _reduce_55(val, _values, result)
open_scope!; result = [val[1].value, val[2]] open_scope!; result = [val[1].value, val[2]]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 138) module_eval(<<'.,.,', 'cadenza.y', 138)
def _reduce_56(val, _values, result) def _reduce_56(val, _values, result)
result = close_scope! result = close_scope!
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 142) module_eval(<<'.,.,', 'cadenza.y', 142)
def _reduce_57(val, _values, result) def _reduce_57(val, _values, result)
result = GenericBlockNode.new(val[0].first, val[2], val[0].last) result = GenericBlockNode.new(val[0].first, val[2], val[0].last)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 146) module_eval(<<'.,.,', 'cadenza.y', 146)
def _reduce_58(val, _values, result) def _reduce_58(val, _values, result)
result = val[2].value result = val[2].value
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 147) module_eval(<<'.,.,', 'cadenza.y', 147)
def _reduce_59(val, _values, result) def _reduce_59(val, _values, result)
result = VariableNode.new(val[2].value) result = VariableNode.new(val[2].value)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 151) module_eval(<<'.,.,', 'cadenza.y', 151)
def _reduce_60(val, _values, result) def _reduce_60(val, _values, result)
result = TextNode.new(val[0].value) result = TextNode.new(val[0].value)
result result
end end
.,., .,.,
@ -762,28 +762,28 @@ module_eval(<<'.,.,', 'cadenza.y', 151)
module_eval(<<'.,.,', 'cadenza.y', 160) module_eval(<<'.,.,', 'cadenza.y', 160)
def _reduce_66(val, _values, result) def _reduce_66(val, _values, result)
push val[0] push val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 161) module_eval(<<'.,.,', 'cadenza.y', 161)
def _reduce_67(val, _values, result) def _reduce_67(val, _values, result)
push val[1] push val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 162) module_eval(<<'.,.,', 'cadenza.y', 162)
def _reduce_68(val, _values, result) def _reduce_68(val, _values, result)
document.extends = val[0] document.extends = val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cadenza.y', 163) module_eval(<<'.,.,', 'cadenza.y', 163)
def _reduce_69(val, _values, result) def _reduce_69(val, _values, result)
document.extends = val[1] document.extends = val[1]
result result
end end
.,., .,.,
@ -793,4 +793,4 @@ def _reduce_none(val, _values, result)
end end
end # class RaccParser end # class RaccParser
end # module Cadenza end # module Cadenza

Просмотреть файл

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.4.14 # This file is automatically generated by Racc 1.4.16.pre.1
# from Racc grammer file "". # from Racc grammer file "".
# #
@ -2491,14 +2491,14 @@ module_eval(<<'.,.,', 'cast.y', 269)
module_eval(<<'.,.,', 'cast.y', 273) module_eval(<<'.,.,', 'cast.y', 273)
def _reduce_135(val, _values, result) def _reduce_135(val, _values, result)
result = add_type_quals(Pointer.new_at(val[0].pos), val[1][1]) result = add_type_quals(Pointer.new_at(val[0].pos), val[1][1])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'cast.y', 274) module_eval(<<'.,.,', 'cast.y', 274)
def _reduce_136(val, _values, result) def _reduce_136(val, _values, result)
result = Pointer.new_at(val[0].pos) result = Pointer.new_at(val[0].pos)
result result
end end
.,., .,.,
@ -2604,7 +2604,7 @@ module_eval(<<'.,.,', 'cast.y', 307)
module_eval(<<'.,.,', 'cast.y', 308) module_eval(<<'.,.,', 'cast.y', 308)
def _reduce_151(val, _values, result) def _reduce_151(val, _values, result)
result = make_direct_type(val[0][0], val[0][1]) result = make_direct_type(val[0][0], val[0][1])
result result
end end
.,., .,.,
@ -3356,7 +3356,7 @@ module_eval(<<'.,.,', 'cast.y', 507)
result = Comma.new_at(val[0].pos, NodeArray[val[0], val[2]]) result = Comma.new_at(val[0].pos, NodeArray[val[0], val[2]])
end end
end end
result result
end end
.,., .,.,
@ -3412,7 +3412,7 @@ module_eval(<<'.,.,', 'cast.y', 559)
module_eval(<<'.,.,', 'cast.y', 560) module_eval(<<'.,.,', 'cast.y', 560)
def _reduce_264(val, _values, result) def _reduce_264(val, _values, result)
result = val[0].val; result.pos = val[0].pos result = val[0].val; result.pos = val[0].pos
result result
end end
.,., .,.,
@ -3422,4 +3422,4 @@ def _reduce_none(val, _values, result)
end end
end # class Parser end # class Parser
end # module C end # module C

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.4.14 # This file is automatically generated by Racc 1.4.16.pre.1
# from Racc grammer file "". # from Racc grammer file "".
# #
@ -829,28 +829,28 @@ Racc_debug_parser = false
module_eval(<<'.,.,', 'edtf.y', 54) module_eval(<<'.,.,', 'edtf.y', 54)
def _reduce_8(val, _values, result) def _reduce_8(val, _values, result)
result = Date.new(val[0]).year_precision! result = Date.new(val[0]).year_precision!
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 55) module_eval(<<'.,.,', 'edtf.y', 55)
def _reduce_9(val, _values, result) def _reduce_9(val, _values, result)
result = Date.new(*val.flatten).month_precision! result = Date.new(*val.flatten).month_precision!
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 56) module_eval(<<'.,.,', 'edtf.y', 56)
def _reduce_10(val, _values, result) def _reduce_10(val, _values, result)
result = Date.new(*val.flatten).day_precision! result = Date.new(*val.flatten).day_precision!
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 59) module_eval(<<'.,.,', 'edtf.y', 59)
def _reduce_11(val, _values, result) def _reduce_11(val, _values, result)
result = -val[1] result = -val[1]
result result
end end
.,., .,.,
@ -859,7 +859,7 @@ module_eval(<<'.,.,', 'edtf.y', 63)
def _reduce_12(val, _values, result) def _reduce_12(val, _values, result)
result = DateTime.new(val[0].year, val[0].month, val[0].day, *val[2]) result = DateTime.new(val[0].year, val[0].month, val[0].day, *val[2])
result.skip_timezone = (val[2].length == 3) result.skip_timezone = (val[2].length == 3)
result result
end end
.,., .,.,
@ -868,14 +868,14 @@ module_eval(<<'.,.,', 'edtf.y', 63)
module_eval(<<'.,.,', 'edtf.y', 68) module_eval(<<'.,.,', 'edtf.y', 68)
def _reduce_14(val, _values, result) def _reduce_14(val, _values, result)
result = val.flatten result = val.flatten
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 70) module_eval(<<'.,.,', 'edtf.y', 70)
def _reduce_15(val, _values, result) def _reduce_15(val, _values, result)
result = val.values_at(0, 2, 4) result = val.values_at(0, 2, 4)
result result
end end
.,., .,.,
@ -884,28 +884,28 @@ module_eval(<<'.,.,', 'edtf.y', 70)
module_eval(<<'.,.,', 'edtf.y', 73) module_eval(<<'.,.,', 'edtf.y', 73)
def _reduce_17(val, _values, result) def _reduce_17(val, _values, result)
result = [24, 0, 0] result = [24, 0, 0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 75) module_eval(<<'.,.,', 'edtf.y', 75)
def _reduce_18(val, _values, result) def _reduce_18(val, _values, result)
result = 0 result = 0
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 76) module_eval(<<'.,.,', 'edtf.y', 76)
def _reduce_19(val, _values, result) def _reduce_19(val, _values, result)
result = -1 * val[1] result = -1 * val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 77) module_eval(<<'.,.,', 'edtf.y', 77)
def _reduce_20(val, _values, result) def _reduce_20(val, _values, result)
result = val[1] result = val[1]
result result
end end
.,., .,.,
@ -914,28 +914,28 @@ module_eval(<<'.,.,', 'edtf.y', 77)
module_eval(<<'.,.,', 'edtf.y', 81) module_eval(<<'.,.,', 'edtf.y', 81)
def _reduce_22(val, _values, result) def _reduce_22(val, _values, result)
result = 0 result = 0
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 85) module_eval(<<'.,.,', 'edtf.y', 85)
def _reduce_23(val, _values, result) def _reduce_23(val, _values, result)
result = Rational(val[0] * 60 + val[2], 1440) result = Rational(val[0] * 60 + val[2], 1440)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 86) module_eval(<<'.,.,', 'edtf.y', 86)
def _reduce_24(val, _values, result) def _reduce_24(val, _values, result)
result = Rational(840, 1440) result = Rational(840, 1440)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 87) module_eval(<<'.,.,', 'edtf.y', 87)
def _reduce_25(val, _values, result) def _reduce_25(val, _values, result)
result = Rational(val[3], 1440) result = Rational(val[3], 1440)
result result
end end
.,., .,.,
@ -943,7 +943,7 @@ module_eval(<<'.,.,', 'edtf.y', 87)
module_eval(<<'.,.,', 'edtf.y', 91) module_eval(<<'.,.,', 'edtf.y', 91)
def _reduce_26(val, _values, result) def _reduce_26(val, _values, result)
result = val.zip([1000,100,10,1]).reduce(0) { |s,(a,b)| s += a * b } result = val.zip([1000,100,10,1]).reduce(0) { |s,(a,b)| s += a * b }
result result
end end
.,., .,.,
@ -954,7 +954,7 @@ module_eval(<<'.,.,', 'edtf.y', 91)
module_eval(<<'.,.,', 'edtf.y', 97) module_eval(<<'.,.,', 'edtf.y', 97)
def _reduce_29(val, _values, result) def _reduce_29(val, _values, result)
result = [val[0], val[2]] result = [val[0], val[2]]
result result
end end
.,., .,.,
@ -965,7 +965,7 @@ module_eval(<<'.,.,', 'edtf.y', 104)
if result[2] > 31 || (result[2] > 30 && [2,4,6,9,11].include?(result[1])) || (result[2] > 29 && result[1] == 2) if result[2] > 31 || (result[2] > 30 && [2,4,6,9,11].include?(result[1])) || (result[2] > 29 && result[1] == 2)
raise ArgumentError, "invalid date (invalid days #{result[2]} for month #{result[1]})" raise ArgumentError, "invalid date (invalid days #{result[2]} for month #{result[1]})"
end end
result result
end end
.,., .,.,
@ -988,7 +988,7 @@ module_eval(<<'.,.,', 'edtf.y', 127)
def _reduce_38(val, _values, result) def _reduce_38(val, _values, result)
result = Date.new(val[0][0]).year_precision! result = Date.new(val[0][0]).year_precision!
result.unspecified.year[2,2] = val[0][1] result.unspecified.year[2,2] = val[0][1]
result result
end end
.,., .,.,
@ -1002,7 +1002,7 @@ module_eval(<<'.,.,', 'edtf.y', 127)
module_eval(<<'.,.,', 'edtf.y', 138) module_eval(<<'.,.,', 'edtf.y', 138)
def _reduce_42(val, _values, result) def _reduce_42(val, _values, result)
result = [val[0,3].zip([1000,100,10]).reduce(0) { |s,(a,b)| s += a * b }, [false,true]] result = [val[0,3].zip([1000,100,10]).reduce(0) { |s,(a,b)| s += a * b }, [false,true]]
result result
end end
.,., .,.,
@ -1010,7 +1010,7 @@ module_eval(<<'.,.,', 'edtf.y', 138)
module_eval(<<'.,.,', 'edtf.y', 142) module_eval(<<'.,.,', 'edtf.y', 142)
def _reduce_43(val, _values, result) def _reduce_43(val, _values, result)
result = [val[0,2].zip([1000,100]).reduce(0) { |s,(a,b)| s += a * b }, [true, true]] result = [val[0,2].zip([1000,100]).reduce(0) { |s,(a,b)| s += a * b }, [true, true]]
result result
end end
.,., .,.,
@ -1019,7 +1019,7 @@ module_eval(<<'.,.,', 'edtf.y', 146)
def _reduce_44(val, _values, result) def _reduce_44(val, _values, result)
result = Date.new(val[0]).unspecified!(:month) result = Date.new(val[0]).unspecified!(:month)
result.precision = :month result.precision = :month
result result
end end
.,., .,.,
@ -1027,7 +1027,7 @@ module_eval(<<'.,.,', 'edtf.y', 146)
module_eval(<<'.,.,', 'edtf.y', 151) module_eval(<<'.,.,', 'edtf.y', 151)
def _reduce_45(val, _values, result) def _reduce_45(val, _values, result)
result = Date.new(*val[0]).unspecified!(:day) result = Date.new(*val[0]).unspecified!(:day)
result result
end end
.,., .,.,
@ -1035,7 +1035,7 @@ module_eval(<<'.,.,', 'edtf.y', 151)
module_eval(<<'.,.,', 'edtf.y', 155) module_eval(<<'.,.,', 'edtf.y', 155)
def _reduce_46(val, _values, result) def _reduce_46(val, _values, result)
result = Date.new(val[0]).unspecified!([:day,:month]) result = Date.new(val[0]).unspecified!([:day,:month])
result result
end end
.,., .,.,
@ -1043,7 +1043,7 @@ module_eval(<<'.,.,', 'edtf.y', 155)
module_eval(<<'.,.,', 'edtf.y', 160) module_eval(<<'.,.,', 'edtf.y', 160)
def _reduce_47(val, _values, result) def _reduce_47(val, _values, result)
result = Interval.new(val[0], val[2]) result = Interval.new(val[0], val[2])
result result
end end
.,., .,.,
@ -1066,7 +1066,7 @@ module_eval(<<'.,.,', 'edtf.y', 171)
def _reduce_55(val, _values, result) def _reduce_55(val, _values, result)
result = Date.new(val[1]) result = Date.new(val[1])
result.precision = :year result.precision = :year
result result
end end
.,., .,.,
@ -1075,7 +1075,7 @@ module_eval(<<'.,.,', 'edtf.y', 176)
def _reduce_56(val, _values, result) def _reduce_56(val, _values, result)
result = Date.new(-1 * val[2]) result = Date.new(-1 * val[2])
result.precision = :year result.precision = :year
result result
end end
.,., .,.,
@ -1083,14 +1083,14 @@ module_eval(<<'.,.,', 'edtf.y', 176)
module_eval(<<'.,.,', 'edtf.y', 183) module_eval(<<'.,.,', 'edtf.y', 183)
def _reduce_57(val, _values, result) def _reduce_57(val, _values, result)
result = val.zip([10000,1000,100,10,1]).reduce(0) { |s,(a,b)| s += a * b } result = val.zip([10000,1000,100,10,1]).reduce(0) { |s,(a,b)| s += a * b }
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 185) module_eval(<<'.,.,', 'edtf.y', 185)
def _reduce_58(val, _values, result) def _reduce_58(val, _values, result)
result = 10 * val[0] + val[1] result = 10 * val[0] + val[1]
result result
end end
.,., .,.,
@ -1099,35 +1099,35 @@ module_eval(<<'.,.,', 'edtf.y', 190)
def _reduce_59(val, _values, result) def _reduce_59(val, _values, result)
result = Season.new(val[0], val[2]) result = Season.new(val[0], val[2])
val[3].each { |ua| result.send(ua) } val[3].each { |ua| result.send(ua) }
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 194) module_eval(<<'.,.,', 'edtf.y', 194)
def _reduce_60(val, _values, result) def _reduce_60(val, _values, result)
result = 21 result = 21
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 195) module_eval(<<'.,.,', 'edtf.y', 195)
def _reduce_61(val, _values, result) def _reduce_61(val, _values, result)
result = 22 result = 22
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 196) module_eval(<<'.,.,', 'edtf.y', 196)
def _reduce_62(val, _values, result) def _reduce_62(val, _values, result)
result = 23 result = 23
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 197) module_eval(<<'.,.,', 'edtf.y', 197)
def _reduce_63(val, _values, result) def _reduce_63(val, _values, result)
result = 24 result = 24
result result
end end
.,., .,.,
@ -1150,7 +1150,7 @@ module_eval(<<'.,.,', 'edtf.y', 197)
module_eval(<<'.,.,', 'edtf.y', 215) module_eval(<<'.,.,', 'edtf.y', 215)
def _reduce_72(val, _values, result) def _reduce_72(val, _values, result)
result = val[0]; result.qualifier = val[1] result = val[0]; result.qualifier = val[1]
result result
end end
.,., .,.,
@ -1158,7 +1158,7 @@ module_eval(<<'.,.,', 'edtf.y', 215)
module_eval(<<'.,.,', 'edtf.y', 221) module_eval(<<'.,.,', 'edtf.y', 221)
def _reduce_73(val, _values, result) def _reduce_73(val, _values, result)
result = Date.new(val[0].year * 10 ** val[2]).year_precision! result = Date.new(val[0].year * 10 ** val[2]).year_precision!
result result
end end
.,., .,.,
@ -1166,7 +1166,7 @@ module_eval(<<'.,.,', 'edtf.y', 221)
module_eval(<<'.,.,', 'edtf.y', 225) module_eval(<<'.,.,', 'edtf.y', 225)
def _reduce_74(val, _values, result) def _reduce_74(val, _values, result)
result = Date.new(val[1] * 10 ** val[3]).year_precision! result = Date.new(val[1] * 10 ** val[3]).year_precision!
result result
end end
.,., .,.,
@ -1174,14 +1174,14 @@ module_eval(<<'.,.,', 'edtf.y', 225)
module_eval(<<'.,.,', 'edtf.y', 229) module_eval(<<'.,.,', 'edtf.y', 229)
def _reduce_75(val, _values, result) def _reduce_75(val, _values, result)
result = Date.new(-1 * val[2] * 10 ** val[4]).year_precision! result = Date.new(-1 * val[2] * 10 ** val[4]).year_precision!
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 234) module_eval(<<'.,.,', 'edtf.y', 234)
def _reduce_76(val, _values, result) def _reduce_76(val, _values, result)
result = val[0]; result.calendar = val[1] result = val[0]; result.calendar = val[1]
result result
end end
.,., .,.,
@ -1190,7 +1190,7 @@ module_eval(<<'.,.,', 'edtf.y', 240)
def _reduce_77(val, _values, result) def _reduce_77(val, _values, result)
d = val[0,3].zip([1000,100,10]).reduce(0) { |s,(a,b)| s += a * b } d = val[0,3].zip([1000,100,10]).reduce(0) { |s,(a,b)| s += a * b }
result = EDTF::Decade.new(d) result = EDTF::Decade.new(d)
result result
end end
.,., .,.,
@ -1199,84 +1199,84 @@ module_eval(<<'.,.,', 'edtf.y', 245)
def _reduce_78(val, _values, result) def _reduce_78(val, _values, result)
d = val[0,2].zip([1000,100]).reduce(0) { |s,(a,b)| s += a * b } d = val[0,2].zip([1000,100]).reduce(0) { |s,(a,b)| s += a * b }
result = EDTF::Century.new(d) result = EDTF::Century.new(d)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 251) module_eval(<<'.,.,', 'edtf.y', 251)
def _reduce_79(val, _values, result) def _reduce_79(val, _values, result)
result = val[1].choice! result = val[1].choice!
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 253) module_eval(<<'.,.,', 'edtf.y', 253)
def _reduce_80(val, _values, result) def _reduce_80(val, _values, result)
result = val[1] result = val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 255) module_eval(<<'.,.,', 'edtf.y', 255)
def _reduce_81(val, _values, result) def _reduce_81(val, _values, result)
result = EDTF::Set.new(val[0]).earlier! result = EDTF::Set.new(val[0]).earlier!
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 256) module_eval(<<'.,.,', 'edtf.y', 256)
def _reduce_82(val, _values, result) def _reduce_82(val, _values, result)
result = EDTF::Set.new([val[0]] + val[2] + [val[4]]).earlier!.later! result = EDTF::Set.new([val[0]] + val[2] + [val[4]]).earlier!.later!
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 257) module_eval(<<'.,.,', 'edtf.y', 257)
def _reduce_83(val, _values, result) def _reduce_83(val, _values, result)
result = EDTF::Set.new([val[0]] + val[2]).earlier! result = EDTF::Set.new([val[0]] + val[2]).earlier!
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 258) module_eval(<<'.,.,', 'edtf.y', 258)
def _reduce_84(val, _values, result) def _reduce_84(val, _values, result)
result = EDTF::Set.new([val[0]] + [val[2]]).earlier!.later! result = EDTF::Set.new([val[0]] + [val[2]]).earlier!.later!
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 259) module_eval(<<'.,.,', 'edtf.y', 259)
def _reduce_85(val, _values, result) def _reduce_85(val, _values, result)
result = EDTF::Set.new(val[0] + [val[2]]).later! result = EDTF::Set.new(val[0] + [val[2]]).later!
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 260) module_eval(<<'.,.,', 'edtf.y', 260)
def _reduce_86(val, _values, result) def _reduce_86(val, _values, result)
result = EDTF::Set.new(*val[0]) result = EDTF::Set.new(*val[0])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 261) module_eval(<<'.,.,', 'edtf.y', 261)
def _reduce_87(val, _values, result) def _reduce_87(val, _values, result)
result = EDTF::Set.new(val[0]).later! result = EDTF::Set.new(val[0]).later!
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 264) module_eval(<<'.,.,', 'edtf.y', 264)
def _reduce_88(val, _values, result) def _reduce_88(val, _values, result)
result = [val[0]].flatten result = [val[0]].flatten
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 265) module_eval(<<'.,.,', 'edtf.y', 265)
def _reduce_89(val, _values, result) def _reduce_89(val, _values, result)
result = val[0] + [val[2]].flatten result = val[0] + [val[2]].flatten
result result
end end
.,., .,.,
@ -1293,49 +1293,49 @@ module_eval(<<'.,.,', 'edtf.y', 265)
module_eval(<<'.,.,', 'edtf.y', 277) module_eval(<<'.,.,', 'edtf.y', 277)
def _reduce_95(val, _values, result) def _reduce_95(val, _values, result)
result = val[1] result = val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 279) module_eval(<<'.,.,', 'edtf.y', 279)
def _reduce_96(val, _values, result) def _reduce_96(val, _values, result)
result = Date.new(*val[0]).year_precision! result = Date.new(*val[0]).year_precision!
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 280) module_eval(<<'.,.,', 'edtf.y', 280)
def _reduce_97(val, _values, result) def _reduce_97(val, _values, result)
result = Date.new(*val[0]).month_precision! result = Date.new(*val[0]).month_precision!
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 281) module_eval(<<'.,.,', 'edtf.y', 281)
def _reduce_98(val, _values, result) def _reduce_98(val, _values, result)
result = Date.new(val[0]).year_precision! result = Date.new(val[0]).year_precision!
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 284) module_eval(<<'.,.,', 'edtf.y', 284)
def _reduce_99(val, _values, result) def _reduce_99(val, _values, result)
result = (Date.new(val[0]).day_precision! .. Date.new(val[2]).day_precision!) result = (Date.new(val[0]).day_precision! .. Date.new(val[2]).day_precision!)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 285) module_eval(<<'.,.,', 'edtf.y', 285)
def _reduce_100(val, _values, result) def _reduce_100(val, _values, result)
result = (Date.new(val[0]).month_precision! .. Date.new(val[2]).month_precision!) result = (Date.new(val[0]).month_precision! .. Date.new(val[2]).month_precision!)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 286) module_eval(<<'.,.,', 'edtf.y', 286)
def _reduce_101(val, _values, result) def _reduce_101(val, _values, result)
result = (Date.new(val[0]).year_precision! .. Date.new(val[2]).year_precision!) result = (Date.new(val[0]).year_precision! .. Date.new(val[2]).year_precision!)
result result
end end
.,., .,.,
@ -1344,7 +1344,7 @@ module_eval(<<'.,.,', 'edtf.y', 292)
def _reduce_102(val, _values, result) def _reduce_102(val, _values, result)
result = Date.new(val[0][0], val[2], val[4]) result = Date.new(val[0][0], val[2], val[4])
result.unspecified.year[2,2] = val[0][1] result.unspecified.year[2,2] = val[0][1]
result result
end end
.,., .,.,
@ -1354,7 +1354,7 @@ module_eval(<<'.,.,', 'edtf.y', 297)
result = Date.new(val[0][0], 1, val[5]) result = Date.new(val[0][0], 1, val[5])
result.unspecified.year[2,2] = val[0][1] result.unspecified.year[2,2] = val[0][1]
result.unspecified!(:month) result.unspecified!(:month)
result result
end end
.,., .,.,
@ -1364,7 +1364,7 @@ module_eval(<<'.,.,', 'edtf.y', 303)
result = Date.new(val[0][0], 1, 1) result = Date.new(val[0][0], 1, 1)
result.unspecified.year[2,2] = val[0][1] result.unspecified.year[2,2] = val[0][1]
result.unspecified!([:month, :day]) result.unspecified!([:month, :day])
result result
end end
.,., .,.,
@ -1374,7 +1374,7 @@ module_eval(<<'.,.,', 'edtf.y', 309)
result = Date.new(val[0][0], val[2], 1) result = Date.new(val[0][0], val[2], 1)
result.unspecified.year[2,2] = val[0][1] result.unspecified.year[2,2] = val[0][1]
result.unspecified!(:day) result.unspecified!(:day)
result result
end end
.,., .,.,
@ -1383,7 +1383,7 @@ module_eval(<<'.,.,', 'edtf.y', 315)
def _reduce_106(val, _values, result) def _reduce_106(val, _values, result)
result = Date.new(val[0], 1, val[5]) result = Date.new(val[0], 1, val[5])
result.unspecified!(:month) result.unspecified!(:month)
result result
end end
.,., .,.,
@ -1392,35 +1392,35 @@ module_eval(<<'.,.,', 'edtf.y', 315)
module_eval(<<'.,.,', 'edtf.y', 322) module_eval(<<'.,.,', 'edtf.y', 322)
def _reduce_108(val, _values, result) def _reduce_108(val, _values, result)
result = uoa(val[1], val[3]) result = uoa(val[1], val[3])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 325) module_eval(<<'.,.,', 'edtf.y', 325)
def _reduce_109(val, _values, result) def _reduce_109(val, _values, result)
result = val[0].year_precision! result = val[0].year_precision!
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 326) module_eval(<<'.,.,', 'edtf.y', 326)
def _reduce_110(val, _values, result) def _reduce_110(val, _values, result)
result = val[0][0].month_precision! result = val[0][0].month_precision!
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 327) module_eval(<<'.,.,', 'edtf.y', 327)
def _reduce_111(val, _values, result) def _reduce_111(val, _values, result)
result = val[0].day_precision! result = val[0].day_precision!
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 329) module_eval(<<'.,.,', 'edtf.y', 329)
def _reduce_112(val, _values, result) def _reduce_112(val, _values, result)
result = uoa(Date.new(val[0]), val[1], :year) result = uoa(Date.new(val[0]), val[1], :year)
result result
end end
.,., .,.,
@ -1428,7 +1428,7 @@ module_eval(<<'.,.,', 'edtf.y', 329)
module_eval(<<'.,.,', 'edtf.y', 333) module_eval(<<'.,.,', 'edtf.y', 333)
def _reduce_113(val, _values, result) def _reduce_113(val, _values, result)
result = [uoa(val[0].change(:month => val[2]), val[3], [:month, :year])] result = [uoa(val[0].change(:month => val[2]), val[3], [:month, :year])]
result result
end end
.,., .,.,
@ -1436,7 +1436,7 @@ module_eval(<<'.,.,', 'edtf.y', 333)
module_eval(<<'.,.,', 'edtf.y', 336) module_eval(<<'.,.,', 'edtf.y', 336)
def _reduce_114(val, _values, result) def _reduce_114(val, _values, result)
result = [uoa(Date.new(val[0], val[2]), val[3], [:year, :month])] result = [uoa(Date.new(val[0], val[2]), val[3], [:year, :month])]
result result
end end
.,., .,.,
@ -1444,7 +1444,7 @@ module_eval(<<'.,.,', 'edtf.y', 336)
module_eval(<<'.,.,', 'edtf.y', 339) module_eval(<<'.,.,', 'edtf.y', 339)
def _reduce_115(val, _values, result) def _reduce_115(val, _values, result)
result = [uoa(Date.new(val[0], val[2]), val[4], [:month]), true] result = [uoa(Date.new(val[0], val[2]), val[4], [:month]), true]
result result
end end
.,., .,.,
@ -1452,7 +1452,7 @@ module_eval(<<'.,.,', 'edtf.y', 339)
module_eval(<<'.,.,', 'edtf.y', 342) module_eval(<<'.,.,', 'edtf.y', 342)
def _reduce_116(val, _values, result) def _reduce_116(val, _values, result)
result = [uoa(val[0].change(:month => val[2]), val[4], [:month]), true] result = [uoa(val[0].change(:month => val[2]), val[4], [:month]), true]
result result
end end
.,., .,.,
@ -1460,7 +1460,7 @@ module_eval(<<'.,.,', 'edtf.y', 342)
module_eval(<<'.,.,', 'edtf.y', 348) module_eval(<<'.,.,', 'edtf.y', 348)
def _reduce_117(val, _values, result) def _reduce_117(val, _values, result)
result = uoa(val[0][0].change(:day => val[2]), val[3], val[0][1] ? [:day] : nil) result = uoa(val[0][0].change(:day => val[2]), val[3], val[0][1] ? [:day] : nil)
result result
end end
.,., .,.,
@ -1468,7 +1468,7 @@ module_eval(<<'.,.,', 'edtf.y', 348)
module_eval(<<'.,.,', 'edtf.y', 351) module_eval(<<'.,.,', 'edtf.y', 351)
def _reduce_118(val, _values, result) def _reduce_118(val, _values, result)
result = uoa(val[0][0].change(:day => val[2]), val[4], [:day]) result = uoa(val[0][0].change(:day => val[2]), val[4], [:day])
result result
end end
.,., .,.,
@ -1476,7 +1476,7 @@ module_eval(<<'.,.,', 'edtf.y', 351)
module_eval(<<'.,.,', 'edtf.y', 354) module_eval(<<'.,.,', 'edtf.y', 354)
def _reduce_119(val, _values, result) def _reduce_119(val, _values, result)
result = uoa(uoa(Date.new(val[0], val[2], val[5]), val[4], :month), val[6], :day) result = uoa(uoa(Date.new(val[0], val[2], val[5]), val[4], :month), val[6], :day)
result result
end end
.,., .,.,
@ -1484,7 +1484,7 @@ module_eval(<<'.,.,', 'edtf.y', 354)
module_eval(<<'.,.,', 'edtf.y', 357) module_eval(<<'.,.,', 'edtf.y', 357)
def _reduce_120(val, _values, result) def _reduce_120(val, _values, result)
result = uoa(Date.new(val[0][0], val[0][1], val[2]), val[3]) result = uoa(Date.new(val[0][0], val[0][1], val[2]), val[3])
result result
end end
.,., .,.,
@ -1492,7 +1492,7 @@ module_eval(<<'.,.,', 'edtf.y', 357)
module_eval(<<'.,.,', 'edtf.y', 360) module_eval(<<'.,.,', 'edtf.y', 360)
def _reduce_121(val, _values, result) def _reduce_121(val, _values, result)
result = uoa(Date.new(val[0][0], val[0][1], val[2]), val[4], [:day]) result = uoa(Date.new(val[0][0], val[0][1], val[2]), val[4], [:day])
result result
end end
.,., .,.,
@ -1500,7 +1500,7 @@ module_eval(<<'.,.,', 'edtf.y', 360)
module_eval(<<'.,.,', 'edtf.y', 363) module_eval(<<'.,.,', 'edtf.y', 363)
def _reduce_122(val, _values, result) def _reduce_122(val, _values, result)
result = uoa(Date.new(val[0], val[2], val[4]), val[6], [:month, :day]) result = uoa(Date.new(val[0], val[2], val[4]), val[6], [:month, :day])
result result
end end
.,., .,.,
@ -1510,7 +1510,7 @@ module_eval(<<'.,.,', 'edtf.y', 366)
result = Date.new(val[0], val[2], val[4]) result = Date.new(val[0], val[2], val[4])
result = uoa(result, val[6], [:day]) result = uoa(result, val[6], [:day])
result = uoa(result, val[8], [:month, :day]) result = uoa(result, val[8], [:month, :day])
result result
end end
.,., .,.,
@ -1519,7 +1519,7 @@ module_eval(<<'.,.,', 'edtf.y', 371)
def _reduce_124(val, _values, result) def _reduce_124(val, _values, result)
result = val[0].change(:month => val[2], :day => val[4]) result = val[0].change(:month => val[2], :day => val[4])
result = uoa(result, val[6], [:month, :day]) result = uoa(result, val[6], [:month, :day])
result result
end end
.,., .,.,
@ -1529,14 +1529,14 @@ module_eval(<<'.,.,', 'edtf.y', 375)
result = val[0].change(:month => val[2], :day => val[4]) result = val[0].change(:month => val[2], :day => val[4])
result = uoa(result, val[6], [:day]) result = uoa(result, val[6], [:day])
result = uoa(result, val[8], [:month, :day]) result = uoa(result, val[8], [:month, :day])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 386) module_eval(<<'.,.,', 'edtf.y', 386)
def _reduce_126(val, _values, result) def _reduce_126(val, _values, result)
result = [] result = []
result result
end end
.,., .,.,
@ -1545,7 +1545,7 @@ module_eval(<<'.,.,', 'edtf.y', 386)
module_eval(<<'.,.,', 'edtf.y', 390) module_eval(<<'.,.,', 'edtf.y', 390)
def _reduce_128(val, _values, result) def _reduce_128(val, _values, result)
result = 0 result = 0
result result
end end
.,., .,.,
@ -1572,28 +1572,28 @@ module_eval(<<'.,.,', 'edtf.y', 390)
module_eval(<<'.,.,', 'edtf.y', 396) module_eval(<<'.,.,', 'edtf.y', 396)
def _reduce_139(val, _values, result) def _reduce_139(val, _values, result)
result = val[1] result = val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 397) module_eval(<<'.,.,', 'edtf.y', 397)
def _reduce_140(val, _values, result) def _reduce_140(val, _values, result)
result = 10 result = 10
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 398) module_eval(<<'.,.,', 'edtf.y', 398)
def _reduce_141(val, _values, result) def _reduce_141(val, _values, result)
result = 11 result = 11
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 399) module_eval(<<'.,.,', 'edtf.y', 399)
def _reduce_142(val, _values, result) def _reduce_142(val, _values, result)
result = 12 result = 12
result result
end end
.,., .,.,
@ -1602,49 +1602,49 @@ module_eval(<<'.,.,', 'edtf.y', 399)
module_eval(<<'.,.,', 'edtf.y', 403) module_eval(<<'.,.,', 'edtf.y', 403)
def _reduce_144(val, _values, result) def _reduce_144(val, _values, result)
result = 13 result = 13
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 406) module_eval(<<'.,.,', 'edtf.y', 406)
def _reduce_145(val, _values, result) def _reduce_145(val, _values, result)
result = val[1] result = val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 407) module_eval(<<'.,.,', 'edtf.y', 407)
def _reduce_146(val, _values, result) def _reduce_146(val, _values, result)
result = 10 + val[1] result = 10 + val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 408) module_eval(<<'.,.,', 'edtf.y', 408)
def _reduce_147(val, _values, result) def _reduce_147(val, _values, result)
result = 20 result = 20
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 409) module_eval(<<'.,.,', 'edtf.y', 409)
def _reduce_148(val, _values, result) def _reduce_148(val, _values, result)
result = 21 result = 21
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 410) module_eval(<<'.,.,', 'edtf.y', 410)
def _reduce_149(val, _values, result) def _reduce_149(val, _values, result)
result = 22 result = 22
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 411) module_eval(<<'.,.,', 'edtf.y', 411)
def _reduce_150(val, _values, result) def _reduce_150(val, _values, result)
result = 23 result = 23
result result
end end
.,., .,.,
@ -1657,42 +1657,42 @@ module_eval(<<'.,.,', 'edtf.y', 411)
module_eval(<<'.,.,', 'edtf.y', 419) module_eval(<<'.,.,', 'edtf.y', 419)
def _reduce_154(val, _values, result) def _reduce_154(val, _values, result)
result = 24 result = 24
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 420) module_eval(<<'.,.,', 'edtf.y', 420)
def _reduce_155(val, _values, result) def _reduce_155(val, _values, result)
result = 25 result = 25
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 421) module_eval(<<'.,.,', 'edtf.y', 421)
def _reduce_156(val, _values, result) def _reduce_156(val, _values, result)
result = 26 result = 26
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 422) module_eval(<<'.,.,', 'edtf.y', 422)
def _reduce_157(val, _values, result) def _reduce_157(val, _values, result)
result = 27 result = 27
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 423) module_eval(<<'.,.,', 'edtf.y', 423)
def _reduce_158(val, _values, result) def _reduce_158(val, _values, result)
result = 28 result = 28
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 424) module_eval(<<'.,.,', 'edtf.y', 424)
def _reduce_159(val, _values, result) def _reduce_159(val, _values, result)
result = 29 result = 29
result result
end end
.,., .,.,
@ -1701,7 +1701,7 @@ module_eval(<<'.,.,', 'edtf.y', 424)
module_eval(<<'.,.,', 'edtf.y', 428) module_eval(<<'.,.,', 'edtf.y', 428)
def _reduce_161(val, _values, result) def _reduce_161(val, _values, result)
result = 30 result = 30
result result
end end
.,., .,.,
@ -1710,7 +1710,7 @@ module_eval(<<'.,.,', 'edtf.y', 428)
module_eval(<<'.,.,', 'edtf.y', 432) module_eval(<<'.,.,', 'edtf.y', 432)
def _reduce_163(val, _values, result) def _reduce_163(val, _values, result)
result = 31 result = 31
result result
end end
.,., .,.,
@ -1719,21 +1719,21 @@ module_eval(<<'.,.,', 'edtf.y', 432)
module_eval(<<'.,.,', 'edtf.y', 436) module_eval(<<'.,.,', 'edtf.y', 436)
def _reduce_165(val, _values, result) def _reduce_165(val, _values, result)
result = 30 + val[1] result = 30 + val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 437) module_eval(<<'.,.,', 'edtf.y', 437)
def _reduce_166(val, _values, result) def _reduce_166(val, _values, result)
result = 40 + val[1] result = 40 + val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 438) module_eval(<<'.,.,', 'edtf.y', 438)
def _reduce_167(val, _values, result) def _reduce_167(val, _values, result)
result = 50 + val[1] result = 50 + val[1]
result result
end end
.,., .,.,
@ -1744,14 +1744,14 @@ module_eval(<<'.,.,', 'edtf.y', 438)
module_eval(<<'.,.,', 'edtf.y', 445) module_eval(<<'.,.,', 'edtf.y', 445)
def _reduce_170(val, _values, result) def _reduce_170(val, _values, result)
result = val[0] result = val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 446) module_eval(<<'.,.,', 'edtf.y', 446)
def _reduce_171(val, _values, result) def _reduce_171(val, _values, result)
result = 10 * val[0] + val[1] result = 10 * val[0] + val[1]
result result
end end
.,., .,.,
@ -1759,7 +1759,7 @@ module_eval(<<'.,.,', 'edtf.y', 446)
module_eval(<<'.,.,', 'edtf.y', 449) module_eval(<<'.,.,', 'edtf.y', 449)
def _reduce_172(val, _values, result) def _reduce_172(val, _values, result)
result = val.zip([100,10,1]).reduce(0) { |s,(a,b)| s += a * b } result = val.zip([100,10,1]).reduce(0) { |s,(a,b)| s += a * b }
result result
end end
.,., .,.,
@ -1767,21 +1767,21 @@ module_eval(<<'.,.,', 'edtf.y', 449)
module_eval(<<'.,.,', 'edtf.y', 453) module_eval(<<'.,.,', 'edtf.y', 453)
def _reduce_173(val, _values, result) def _reduce_173(val, _values, result)
result = val.zip([1000,100,10,1]).reduce(0) { |s,(a,b)| s += a * b } result = val.zip([1000,100,10,1]).reduce(0) { |s,(a,b)| s += a * b }
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 457) module_eval(<<'.,.,', 'edtf.y', 457)
def _reduce_174(val, _values, result) def _reduce_174(val, _values, result)
result = val[0] result = val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'edtf.y', 458) module_eval(<<'.,.,', 'edtf.y', 458)
def _reduce_175(val, _values, result) def _reduce_175(val, _values, result)
result = 10 * val[0] + val[1] result = 10 * val[0] + val[1]
result result
end end
.,., .,.,
@ -1791,4 +1791,4 @@ def _reduce_none(val, _values, result)
end end
end # class Parser end # class Parser
end # module EDTF end # module EDTF

Просмотреть файл

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.4.14 # This file is automatically generated by Racc 1.4.16.pre.1
# from Racc grammer file "". # from Racc grammer file "".
# #
@ -750,28 +750,28 @@ Racc_debug_parser = false
module_eval(<<'.,.,', 'huia.y', 44) module_eval(<<'.,.,', 'huia.y', 44)
def _reduce_2(val, _values, result) def _reduce_2(val, _values, result)
return scope return scope
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 46) module_eval(<<'.,.,', 'huia.y', 46)
def _reduce_3(val, _values, result) def _reduce_3(val, _values, result)
return scope.append val[0] return scope.append val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 47) module_eval(<<'.,.,', 'huia.y', 47)
def _reduce_4(val, _values, result) def _reduce_4(val, _values, result)
return scope.append val[0] return scope.append val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 48) module_eval(<<'.,.,', 'huia.y', 48)
def _reduce_5(val, _values, result) def _reduce_5(val, _values, result)
return scope return scope
result result
end end
.,., .,.,
@ -810,14 +810,14 @@ module_eval(<<'.,.,', 'huia.y', 48)
module_eval(<<'.,.,', 'huia.y', 66) module_eval(<<'.,.,', 'huia.y', 66)
def _reduce_22(val, _values, result) def _reduce_22(val, _values, result)
return n(:Return, val[1]) return n(:Return, val[1])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 67) module_eval(<<'.,.,', 'huia.y', 67)
def _reduce_23(val, _values, result) def _reduce_23(val, _values, result)
return n(:Return, n(:Nil)) return n(:Return, n(:Nil))
result result
end end
.,., .,.,
@ -828,28 +828,28 @@ module_eval(<<'.,.,', 'huia.y', 67)
module_eval(<<'.,.,', 'huia.y', 72) module_eval(<<'.,.,', 'huia.y', 72)
def _reduce_26(val, _values, result) def _reduce_26(val, _values, result)
return n :Array return n :Array
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 74) module_eval(<<'.,.,', 'huia.y', 74)
def _reduce_27(val, _values, result) def _reduce_27(val, _values, result)
return val[1] return val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 75) module_eval(<<'.,.,', 'huia.y', 75)
def _reduce_28(val, _values, result) def _reduce_28(val, _values, result)
return n :Array, [val[0]] return n :Array, [val[0]]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 76) module_eval(<<'.,.,', 'huia.y', 76)
def _reduce_29(val, _values, result) def _reduce_29(val, _values, result)
val[0].append(val[2]); return val[0] val[0].append(val[2]); return val[0]
result result
end end
.,., .,.,
@ -860,42 +860,42 @@ module_eval(<<'.,.,', 'huia.y', 76)
module_eval(<<'.,.,', 'huia.y', 80) module_eval(<<'.,.,', 'huia.y', 80)
def _reduce_32(val, _values, result) def _reduce_32(val, _values, result)
return n :Hash return n :Hash
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 81) module_eval(<<'.,.,', 'huia.y', 81)
def _reduce_33(val, _values, result) def _reduce_33(val, _values, result)
return val[1] return val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 82) module_eval(<<'.,.,', 'huia.y', 82)
def _reduce_34(val, _values, result) def _reduce_34(val, _values, result)
return n :Hash, val[0] return n :Hash, val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 83) module_eval(<<'.,.,', 'huia.y', 83)
def _reduce_35(val, _values, result) def _reduce_35(val, _values, result)
val[0].append(val[2]); return val[0] val[0].append(val[2]); return val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 84) module_eval(<<'.,.,', 'huia.y', 84)
def _reduce_36(val, _values, result) def _reduce_36(val, _values, result)
return n :HashItem, val[0], val[2] return n :HashItem, val[0], val[2]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 86) module_eval(<<'.,.,', 'huia.y', 86)
def _reduce_37(val, _values, result) def _reduce_37(val, _values, result)
return constant val[0] return constant val[0]
result result
end end
.,., .,.,
@ -908,49 +908,49 @@ module_eval(<<'.,.,', 'huia.y', 86)
module_eval(<<'.,.,', 'huia.y', 91) module_eval(<<'.,.,', 'huia.y', 91)
def _reduce_41(val, _values, result) def _reduce_41(val, _values, result)
return val[0] return val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 92) module_eval(<<'.,.,', 'huia.y', 92)
def _reduce_42(val, _values, result) def _reduce_42(val, _values, result)
return val[0].append(val[1]) return val[0].append(val[1])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 93) module_eval(<<'.,.,', 'huia.y', 93)
def _reduce_43(val, _values, result) def _reduce_43(val, _values, result)
return val[0] return val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 94) module_eval(<<'.,.,', 'huia.y', 94)
def _reduce_44(val, _values, result) def _reduce_44(val, _values, result)
return pop_scope return pop_scope
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 97) module_eval(<<'.,.,', 'huia.y', 97)
def _reduce_45(val, _values, result) def _reduce_45(val, _values, result)
return val[0] return val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 98) module_eval(<<'.,.,', 'huia.y', 98)
def _reduce_46(val, _values, result) def _reduce_46(val, _values, result)
return push_scope return push_scope
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 99) module_eval(<<'.,.,', 'huia.y', 99)
def _reduce_47(val, _values, result) def _reduce_47(val, _values, result)
return push_scope return push_scope
result result
end end
.,., .,.,
@ -965,21 +965,21 @@ module_eval(<<'.,.,', 'huia.y', 99)
module_eval(<<'.,.,', 'huia.y', 105) module_eval(<<'.,.,', 'huia.y', 105)
def _reduce_52(val, _values, result) def _reduce_52(val, _values, result)
return scope.add_argument val[0] return scope.add_argument val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 106) module_eval(<<'.,.,', 'huia.y', 106)
def _reduce_53(val, _values, result) def _reduce_53(val, _values, result)
return n :Assignment, val[0], val[2] return n :Assignment, val[0], val[2]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 107) module_eval(<<'.,.,', 'huia.y', 107)
def _reduce_54(val, _values, result) def _reduce_54(val, _values, result)
return n :Variable, val[0] return n :Variable, val[0]
result result
end end
.,., .,.,
@ -992,35 +992,35 @@ module_eval(<<'.,.,', 'huia.y', 107)
module_eval(<<'.,.,', 'huia.y', 112) module_eval(<<'.,.,', 'huia.y', 112)
def _reduce_58(val, _values, result) def _reduce_58(val, _values, result)
return n :MethodCall, val[0], val[2] return n :MethodCall, val[0], val[2]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 113) module_eval(<<'.,.,', 'huia.y', 113)
def _reduce_59(val, _values, result) def _reduce_59(val, _values, result)
return n :MethodCall, val[0], n(:CallSignature, val[2]) return n :MethodCall, val[0], n(:CallSignature, val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 114) module_eval(<<'.,.,', 'huia.y', 114)
def _reduce_60(val, _values, result) def _reduce_60(val, _values, result)
return n :MethodCall, scope_instance, val[0] return n :MethodCall, scope_instance, val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 116) module_eval(<<'.,.,', 'huia.y', 116)
def _reduce_61(val, _values, result) def _reduce_61(val, _values, result)
return n :MethodCall, this_closure, val[1] return n :MethodCall, this_closure, val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 117) module_eval(<<'.,.,', 'huia.y', 117)
def _reduce_62(val, _values, result) def _reduce_62(val, _values, result)
return n :MethodCall, this_closure, n(:CallSignature, val[1]) return n :MethodCall, this_closure, n(:CallSignature, val[1])
result result
end end
.,., .,.,
@ -1031,14 +1031,14 @@ module_eval(<<'.,.,', 'huia.y', 117)
module_eval(<<'.,.,', 'huia.y', 121) module_eval(<<'.,.,', 'huia.y', 121)
def _reduce_65(val, _values, result) def _reduce_65(val, _values, result)
return n :CallSignature, val[0] return n :CallSignature, val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 122) module_eval(<<'.,.,', 'huia.y', 122)
def _reduce_66(val, _values, result) def _reduce_66(val, _values, result)
return n :CallSignature, val[0], [val[1]] return n :CallSignature, val[0], [val[1]]
result result
end end
.,., .,.,
@ -1057,28 +1057,28 @@ module_eval(<<'.,.,', 'huia.y', 122)
module_eval(<<'.,.,', 'huia.y', 129) module_eval(<<'.,.,', 'huia.y', 129)
def _reduce_73(val, _values, result) def _reduce_73(val, _values, result)
return val[0] return val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 130) module_eval(<<'.,.,', 'huia.y', 130)
def _reduce_74(val, _values, result) def _reduce_74(val, _values, result)
return val[0].concat_signature val[1] return val[0].concat_signature val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 132) module_eval(<<'.,.,', 'huia.y', 132)
def _reduce_75(val, _values, result) def _reduce_75(val, _values, result)
return n :Expression, val[1] return n :Expression, val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 134) module_eval(<<'.,.,', 'huia.y', 134)
def _reduce_76(val, _values, result) def _reduce_76(val, _values, result)
return allocate_local val[0] return allocate_local val[0]
result result
end end
.,., .,.,
@ -1115,105 +1115,105 @@ module_eval(<<'.,.,', 'huia.y', 134)
module_eval(<<'.,.,', 'huia.y', 152) module_eval(<<'.,.,', 'huia.y', 152)
def _reduce_92(val, _values, result) def _reduce_92(val, _values, result)
return allocate_local_assignment val[0], val[2] return allocate_local_assignment val[0], val[2]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 153) module_eval(<<'.,.,', 'huia.y', 153)
def _reduce_93(val, _values, result) def _reduce_93(val, _values, result)
return binary val[0], val[2], 'plus:' return binary val[0], val[2], 'plus:'
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 154) module_eval(<<'.,.,', 'huia.y', 154)
def _reduce_94(val, _values, result) def _reduce_94(val, _values, result)
return binary val[0], val[2], 'minus:' return binary val[0], val[2], 'minus:'
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 155) module_eval(<<'.,.,', 'huia.y', 155)
def _reduce_95(val, _values, result) def _reduce_95(val, _values, result)
return binary val[0], val[2], 'multiplyBy:' return binary val[0], val[2], 'multiplyBy:'
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 156) module_eval(<<'.,.,', 'huia.y', 156)
def _reduce_96(val, _values, result) def _reduce_96(val, _values, result)
return binary val[0], val[2], 'divideBy:' return binary val[0], val[2], 'divideBy:'
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 157) module_eval(<<'.,.,', 'huia.y', 157)
def _reduce_97(val, _values, result) def _reduce_97(val, _values, result)
return binary val[0], val[2], 'toThePowerOf:' return binary val[0], val[2], 'toThePowerOf:'
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 158) module_eval(<<'.,.,', 'huia.y', 158)
def _reduce_98(val, _values, result) def _reduce_98(val, _values, result)
return binary val[0], val[2], 'moduloOf:' return binary val[0], val[2], 'moduloOf:'
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 159) module_eval(<<'.,.,', 'huia.y', 159)
def _reduce_99(val, _values, result) def _reduce_99(val, _values, result)
return binary val[0], val[2], 'isEqualTo:' return binary val[0], val[2], 'isEqualTo:'
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 160) module_eval(<<'.,.,', 'huia.y', 160)
def _reduce_100(val, _values, result) def _reduce_100(val, _values, result)
return binary val[0], val[2], 'isNotEqualTo:' return binary val[0], val[2], 'isNotEqualTo:'
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 161) module_eval(<<'.,.,', 'huia.y', 161)
def _reduce_101(val, _values, result) def _reduce_101(val, _values, result)
return binary val[0], val[2], 'logicalOr:' return binary val[0], val[2], 'logicalOr:'
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 162) module_eval(<<'.,.,', 'huia.y', 162)
def _reduce_102(val, _values, result) def _reduce_102(val, _values, result)
return binary val[0], val[2], 'logicalAnd:' return binary val[0], val[2], 'logicalAnd:'
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 163) module_eval(<<'.,.,', 'huia.y', 163)
def _reduce_103(val, _values, result) def _reduce_103(val, _values, result)
return binary val[0], val[2], 'isGreaterThan:' return binary val[0], val[2], 'isGreaterThan:'
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 164) module_eval(<<'.,.,', 'huia.y', 164)
def _reduce_104(val, _values, result) def _reduce_104(val, _values, result)
return binary val[0], val[2], 'isLessThan:' return binary val[0], val[2], 'isLessThan:'
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 165) module_eval(<<'.,.,', 'huia.y', 165)
def _reduce_105(val, _values, result) def _reduce_105(val, _values, result)
return binary val[0], val[2], 'isGreaterOrEqualTo:' return binary val[0], val[2], 'isGreaterOrEqualTo:'
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 166) module_eval(<<'.,.,', 'huia.y', 166)
def _reduce_106(val, _values, result) def _reduce_106(val, _values, result)
return binary val[0], val[2], 'isLessOrEqualTo:' return binary val[0], val[2], 'isLessOrEqualTo:'
result result
end end
.,., .,.,
@ -1228,28 +1228,28 @@ module_eval(<<'.,.,', 'huia.y', 166)
module_eval(<<'.,.,', 'huia.y', 173) module_eval(<<'.,.,', 'huia.y', 173)
def _reduce_111(val, _values, result) def _reduce_111(val, _values, result)
return unary val[1], 'unaryNot' return unary val[1], 'unaryNot'
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 174) module_eval(<<'.,.,', 'huia.y', 174)
def _reduce_112(val, _values, result) def _reduce_112(val, _values, result)
return unary val[1], 'unaryPlus' return unary val[1], 'unaryPlus'
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 175) module_eval(<<'.,.,', 'huia.y', 175)
def _reduce_113(val, _values, result) def _reduce_113(val, _values, result)
return unary val[1], 'unaryMinus' return unary val[1], 'unaryMinus'
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 176) module_eval(<<'.,.,', 'huia.y', 176)
def _reduce_114(val, _values, result) def _reduce_114(val, _values, result)
return unary val[1], 'unaryComplement' return unary val[1], 'unaryComplement'
result result
end end
.,., .,.,
@ -1270,49 +1270,49 @@ module_eval(<<'.,.,', 'huia.y', 176)
module_eval(<<'.,.,', 'huia.y', 186) module_eval(<<'.,.,', 'huia.y', 186)
def _reduce_122(val, _values, result) def _reduce_122(val, _values, result)
return n :Float, val[0] return n :Float, val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 187) module_eval(<<'.,.,', 'huia.y', 187)
def _reduce_123(val, _values, result) def _reduce_123(val, _values, result)
return n :Integer, val[0] return n :Integer, val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 188) module_eval(<<'.,.,', 'huia.y', 188)
def _reduce_124(val, _values, result) def _reduce_124(val, _values, result)
return n :Nil return n :Nil
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 189) module_eval(<<'.,.,', 'huia.y', 189)
def _reduce_125(val, _values, result) def _reduce_125(val, _values, result)
return n :True return n :True
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 190) module_eval(<<'.,.,', 'huia.y', 190)
def _reduce_126(val, _values, result) def _reduce_126(val, _values, result)
return n :False return n :False
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 191) module_eval(<<'.,.,', 'huia.y', 191)
def _reduce_127(val, _values, result) def _reduce_127(val, _values, result)
return n :Self return n :Self
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 193) module_eval(<<'.,.,', 'huia.y', 193)
def _reduce_128(val, _values, result) def _reduce_128(val, _values, result)
return n :String, val[0] return n :String, val[0]
result result
end end
.,., .,.,
@ -1323,63 +1323,63 @@ module_eval(<<'.,.,', 'huia.y', 193)
module_eval(<<'.,.,', 'huia.y', 197) module_eval(<<'.,.,', 'huia.y', 197)
def _reduce_131(val, _values, result) def _reduce_131(val, _values, result)
return val[1] return val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 198) module_eval(<<'.,.,', 'huia.y', 198)
def _reduce_132(val, _values, result) def _reduce_132(val, _values, result)
return val[1] return val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 199) module_eval(<<'.,.,', 'huia.y', 199)
def _reduce_133(val, _values, result) def _reduce_133(val, _values, result)
return n :InterpolatedString, val[0] return n :InterpolatedString, val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 200) module_eval(<<'.,.,', 'huia.y', 200)
def _reduce_134(val, _values, result) def _reduce_134(val, _values, result)
val[0].append(val[1]); return val[0] val[0].append(val[1]); return val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 201) module_eval(<<'.,.,', 'huia.y', 201)
def _reduce_135(val, _values, result) def _reduce_135(val, _values, result)
return val[0] return val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 202) module_eval(<<'.,.,', 'huia.y', 202)
def _reduce_136(val, _values, result) def _reduce_136(val, _values, result)
return to_string(val[0]) return to_string(val[0])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 203) module_eval(<<'.,.,', 'huia.y', 203)
def _reduce_137(val, _values, result) def _reduce_137(val, _values, result)
return n :String, '' return n :String, ''
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 205) module_eval(<<'.,.,', 'huia.y', 205)
def _reduce_138(val, _values, result) def _reduce_138(val, _values, result)
return n :String, val[0] return n :String, val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'huia.y', 206) module_eval(<<'.,.,', 'huia.y', 206)
def _reduce_139(val, _values, result) def _reduce_139(val, _values, result)
val[0].append(val[1]); return val[0] val[0].append(val[1]); return val[0]
result result
end end
.,., .,.,
@ -1389,4 +1389,4 @@ def _reduce_none(val, _values, result)
end end
end # class Parser end # class Parser
end # module Huia end # module Huia

Просмотреть файл

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.4.14 # This file is automatically generated by Racc 1.4.16.pre.1
# from Racc grammer file "". # from Racc grammer file "".
# #
@ -137,14 +137,14 @@ Racc_debug_parser = false
module_eval(<<'.,.,', 'journey.y', 6) module_eval(<<'.,.,', 'journey.y', 6)
def _reduce_1(val, _values, result) def _reduce_1(val, _values, result)
result = Cat.new(val.first, val.last) result = Cat.new(val.first, val.last)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'journey.y', 7) module_eval(<<'.,.,', 'journey.y', 7)
def _reduce_2(val, _values, result) def _reduce_2(val, _values, result)
result = val.first result = val.first
result result
end end
.,., .,.,
@ -159,21 +159,21 @@ module_eval(<<'.,.,', 'journey.y', 7)
module_eval(<<'.,.,', 'journey.y', 16) module_eval(<<'.,.,', 'journey.y', 16)
def _reduce_7(val, _values, result) def _reduce_7(val, _values, result)
result = Group.new(val[1]) result = Group.new(val[1])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'journey.y', 19) module_eval(<<'.,.,', 'journey.y', 19)
def _reduce_8(val, _values, result) def _reduce_8(val, _values, result)
result = Or.new([val.first, val.last]) result = Or.new([val.first, val.last])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'journey.y', 22) module_eval(<<'.,.,', 'journey.y', 22)
def _reduce_9(val, _values, result) def _reduce_9(val, _values, result)
result = Star.new(Symbol.new(val.last)) result = Star.new(Symbol.new(val.last))
result result
end end
.,., .,.,
@ -188,28 +188,28 @@ module_eval(<<'.,.,', 'journey.y', 22)
module_eval(<<'.,.,', 'journey.y', 31) module_eval(<<'.,.,', 'journey.y', 31)
def _reduce_14(val, _values, result) def _reduce_14(val, _values, result)
result = Slash.new('/') result = Slash.new('/')
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'journey.y', 34) module_eval(<<'.,.,', 'journey.y', 34)
def _reduce_15(val, _values, result) def _reduce_15(val, _values, result)
result = Symbol.new(val.first) result = Symbol.new(val.first)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'journey.y', 37) module_eval(<<'.,.,', 'journey.y', 37)
def _reduce_16(val, _values, result) def _reduce_16(val, _values, result)
result = Literal.new(val.first) result = Literal.new(val.first)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'journey.y', 39) module_eval(<<'.,.,', 'journey.y', 39)
def _reduce_17(val, _values, result) def _reduce_17(val, _values, result)
result = Dot.new(val.first) result = Dot.new(val.first)
result result
end end
.,., .,.,
@ -219,4 +219,4 @@ def _reduce_none(val, _values, result)
end end
end # class Parser end # class Parser
end # module Journey end # module Journey

Просмотреть файл

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.4.14 # This file is automatically generated by Racc 1.4.16.pre.1
# from Racc grammer file "". # from Racc grammer file "".
# #
@ -490,42 +490,42 @@ Racc_debug_parser = false
module_eval(<<'.,.,', 'liquor.y', 47) module_eval(<<'.,.,', 'liquor.y', 47)
def _reduce_1(val, _values, result) def _reduce_1(val, _values, result)
result = [] result = []
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 49) module_eval(<<'.,.,', 'liquor.y', 49)
def _reduce_2(val, _values, result) def _reduce_2(val, _values, result)
result = [ val[0], *val[1] ] result = [ val[0], *val[1] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 51) module_eval(<<'.,.,', 'liquor.y', 51)
def _reduce_3(val, _values, result) def _reduce_3(val, _values, result)
result = [ val[0], *val[1] ] result = [ val[0], *val[1] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 53) module_eval(<<'.,.,', 'liquor.y', 53)
def _reduce_4(val, _values, result) def _reduce_4(val, _values, result)
result = [ val[0], *val[1] ] result = [ val[0], *val[1] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 57) module_eval(<<'.,.,', 'liquor.y', 57)
def _reduce_5(val, _values, result) def _reduce_5(val, _values, result)
result = [ :interp, retag(val), val[1] ] result = [ :interp, retag(val), val[1] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 59) module_eval(<<'.,.,', 'liquor.y', 59)
def _reduce_6(val, _values, result) def _reduce_6(val, _values, result)
result = [ :interp, retag(val), val[1] ] result = [ :interp, retag(val), val[1] ]
result result
end end
.,., .,.,
@ -534,7 +534,7 @@ module_eval(<<'.,.,', 'liquor.y', 59)
module_eval(<<'.,.,', 'liquor.y', 64) module_eval(<<'.,.,', 'liquor.y', 64)
def _reduce_8(val, _values, result) def _reduce_8(val, _values, result)
result = [ val[1][0], retag(val), *val[1][2..-1] ] result = [ val[1][0], retag(val), *val[1][2..-1] ]
result result
end end
.,., .,.,
@ -547,133 +547,133 @@ module_eval(<<'.,.,', 'liquor.y', 64)
module_eval(<<'.,.,', 'liquor.y', 71) module_eval(<<'.,.,', 'liquor.y', 71)
def _reduce_12(val, _values, result) def _reduce_12(val, _values, result)
result = [ :call, retag(val), val[0], val[1] ] result = [ :call, retag(val), val[0], val[1] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 73) module_eval(<<'.,.,', 'liquor.y', 73)
def _reduce_13(val, _values, result) def _reduce_13(val, _values, result)
result = [ :index, retag(val), val[0], val[2] ] result = [ :index, retag(val), val[0], val[2] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 75) module_eval(<<'.,.,', 'liquor.y', 75)
def _reduce_14(val, _values, result) def _reduce_14(val, _values, result)
result = [ :external, retag(val), val[0], val[2], val[3] ] result = [ :external, retag(val), val[0], val[2], val[3] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 77) module_eval(<<'.,.,', 'liquor.y', 77)
def _reduce_15(val, _values, result) def _reduce_15(val, _values, result)
result = [ :external, retag(val), val[0], val[2], nil ] result = [ :external, retag(val), val[0], val[2], nil ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 79) module_eval(<<'.,.,', 'liquor.y', 79)
def _reduce_16(val, _values, result) def _reduce_16(val, _values, result)
result = [ :uminus, retag(val), val[1] ] result = [ :uminus, retag(val), val[1] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 81) module_eval(<<'.,.,', 'liquor.y', 81)
def _reduce_17(val, _values, result) def _reduce_17(val, _values, result)
result = [ :not, retag(val), val[1] ] result = [ :not, retag(val), val[1] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 83) module_eval(<<'.,.,', 'liquor.y', 83)
def _reduce_18(val, _values, result) def _reduce_18(val, _values, result)
result = [ :mul, retag(val), val[0], val[2] ] result = [ :mul, retag(val), val[0], val[2] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 85) module_eval(<<'.,.,', 'liquor.y', 85)
def _reduce_19(val, _values, result) def _reduce_19(val, _values, result)
result = [ :div, retag(val), val[0], val[2] ] result = [ :div, retag(val), val[0], val[2] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 87) module_eval(<<'.,.,', 'liquor.y', 87)
def _reduce_20(val, _values, result) def _reduce_20(val, _values, result)
result = [ :mod, retag(val), val[0], val[2] ] result = [ :mod, retag(val), val[0], val[2] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 89) module_eval(<<'.,.,', 'liquor.y', 89)
def _reduce_21(val, _values, result) def _reduce_21(val, _values, result)
result = [ :plus, retag(val), val[0], val[2] ] result = [ :plus, retag(val), val[0], val[2] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 91) module_eval(<<'.,.,', 'liquor.y', 91)
def _reduce_22(val, _values, result) def _reduce_22(val, _values, result)
result = [ :minus, retag(val), val[0], val[2] ] result = [ :minus, retag(val), val[0], val[2] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 93) module_eval(<<'.,.,', 'liquor.y', 93)
def _reduce_23(val, _values, result) def _reduce_23(val, _values, result)
result = [ :eq, retag(val), val[0], val[2] ] result = [ :eq, retag(val), val[0], val[2] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 95) module_eval(<<'.,.,', 'liquor.y', 95)
def _reduce_24(val, _values, result) def _reduce_24(val, _values, result)
result = [ :neq, retag(val), val[0], val[2] ] result = [ :neq, retag(val), val[0], val[2] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 97) module_eval(<<'.,.,', 'liquor.y', 97)
def _reduce_25(val, _values, result) def _reduce_25(val, _values, result)
result = [ :lt, retag(val), val[0], val[2] ] result = [ :lt, retag(val), val[0], val[2] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 99) module_eval(<<'.,.,', 'liquor.y', 99)
def _reduce_26(val, _values, result) def _reduce_26(val, _values, result)
result = [ :leq, retag(val), val[0], val[2] ] result = [ :leq, retag(val), val[0], val[2] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 101) module_eval(<<'.,.,', 'liquor.y', 101)
def _reduce_27(val, _values, result) def _reduce_27(val, _values, result)
result = [ :gt, retag(val), val[0], val[2] ] result = [ :gt, retag(val), val[0], val[2] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 103) module_eval(<<'.,.,', 'liquor.y', 103)
def _reduce_28(val, _values, result) def _reduce_28(val, _values, result)
result = [ :geq, retag(val), val[0], val[2] ] result = [ :geq, retag(val), val[0], val[2] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 105) module_eval(<<'.,.,', 'liquor.y', 105)
def _reduce_29(val, _values, result) def _reduce_29(val, _values, result)
result = [ :and, retag(val), val[0], val[2] ] result = [ :and, retag(val), val[0], val[2] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 107) module_eval(<<'.,.,', 'liquor.y', 107)
def _reduce_30(val, _values, result) def _reduce_30(val, _values, result)
result = [ :or, retag(val), val[0], val[2] ] result = [ :or, retag(val), val[0], val[2] ]
result result
end end
.,., .,.,
@ -682,49 +682,49 @@ module_eval(<<'.,.,', 'liquor.y', 107)
module_eval(<<'.,.,', 'liquor.y', 112) module_eval(<<'.,.,', 'liquor.y', 112)
def _reduce_32(val, _values, result) def _reduce_32(val, _values, result)
result = [ :tuple, retag(val), val[1].compact ] result = [ :tuple, retag(val), val[1].compact ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 116) module_eval(<<'.,.,', 'liquor.y', 116)
def _reduce_33(val, _values, result) def _reduce_33(val, _values, result)
result = [ val[0], *val[2] ] result = [ val[0], *val[2] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 118) module_eval(<<'.,.,', 'liquor.y', 118)
def _reduce_34(val, _values, result) def _reduce_34(val, _values, result)
result = [ val[0] ] result = [ val[0] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 120) module_eval(<<'.,.,', 'liquor.y', 120)
def _reduce_35(val, _values, result) def _reduce_35(val, _values, result)
result = [ ] result = [ ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 124) module_eval(<<'.,.,', 'liquor.y', 124)
def _reduce_36(val, _values, result) def _reduce_36(val, _values, result)
result = [ :args, retag(val), *val[1] ] result = [ :args, retag(val), *val[1] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 128) module_eval(<<'.,.,', 'liquor.y', 128)
def _reduce_37(val, _values, result) def _reduce_37(val, _values, result)
result = [ val[0], val[1][2] ] result = [ val[0], val[1][2] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 130) module_eval(<<'.,.,', 'liquor.y', 130)
def _reduce_38(val, _values, result) def _reduce_38(val, _values, result)
result = [ nil, val[0][2] ] result = [ nil, val[0][2] ]
result result
end end
.,., .,.,
@ -745,14 +745,14 @@ module_eval(<<'.,.,', 'liquor.y', 134)
}.merge(tail) }.merge(tail)
result = [ :keywords, retag([ loc, val[2] ]), hash ] result = [ :keywords, retag([ loc, val[2] ]), hash ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 150) module_eval(<<'.,.,', 'liquor.y', 150)
def _reduce_40(val, _values, result) def _reduce_40(val, _values, result)
result = [ :keywords, nil, {} ] result = [ :keywords, nil, {} ]
result result
end end
.,., .,.,
@ -761,21 +761,21 @@ module_eval(<<'.,.,', 'liquor.y', 154)
def _reduce_41(val, _values, result) def _reduce_41(val, _values, result)
result = [ val[0], *val[2] ]. result = [ val[0], *val[2] ].
reduce { |tree, node| node[3][2] = tree; node } reduce { |tree, node| node[3][2] = tree; node }
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 160) module_eval(<<'.,.,', 'liquor.y', 160)
def _reduce_42(val, _values, result) def _reduce_42(val, _values, result)
result = [ val[0], *val[2] ] result = [ val[0], *val[2] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 162) module_eval(<<'.,.,', 'liquor.y', 162)
def _reduce_43(val, _values, result) def _reduce_43(val, _values, result)
result = [ val[0] ] result = [ val[0] ]
result result
end end
.,., .,.,
@ -788,91 +788,91 @@ module_eval(<<'.,.,', 'liquor.y', 166)
end: ident_loc[:end] + 1, } end: ident_loc[:end] + 1, }
result = [ :call, val[0][1], val[0], result = [ :call, val[0][1], val[0],
[ :args, val[1][1] || empty_args_loc, nil, val[1][2] ] ] [ :args, val[1][1] || empty_args_loc, nil, val[1][2] ] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 176) module_eval(<<'.,.,', 'liquor.y', 176)
def _reduce_45(val, _values, result) def _reduce_45(val, _values, result)
result = [ :tag, retag(val), val[1], val[2], *reduce_tag_args(val[3][2]) ] result = [ :tag, retag(val), val[1], val[2], *reduce_tag_args(val[3][2]) ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 178) module_eval(<<'.,.,', 'liquor.y', 178)
def _reduce_46(val, _values, result) def _reduce_46(val, _values, result)
result = [ :tag, retag(val), val[1], nil, *reduce_tag_args(val[2][2]) ] result = [ :tag, retag(val), val[1], nil, *reduce_tag_args(val[2][2]) ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 186) module_eval(<<'.,.,', 'liquor.y', 186)
def _reduce_47(val, _values, result) def _reduce_47(val, _values, result)
result = [ :cont, retag(val), [] ] result = [ :cont, retag(val), [] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 188) module_eval(<<'.,.,', 'liquor.y', 188)
def _reduce_48(val, _values, result) def _reduce_48(val, _values, result)
result = [ :cont, retag(val), [ val[0], *val[1][2] ] ] result = [ :cont, retag(val), [ val[0], *val[1][2] ] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 192) module_eval(<<'.,.,', 'liquor.y', 192)
def _reduce_49(val, _values, result) def _reduce_49(val, _values, result)
result = [ :cont2, val[0][1], [ [:block, val[0][1], val[1] ], *val[3] ] ] result = [ :cont2, val[0][1], [ [:block, val[0][1], val[1] ], *val[3] ] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 194) module_eval(<<'.,.,', 'liquor.y', 194)
def _reduce_50(val, _values, result) def _reduce_50(val, _values, result)
result = [ :cont2, retag(val), [ val[0], *val[1][2] ] ] result = [ :cont2, retag(val), [ val[0], *val[1][2] ] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 198) module_eval(<<'.,.,', 'liquor.y', 198)
def _reduce_51(val, _values, result) def _reduce_51(val, _values, result)
result = [] result = []
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 200) module_eval(<<'.,.,', 'liquor.y', 200)
def _reduce_52(val, _values, result) def _reduce_52(val, _values, result)
result = [ val[0], *val[1] ] result = [ val[0], *val[1] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 204) module_eval(<<'.,.,', 'liquor.y', 204)
def _reduce_53(val, _values, result) def _reduce_53(val, _values, result)
result = [ [:block, val[0][1], val[1] ], *val[3] ] result = [ [:block, val[0][1], val[1] ], *val[3] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 206) module_eval(<<'.,.,', 'liquor.y', 206)
def _reduce_54(val, _values, result) def _reduce_54(val, _values, result)
result = [ val[0], val[1], *val[2] ] result = [ val[0], val[1], *val[2] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 210) module_eval(<<'.,.,', 'liquor.y', 210)
def _reduce_55(val, _values, result) def _reduce_55(val, _values, result)
result = [ [:block, val[0][1], val[1] ], *val[3] ] result = [ [:block, val[0][1], val[1] ], *val[3] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'liquor.y', 212) module_eval(<<'.,.,', 'liquor.y', 212)
def _reduce_56(val, _values, result) def _reduce_56(val, _values, result)
result = [ val[0], *val[1] ] result = [ val[0], *val[1] ]
result result
end end
.,., .,.,
@ -882,4 +882,4 @@ def _reduce_none(val, _values, result)
end end
end # class Parser end # class Parser
end # module Liquor end # module Liquor

Просмотреть файл

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.4.14 # This file is automatically generated by Racc 1.4.16.pre.1
# from Racc grammer file "". # from Racc grammer file "".
# #
@ -508,7 +508,7 @@ module_eval(<<'.,.,', 'machete.y', 44)
else else
ChoiceMatcher.new([val[0], val[2]]) ChoiceMatcher.new([val[0], val[2]])
end end
result result
end end
.,., .,.,
@ -524,7 +524,7 @@ module_eval(<<'.,.,', 'machete.y', 44)
module_eval(<<'.,.,', 'machete.y', 57) module_eval(<<'.,.,', 'machete.y', 57)
def _reduce_7(val, _values, result) def _reduce_7(val, _values, result)
result = NodeMatcher.new(val[0].to_sym) result = NodeMatcher.new(val[0].to_sym)
result result
end end
.,., .,.,
@ -532,7 +532,7 @@ module_eval(<<'.,.,', 'machete.y', 57)
module_eval(<<'.,.,', 'machete.y', 60) module_eval(<<'.,.,', 'machete.y', 60)
def _reduce_8(val, _values, result) def _reduce_8(val, _values, result)
result = NodeMatcher.new(val[0].to_sym, val[2]) result = NodeMatcher.new(val[0].to_sym, val[2])
result result
end end
.,., .,.,
@ -541,14 +541,14 @@ module_eval(<<'.,.,', 'machete.y', 60)
module_eval(<<'.,.,', 'machete.y', 64) module_eval(<<'.,.,', 'machete.y', 64)
def _reduce_10(val, _values, result) def _reduce_10(val, _values, result)
result = val[0].merge(val[2]) result = val[0].merge(val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'machete.y', 66) module_eval(<<'.,.,', 'machete.y', 66)
def _reduce_11(val, _values, result) def _reduce_11(val, _values, result)
result = { val[0].to_sym => val[2] } result = { val[0].to_sym => val[2] }
result result
end end
.,., .,.,
@ -560,7 +560,7 @@ module_eval(<<'.,.,', 'machete.y', 68)
Regexp.new("^" + Regexp.escape(symbol_value(val[2]).to_s)) Regexp.new("^" + Regexp.escape(symbol_value(val[2]).to_s))
) )
} }
result result
end end
.,., .,.,
@ -572,7 +572,7 @@ module_eval(<<'.,.,', 'machete.y', 75)
Regexp.new(Regexp.escape(symbol_value(val[2]).to_s) + "$") Regexp.new(Regexp.escape(symbol_value(val[2]).to_s) + "$")
) )
} }
result result
end end
.,., .,.,
@ -584,7 +584,7 @@ module_eval(<<'.,.,', 'machete.y', 82)
Regexp.new(Regexp.escape(symbol_value(val[2]).to_s)) Regexp.new(Regexp.escape(symbol_value(val[2]).to_s))
) )
} }
result result
end end
.,., .,.,
@ -596,7 +596,7 @@ module_eval(<<'.,.,', 'machete.y', 89)
Regexp.new("^" + Regexp.escape(string_value(val[2]))) Regexp.new("^" + Regexp.escape(string_value(val[2])))
) )
} }
result result
end end
.,., .,.,
@ -608,7 +608,7 @@ module_eval(<<'.,.,', 'machete.y', 96)
Regexp.new(Regexp.escape(string_value(val[2])) + "$") Regexp.new(Regexp.escape(string_value(val[2])) + "$")
) )
} }
result result
end end
.,., .,.,
@ -620,7 +620,7 @@ module_eval(<<'.,.,', 'machete.y', 103)
Regexp.new(Regexp.escape(string_value(val[2]))) Regexp.new(Regexp.escape(string_value(val[2])))
) )
} }
result result
end end
.,., .,.,
@ -632,7 +632,7 @@ module_eval(<<'.,.,', 'machete.y', 110)
Regexp.new(regexp_value(val[2])) Regexp.new(regexp_value(val[2]))
) )
} }
result result
end end
.,., .,.,
@ -665,14 +665,14 @@ module_eval(<<'.,.,', 'machete.y', 110)
module_eval(<<'.,.,', 'machete.y', 134) module_eval(<<'.,.,', 'machete.y', 134)
def _reduce_32(val, _values, result) def _reduce_32(val, _values, result)
result = ArrayMatcher.new(val[1]) result = ArrayMatcher.new(val[1])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'machete.y', 136) module_eval(<<'.,.,', 'machete.y', 136)
def _reduce_33(val, _values, result) def _reduce_33(val, _values, result)
result = [] result = []
result result
end end
.,., .,.,
@ -681,14 +681,14 @@ module_eval(<<'.,.,', 'machete.y', 136)
module_eval(<<'.,.,', 'machete.y', 139) module_eval(<<'.,.,', 'machete.y', 139)
def _reduce_35(val, _values, result) def _reduce_35(val, _values, result)
result = [val[0]] result = [val[0]]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'machete.y', 140) module_eval(<<'.,.,', 'machete.y', 140)
def _reduce_36(val, _values, result) def _reduce_36(val, _values, result)
result = val[0] << val[2] result = val[0] << val[2]
result result
end end
.,., .,.,
@ -697,28 +697,28 @@ module_eval(<<'.,.,', 'machete.y', 140)
module_eval(<<'.,.,', 'machete.y', 143) module_eval(<<'.,.,', 'machete.y', 143)
def _reduce_38(val, _values, result) def _reduce_38(val, _values, result)
result = Quantifier.new(val[0], *val[1]) result = Quantifier.new(val[0], *val[1])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'machete.y', 145) module_eval(<<'.,.,', 'machete.y', 145)
def _reduce_39(val, _values, result) def _reduce_39(val, _values, result)
result = [0, nil, 1] result = [0, nil, 1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'machete.y', 146) module_eval(<<'.,.,', 'machete.y', 146)
def _reduce_40(val, _values, result) def _reduce_40(val, _values, result)
result = [1, nil, 1] result = [1, nil, 1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'machete.y', 147) module_eval(<<'.,.,', 'machete.y', 147)
def _reduce_41(val, _values, result) def _reduce_41(val, _values, result)
result = [0, 1, 1] result = [0, 1, 1]
result result
end end
.,., .,.,
@ -726,7 +726,7 @@ module_eval(<<'.,.,', 'machete.y', 147)
module_eval(<<'.,.,', 'machete.y', 149) module_eval(<<'.,.,', 'machete.y', 149)
def _reduce_42(val, _values, result) def _reduce_42(val, _values, result)
result = [integer_value(val[1]), integer_value(val[1]), 1] result = [integer_value(val[1]), integer_value(val[1]), 1]
result result
end end
.,., .,.,
@ -734,7 +734,7 @@ module_eval(<<'.,.,', 'machete.y', 149)
module_eval(<<'.,.,', 'machete.y', 152) module_eval(<<'.,.,', 'machete.y', 152)
def _reduce_43(val, _values, result) def _reduce_43(val, _values, result)
result = [integer_value(val[1]), nil, 1] result = [integer_value(val[1]), nil, 1]
result result
end end
.,., .,.,
@ -742,7 +742,7 @@ module_eval(<<'.,.,', 'machete.y', 152)
module_eval(<<'.,.,', 'machete.y', 155) module_eval(<<'.,.,', 'machete.y', 155)
def _reduce_44(val, _values, result) def _reduce_44(val, _values, result)
result = [0, integer_value(val[2]), 1] result = [0, integer_value(val[2]), 1]
result result
end end
.,., .,.,
@ -750,77 +750,77 @@ module_eval(<<'.,.,', 'machete.y', 155)
module_eval(<<'.,.,', 'machete.y', 158) module_eval(<<'.,.,', 'machete.y', 158)
def _reduce_45(val, _values, result) def _reduce_45(val, _values, result)
result = [integer_value(val[1]), integer_value(val[3]), 1] result = [integer_value(val[1]), integer_value(val[3]), 1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'machete.y', 160) module_eval(<<'.,.,', 'machete.y', 160)
def _reduce_46(val, _values, result) def _reduce_46(val, _values, result)
result = [0, nil, 2] result = [0, nil, 2]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'machete.y', 161) module_eval(<<'.,.,', 'machete.y', 161)
def _reduce_47(val, _values, result) def _reduce_47(val, _values, result)
result = [1, nil, 2] result = [1, nil, 2]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'machete.y', 163) module_eval(<<'.,.,', 'machete.y', 163)
def _reduce_48(val, _values, result) def _reduce_48(val, _values, result)
result = LiteralMatcher.new(nil) result = LiteralMatcher.new(nil)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'machete.y', 164) module_eval(<<'.,.,', 'machete.y', 164)
def _reduce_49(val, _values, result) def _reduce_49(val, _values, result)
result = LiteralMatcher.new(true) result = LiteralMatcher.new(true)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'machete.y', 165) module_eval(<<'.,.,', 'machete.y', 165)
def _reduce_50(val, _values, result) def _reduce_50(val, _values, result)
result = LiteralMatcher.new(false) result = LiteralMatcher.new(false)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'machete.y', 166) module_eval(<<'.,.,', 'machete.y', 166)
def _reduce_51(val, _values, result) def _reduce_51(val, _values, result)
result = LiteralMatcher.new(integer_value(val[0])) result = LiteralMatcher.new(integer_value(val[0]))
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'machete.y', 167) module_eval(<<'.,.,', 'machete.y', 167)
def _reduce_52(val, _values, result) def _reduce_52(val, _values, result)
result = LiteralMatcher.new(symbol_value(val[0])) result = LiteralMatcher.new(symbol_value(val[0]))
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'machete.y', 168) module_eval(<<'.,.,', 'machete.y', 168)
def _reduce_53(val, _values, result) def _reduce_53(val, _values, result)
result = LiteralMatcher.new(string_value(val[0])) result = LiteralMatcher.new(string_value(val[0]))
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'machete.y', 169) module_eval(<<'.,.,', 'machete.y', 169)
def _reduce_54(val, _values, result) def _reduce_54(val, _values, result)
result = LiteralMatcher.new(regexp_value(val[0])) result = LiteralMatcher.new(regexp_value(val[0]))
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'machete.y', 171) module_eval(<<'.,.,', 'machete.y', 171)
def _reduce_55(val, _values, result) def _reduce_55(val, _values, result)
result = AnyMatcher.new result = AnyMatcher.new
result result
end end
.,., .,.,
@ -830,4 +830,4 @@ def _reduce_none(val, _values, result)
end end
end # class Parser end # class Parser
end # module Machete end # module Machete

Просмотреть файл

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.4.14 # This file is automatically generated by Racc 1.4.16.pre.1
# from Racc grammer file "". # from Racc grammer file "".
# #
@ -684,7 +684,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 47)
#@nodes.last.children.insert(0, val[0]) #@nodes.last.children.insert(0, val[0])
#puts val[0] #puts val[0]
@nodes.last.children += val[0] @nodes.last.children += val[0]
result result
end end
.,., .,.,
@ -692,7 +692,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 47)
module_eval(<<'.,.,', 'mediacloth.y', 57) module_eval(<<'.,.,', 'mediacloth.y', 57)
def _reduce_2(val, _values, result) def _reduce_2(val, _values, result)
result = val[0] result = val[0]
result result
end end
.,., .,.,
@ -700,7 +700,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 57)
module_eval(<<'.,.,', 'mediacloth.y', 61) module_eval(<<'.,.,', 'mediacloth.y', 61)
def _reduce_3(val, _values, result) def _reduce_3(val, _values, result)
result = val[0] result = val[0]
result result
end end
.,., .,.,
@ -708,7 +708,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 61)
module_eval(<<'.,.,', 'mediacloth.y', 65) module_eval(<<'.,.,', 'mediacloth.y', 65)
def _reduce_4(val, _values, result) def _reduce_4(val, _values, result)
result = val[0] result = val[0]
result result
end end
.,., .,.,
@ -719,7 +719,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 69)
list.list_type = :Dictionary list.list_type = :Dictionary
list.children = val[0] list.children = val[0]
result = list result = list
result result
end end
.,., .,.,
@ -727,7 +727,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 69)
module_eval(<<'.,.,', 'mediacloth.y', 76) module_eval(<<'.,.,', 'mediacloth.y', 76)
def _reduce_6(val, _values, result) def _reduce_6(val, _values, result)
result = val[0] result = val[0]
result result
end end
.,., .,.,
@ -735,7 +735,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 76)
module_eval(<<'.,.,', 'mediacloth.y', 80) module_eval(<<'.,.,', 'mediacloth.y', 80)
def _reduce_7(val, _values, result) def _reduce_7(val, _values, result)
result = val[0] result = val[0]
result result
end end
.,., .,.,
@ -743,7 +743,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 80)
module_eval(<<'.,.,', 'mediacloth.y', 84) module_eval(<<'.,.,', 'mediacloth.y', 84)
def _reduce_8(val, _values, result) def _reduce_8(val, _values, result)
result = val[0] result = val[0]
result result
end end
.,., .,.,
@ -751,7 +751,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 84)
module_eval(<<'.,.,', 'mediacloth.y', 88) module_eval(<<'.,.,', 'mediacloth.y', 88)
def _reduce_9(val, _values, result) def _reduce_9(val, _values, result)
result = val[0] result = val[0]
result result
end end
.,., .,.,
@ -761,7 +761,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 92)
k = KeywordAST.new(@ast_index, @ast_length) k = KeywordAST.new(@ast_index, @ast_length)
k.text = val[0] k.text = val[0]
result = k result = k
result result
end end
.,., .,.,
@ -771,7 +771,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 98)
p = ParagraphAST.new(@ast_index, @ast_length) p = ParagraphAST.new(@ast_index, @ast_length)
p.children = val[1] p.children = val[1]
result = p result = p
result result
end end
.,., .,.,
@ -783,7 +783,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 104)
l.url = val[1][0] l.url = val[1][0]
l.children += val[1][1..-1] if val[1].length > 1 l.children += val[1][1..-1] if val[1].length > 1
result = l result = l
result result
end end
.,., .,.,
@ -793,7 +793,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 112)
p = PasteAST.new(@ast_index, @ast_length) p = PasteAST.new(@ast_index, @ast_length)
p.children = val[1] p.children = val[1]
result = p result = p
result result
end end
.,., .,.,
@ -805,7 +805,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 118)
l.locator = val[3] l.locator = val[3]
l.children = val[4] unless val[4].nil? or val[4].empty? l.children = val[4] unless val[4].nil? or val[4].empty?
result = l result = l
result result
end end
.,., .,.,
@ -816,7 +816,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 126)
l.locator = val[1] l.locator = val[1]
l.children = val[2] unless val[2].nil? or val[2].empty? l.children = val[2] unless val[2].nil? or val[2].empty?
result = l result = l
result result
end end
.,., .,.,
@ -827,7 +827,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 133)
l.locator = val[2] l.locator = val[2]
l.sort_as = val[3] l.sort_as = val[3]
result = l result = l
result result
end end
.,., .,.,
@ -838,7 +838,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 140)
l.locator = val[3] l.locator = val[3]
l.children = val[4] unless val[4].nil? or val[4].empty? l.children = val[4] unless val[4].nil? or val[4].empty?
result = l result = l
result result
end end
.,., .,.,
@ -848,7 +848,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 140)
module_eval(<<'.,.,', 'mediacloth.y', 150) module_eval(<<'.,.,', 'mediacloth.y', 150)
def _reduce_19(val, _values, result) def _reduce_19(val, _values, result)
result = nil result = nil
result result
end end
.,., .,.,
@ -856,7 +856,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 150)
module_eval(<<'.,.,', 'mediacloth.y', 154) module_eval(<<'.,.,', 'mediacloth.y', 154)
def _reduce_20(val, _values, result) def _reduce_20(val, _values, result)
result = val[0] result = val[0]
result result
end end
.,., .,.,
@ -870,7 +870,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 161)
elem.name = val[0] elem.name = val[0]
elem.attributes = val[1] elem.attributes = val[1]
result = elem result = elem
result result
end end
.,., .,.,
@ -885,7 +885,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 171)
elem.attributes = val[1] elem.attributes = val[1]
elem.children += val[2] elem.children += val[2]
result = elem result = elem
result result
end end
.,., .,.,
@ -893,7 +893,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 171)
module_eval(<<'.,.,', 'mediacloth.y', 184) module_eval(<<'.,.,', 'mediacloth.y', 184)
def _reduce_23(val, _values, result) def _reduce_23(val, _values, result)
result = nil result = nil
result result
end end
.,., .,.,
@ -903,7 +903,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 188)
attr_map = val[2] ? val[2] : {} attr_map = val[2] ? val[2] : {}
attr_map[val[0]] = true attr_map[val[0]] = true
result = attr_map result = attr_map
result result
end end
.,., .,.,
@ -913,7 +913,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 194)
attr_map = val[2] ? val[2] : {} attr_map = val[2] ? val[2] : {}
attr_map[val[0]] = val[1] attr_map[val[0]] = val[1]
result = attr_map result = attr_map
result result
end end
.,., .,.,
@ -921,7 +921,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 194)
module_eval(<<'.,.,', 'mediacloth.y', 204) module_eval(<<'.,.,', 'mediacloth.y', 204)
def _reduce_26(val, _values, result) def _reduce_26(val, _values, result)
result = val result = val
result result
end end
.,., .,.,
@ -930,7 +930,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 208)
def _reduce_27(val, _values, result) def _reduce_27(val, _values, result)
result = [val[0]] result = [val[0]]
result += val[2] result += val[2]
result result
end end
.,., .,.,
@ -938,7 +938,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 208)
module_eval(<<'.,.,', 'mediacloth.y', 217) module_eval(<<'.,.,', 'mediacloth.y', 217)
def _reduce_28(val, _values, result) def _reduce_28(val, _values, result)
result = val[0] result = val[0]
result result
end end
.,., .,.,
@ -947,7 +947,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 221)
def _reduce_29(val, _values, result) def _reduce_29(val, _values, result)
result = val[0] result = val[0]
result += val[2] if val[2] result += val[2] if val[2]
result result
end end
.,., .,.,
@ -955,7 +955,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 221)
module_eval(<<'.,.,', 'mediacloth.y', 229) module_eval(<<'.,.,', 'mediacloth.y', 229)
def _reduce_30(val, _values, result) def _reduce_30(val, _values, result)
result = nil result = nil
result result
end end
.,., .,.,
@ -963,7 +963,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 229)
module_eval(<<'.,.,', 'mediacloth.y', 233) module_eval(<<'.,.,', 'mediacloth.y', 233)
def _reduce_31(val, _values, result) def _reduce_31(val, _values, result)
result = val[1] result = val[1]
result result
end end
.,., .,.,
@ -971,7 +971,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 233)
module_eval(<<'.,.,', 'mediacloth.y', 239) module_eval(<<'.,.,', 'mediacloth.y', 239)
def _reduce_32(val, _values, result) def _reduce_32(val, _values, result)
result = nil result = nil
result result
end end
.,., .,.,
@ -979,7 +979,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 239)
module_eval(<<'.,.,', 'mediacloth.y', 243) module_eval(<<'.,.,', 'mediacloth.y', 243)
def _reduce_33(val, _values, result) def _reduce_33(val, _values, result)
result = val[1] result = val[1]
result result
end end
.,., .,.,
@ -987,7 +987,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 243)
module_eval(<<'.,.,', 'mediacloth.y', 249) module_eval(<<'.,.,', 'mediacloth.y', 249)
def _reduce_34(val, _values, result) def _reduce_34(val, _values, result)
result = nil result = nil
result result
end end
.,., .,.,
@ -995,7 +995,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 249)
module_eval(<<'.,.,', 'mediacloth.y', 253) module_eval(<<'.,.,', 'mediacloth.y', 253)
def _reduce_35(val, _values, result) def _reduce_35(val, _values, result)
result = val[1] result = val[1]
result result
end end
.,., .,.,
@ -1006,7 +1006,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 257)
i.children = val[1] i.children = val[1]
result = [i] result = [i]
result += val[2] if val[2] result += val[2] if val[2]
result result
end end
.,., .,.,
@ -1015,7 +1015,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 266)
def _reduce_37(val, _values, result) def _reduce_37(val, _values, result)
result = [] result = []
result << val[0] result << val[0]
result result
end end
.,., .,.,
@ -1025,7 +1025,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 271)
result = [] result = []
result += val[0] result += val[0]
result << val[1] result << val[1]
result result
end end
.,., .,.,
@ -1036,7 +1036,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 279)
p.formatting = val[0][0] p.formatting = val[0][0]
p.contents = val[0][1] p.contents = val[0][1]
result = p result = p
result result
end end
.,., .,.,
@ -1044,7 +1044,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 279)
module_eval(<<'.,.,', 'mediacloth.y', 286) module_eval(<<'.,.,', 'mediacloth.y', 286)
def _reduce_40(val, _values, result) def _reduce_40(val, _values, result)
result = val[0] result = val[0]
result result
end end
.,., .,.,
@ -1054,7 +1054,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 293)
table = TableAST.new(@ast_index, @ast_length) table = TableAST.new(@ast_index, @ast_length)
table.children = val[1] unless val[1].nil? or val[1].empty? table.children = val[1] unless val[1].nil? or val[1].empty?
result = table result = table
result result
end end
.,., .,.,
@ -1065,7 +1065,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 299)
table.options = val[1] table.options = val[1]
table.children = val[2] unless val[2].nil? or val[2].empty? table.children = val[2] unless val[2].nil? or val[2].empty?
result = table result = table
result result
end end
.,., .,.,
@ -1073,7 +1073,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 299)
module_eval(<<'.,.,', 'mediacloth.y', 307) module_eval(<<'.,.,', 'mediacloth.y', 307)
def _reduce_43(val, _values, result) def _reduce_43(val, _values, result)
result = nil result = nil
result result
end end
.,., .,.,
@ -1084,7 +1084,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 311)
row.children = val[1] unless val[1].nil? or val[1].empty? row.children = val[1] unless val[1].nil? or val[1].empty?
result = [row] result = [row]
result += val[3] unless val[3].nil? or val[3].empty? result += val[3] unless val[3].nil? or val[3].empty?
result result
end end
.,., .,.,
@ -1096,7 +1096,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 318)
row.options = val[1] row.options = val[1]
result = [row] result = [row]
result += val[4] unless val[4].nil? or val[4].empty? result += val[4] unless val[4].nil? or val[4].empty?
result result
end end
.,., .,.,
@ -1104,7 +1104,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 318)
module_eval(<<'.,.,', 'mediacloth.y', 327) module_eval(<<'.,.,', 'mediacloth.y', 327)
def _reduce_46(val, _values, result) def _reduce_46(val, _values, result)
result = nil result = nil
result result
end end
.,., .,.,
@ -1115,7 +1115,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 331)
cell.type = :head cell.type = :head
result = [cell] result = [cell]
result += val[2] unless val[2].nil? or val[2].empty? result += val[2] unless val[2].nil? or val[2].empty?
result result
end end
.,., .,.,
@ -1127,7 +1127,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 338)
cell.type = :head cell.type = :head
result = [cell] result = [cell]
result += val[3] unless val[3].nil? or val[3].empty? result += val[3] unless val[3].nil? or val[3].empty?
result result
end end
.,., .,.,
@ -1138,7 +1138,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 346)
cell.type = :body cell.type = :body
result = [cell] result = [cell]
result += val[2] unless val[2].nil? or val[2].empty? result += val[2] unless val[2].nil? or val[2].empty?
result result
end end
.,., .,.,
@ -1158,49 +1158,49 @@ module_eval(<<'.,.,', 'mediacloth.y', 353)
val[3].first.attributes = val[1] val[3].first.attributes = val[1]
end end
result result
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mediacloth.y', 371) module_eval(<<'.,.,', 'mediacloth.y', 371)
def _reduce_51(val, _values, result) def _reduce_51(val, _values, result)
return [:None, val[0]] return [:None, val[0]]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mediacloth.y', 373) module_eval(<<'.,.,', 'mediacloth.y', 373)
def _reduce_52(val, _values, result) def _reduce_52(val, _values, result)
return [:HLine, val[0]] return [:HLine, val[0]]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mediacloth.y', 375) module_eval(<<'.,.,', 'mediacloth.y', 375)
def _reduce_53(val, _values, result) def _reduce_53(val, _values, result)
return [:CharacterEntity, val[0]] return [:CharacterEntity, val[0]]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mediacloth.y', 377) module_eval(<<'.,.,', 'mediacloth.y', 377)
def _reduce_54(val, _values, result) def _reduce_54(val, _values, result)
return [:SignatureDate, val[0]] return [:SignatureDate, val[0]]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mediacloth.y', 379) module_eval(<<'.,.,', 'mediacloth.y', 379)
def _reduce_55(val, _values, result) def _reduce_55(val, _values, result)
return [:SignatureName, val[0]] return [:SignatureName, val[0]]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mediacloth.y', 381) module_eval(<<'.,.,', 'mediacloth.y', 381)
def _reduce_56(val, _values, result) def _reduce_56(val, _values, result)
return [:SignatureFull, val[0]] return [:SignatureFull, val[0]]
result result
end end
.,., .,.,
@ -1210,7 +1210,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 387)
result = FormattedAST.new(@ast_index, @ast_length) result = FormattedAST.new(@ast_index, @ast_length)
result.formatting = :Bold result.formatting = :Bold
result result
result result
end end
.,., .,.,
@ -1220,7 +1220,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 393)
result = FormattedAST.new(@ast_index, @ast_length) result = FormattedAST.new(@ast_index, @ast_length)
result.formatting = :Italic result.formatting = :Italic
result result
result result
end end
.,., .,.,
@ -1231,7 +1231,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 399)
p.formatting = :Bold p.formatting = :Bold
p.children += val[1] p.children += val[1]
result = p result = p
result result
end end
.,., .,.,
@ -1242,7 +1242,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 406)
p.formatting = :Italic p.formatting = :Italic
p.children += val[1] p.children += val[1]
result = p result = p
result result
end end
.,., .,.,
@ -1254,7 +1254,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 415)
list.children << val[1] list.children << val[1]
list.children += val[2] list.children += val[2]
result = list result = list
result result
end end
.,., .,.,
@ -1266,14 +1266,14 @@ module_eval(<<'.,.,', 'mediacloth.y', 425)
list.children << val[1] list.children << val[1]
list.children += val[2] list.children += val[2]
result = list result = list
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mediacloth.y', 434) module_eval(<<'.,.,', 'mediacloth.y', 434)
def _reduce_63(val, _values, result) def _reduce_63(val, _values, result)
result = [] result = []
result result
end end
.,., .,.,
@ -1282,14 +1282,14 @@ module_eval(<<'.,.,', 'mediacloth.y', 437)
def _reduce_64(val, _values, result) def _reduce_64(val, _values, result)
result << val[1] result << val[1]
result += val[2] result += val[2]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mediacloth.y', 441) module_eval(<<'.,.,', 'mediacloth.y', 441)
def _reduce_65(val, _values, result) def _reduce_65(val, _values, result)
result = [] result = []
result result
end end
.,., .,.,
@ -1297,7 +1297,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 441)
module_eval(<<'.,.,', 'mediacloth.y', 447) module_eval(<<'.,.,', 'mediacloth.y', 447)
def _reduce_66(val, _values, result) def _reduce_66(val, _values, result)
result = ListItemAST.new(@ast_index, @ast_length) result = ListItemAST.new(@ast_index, @ast_length)
result result
end end
.,., .,.,
@ -1307,7 +1307,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 451)
li = ListItemAST.new(@ast_index, @ast_length) li = ListItemAST.new(@ast_index, @ast_length)
li.children += val[1] li.children += val[1]
result = li result = li
result result
end end
.,., .,.,
@ -1316,7 +1316,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 460)
def _reduce_68(val, _values, result) def _reduce_68(val, _values, result)
result = [val[1]] result = [val[1]]
result += val[2] result += val[2]
result result
end end
.,., .,.,
@ -1324,7 +1324,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 460)
module_eval(<<'.,.,', 'mediacloth.y', 465) module_eval(<<'.,.,', 'mediacloth.y', 465)
def _reduce_69(val, _values, result) def _reduce_69(val, _values, result)
result = val[1] result = val[1]
result result
end end
.,., .,.,
@ -1332,7 +1332,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 465)
module_eval(<<'.,.,', 'mediacloth.y', 472) module_eval(<<'.,.,', 'mediacloth.y', 472)
def _reduce_70(val, _values, result) def _reduce_70(val, _values, result)
result = ListTermAST.new(@ast_index, @ast_length) result = ListTermAST.new(@ast_index, @ast_length)
result result
end end
.,., .,.,
@ -1342,7 +1342,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 476)
term = ListTermAST.new(@ast_index, @ast_length) term = ListTermAST.new(@ast_index, @ast_length)
term.children += val[1] term.children += val[1]
result = term result = term
result result
end end
.,., .,.,
@ -1351,7 +1351,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 484)
def _reduce_72(val, _values, result) def _reduce_72(val, _values, result)
result = [val[0]] result = [val[0]]
result += val[1] if val[1] result += val[1] if val[1]
result result
end end
.,., .,.,
@ -1359,7 +1359,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 484)
module_eval(<<'.,.,', 'mediacloth.y', 489) module_eval(<<'.,.,', 'mediacloth.y', 489)
def _reduce_73(val, _values, result) def _reduce_73(val, _values, result)
result = [] result = []
result result
end end
.,., .,.,
@ -1367,7 +1367,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 489)
module_eval(<<'.,.,', 'mediacloth.y', 495) module_eval(<<'.,.,', 'mediacloth.y', 495)
def _reduce_74(val, _values, result) def _reduce_74(val, _values, result)
result = ListDefinitionAST.new(@ast_index, @ast_length) result = ListDefinitionAST.new(@ast_index, @ast_length)
result result
end end
.,., .,.,
@ -1377,7 +1377,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 499)
term = ListDefinitionAST.new(@ast_index, @ast_length) term = ListDefinitionAST.new(@ast_index, @ast_length)
term.children += val[1] term.children += val[1]
result = term result = term
result result
end end
.,., .,.,
@ -1387,7 +1387,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 506)
p = PreformattedAST.new(@ast_index, @ast_length) p = PreformattedAST.new(@ast_index, @ast_length)
p.children += val[1] p.children += val[1]
result = p result = p
result result
end end
.,., .,.,
@ -1398,7 +1398,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 512)
p.indented = true p.indented = true
p.children += val[1] p.children += val[1]
result = p result = p
result result
end end
.,., .,.,
@ -1410,7 +1410,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 520)
s.children = val[1] s.children = val[1]
s.level = val[0].length s.level = val[0].length
result = s result = s
result result
end end
.,., .,.,
@ -1421,7 +1421,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 530)
t.template_name = val[1] t.template_name = val[1]
t.children = val[2] unless val[2].nil? or val[2].empty? t.children = val[2] unless val[2].nil? or val[2].empty?
result = t result = t
result result
end end
.,., .,.,
@ -1429,7 +1429,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 530)
module_eval(<<'.,.,', 'mediacloth.y', 539) module_eval(<<'.,.,', 'mediacloth.y', 539)
def _reduce_80(val, _values, result) def _reduce_80(val, _values, result)
result = nil result = nil
result result
end end
.,., .,.,
@ -1440,7 +1440,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 543)
p.parameter_value = val[1] p.parameter_value = val[1]
result = [p] result = [p]
result += val[2] if val[2] result += val[2] if val[2]
result result
end end
.,., .,.,
@ -1451,7 +1451,7 @@ module_eval(<<'.,.,', 'mediacloth.y', 550)
p.children << val[1] p.children << val[1]
result = [p] result = [p]
result += val[2] if val[2] result += val[2] if val[2]
result result
end end
.,., .,.,

Просмотреть файл

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.4.14 # This file is automatically generated by Racc 1.4.16.pre.1
# from Racc grammer file "". # from Racc grammer file "".
# #
@ -35,7 +35,7 @@ def initialize options = {}
@includes = options[:includes] || [] @includes = options[:includes] || []
@quiet = options[:quiet] @quiet = options[:quiet]
@style = options[:style] || :cim # default to style CIM v2.2 syntax @style = options[:style] || :cim # default to style CIM v2.2 syntax
@lineno = 1 @lineno = 1
@file = nil @file = nil
@iconv = nil @iconv = nil
@ -699,14 +699,14 @@ Racc_debug_parser = false
module_eval(<<'.,.,', 'mof.y', 41) module_eval(<<'.,.,', 'mof.y', 41)
def _reduce_1(val, _values, result) def _reduce_1(val, _values, result)
result = Hash.new result = Hash.new
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mof.y', 43) module_eval(<<'.,.,', 'mof.y', 43)
def _reduce_2(val, _values, result) def _reduce_2(val, _values, result)
result = { @name => @result } result = { @name => @result }
result result
end end
.,., .,.,
@ -715,7 +715,7 @@ module_eval(<<'.,.,', 'mof.y', 45)
def _reduce_3(val, _values, result) def _reduce_3(val, _values, result)
result = val[0] result = val[0]
result[@name] = @result result[@name] = @result
result result
end end
.,., .,.,
@ -726,7 +726,7 @@ module_eval(<<'.,.,', 'mof.y', 53)
def _reduce_5(val, _values, result) def _reduce_5(val, _values, result)
#puts "Class '#{val[0].name}'" #puts "Class '#{val[0].name}'"
@result.classes << val[0] @result.classes << val[0]
result result
end end
.,., .,.,
@ -735,14 +735,14 @@ module_eval(<<'.,.,', 'mof.y', 57)
def _reduce_6(val, _values, result) def _reduce_6(val, _values, result)
@result.qualifiers << val[0] @result.qualifiers << val[0]
@qualifiers[val[0].name.downcase] = val[0] @qualifiers[val[0].name.downcase] = val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mof.y', 61) module_eval(<<'.,.,', 'mof.y', 61)
def _reduce_7(val, _values, result) def _reduce_7(val, _values, result)
@result.instances << val[0] @result.instances << val[0]
result result
end end
.,., .,.,
@ -751,7 +751,7 @@ module_eval(<<'.,.,', 'mof.y', 71)
def _reduce_8(val, _values, result) def _reduce_8(val, _values, result)
raise MOF::Helper::Error.new(@name,@lineno,@line,"Missing filename after '#pragma include'") unless val[3] raise MOF::Helper::Error.new(@name,@lineno,@line,"Missing filename after '#pragma include'") unless val[3]
open val[3], :pragma open val[3], :pragma
result result
end end
.,., .,.,
@ -763,7 +763,7 @@ module_eval(<<'.,.,', 'mof.y', 76)
raise StyleError.new(@name,@lineno,@line,"Use '#pragma include' instead of '#include'") unless @style == :wmi raise StyleError.new(@name,@lineno,@line,"Use '#pragma include' instead of '#include'") unless @style == :wmi
raise MOF::Helper::Error.new(@name,@lineno,@line,"Missing filename after '#include'") unless val[2] raise MOF::Helper::Error.new(@name,@lineno,@line,"Missing filename after '#include'") unless val[2]
open val[2], :pragma open val[2], :pragma
result result
end end
.,., .,.,
@ -772,14 +772,14 @@ module_eval(<<'.,.,', 'mof.y', 76)
module_eval(<<'.,.,', 'mof.y', 88) module_eval(<<'.,.,', 'mof.y', 88)
def _reduce_12(val, _values, result) def _reduce_12(val, _values, result)
raise StyleError.new(@name,@lineno,@line,"#pragma parameter missing") unless @style == :wmi raise StyleError.new(@name,@lineno,@line,"#pragma parameter missing") unless @style == :wmi
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mof.y', 90) module_eval(<<'.,.,', 'mof.y', 90)
def _reduce_13(val, _values, result) def _reduce_13(val, _values, result)
result = val[1] result = val[1]
result result
end end
.,., .,.,
@ -792,7 +792,7 @@ module_eval(<<'.,.,', 'mof.y', 90)
module_eval(<<'.,.,', 'mof.y', 101) module_eval(<<'.,.,', 'mof.y', 101)
def _reduce_17(val, _values, result) def _reduce_17(val, _values, result)
raise StyleError.new(@name,@lineno,@line,"#pragma parameter missing") unless @style == :wmi raise StyleError.new(@name,@lineno,@line,"#pragma parameter missing") unless @style == :wmi
result result
end end
.,., .,.,
@ -805,21 +805,21 @@ module_eval(<<'.,.,', 'mof.y', 112)
features = val[6] features = val[6]
# FIXME: features must not include references # FIXME: features must not include references
result = CIM::Class.new(val[2],qualifiers,val[3],val[4],features) result = CIM::Class.new(val[2],qualifiers,val[3],val[4],features)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mof.y', 121) module_eval(<<'.,.,', 'mof.y', 121)
def _reduce_20(val, _values, result) def _reduce_20(val, _values, result)
result = [] result = []
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mof.y', 123) module_eval(<<'.,.,', 'mof.y', 123)
def _reduce_21(val, _values, result) def _reduce_21(val, _values, result)
result = val[0] << val[1] result = val[0] << val[1]
result result
end end
.,., .,.,
@ -834,7 +834,7 @@ module_eval(<<'.,.,', 'mof.y', 123)
module_eval(<<'.,.,', 'mof.y', 136) module_eval(<<'.,.,', 'mof.y', 136)
def _reduce_26(val, _values, result) def _reduce_26(val, _values, result)
result = CIM::QualifierSet.new val[0] result = CIM::QualifierSet.new val[0]
result result
end end
.,., .,.,
@ -842,14 +842,14 @@ module_eval(<<'.,.,', 'mof.y', 136)
module_eval(<<'.,.,', 'mof.y', 141) module_eval(<<'.,.,', 'mof.y', 141)
def _reduce_27(val, _values, result) def _reduce_27(val, _values, result)
result = val[2] result = val[2]
result.unshift val[1] if val[1] result.unshift val[1] if val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mof.y', 147) module_eval(<<'.,.,', 'mof.y', 147)
def _reduce_28(val, _values, result) def _reduce_28(val, _values, result)
result = [] result = []
result result
end end
.,., .,.,
@ -858,7 +858,7 @@ module_eval(<<'.,.,', 'mof.y', 149)
def _reduce_29(val, _values, result) def _reduce_29(val, _values, result)
result = val[0] result = val[0]
result << val[2] if val[2] result << val[2] if val[2]
result result
end end
.,., .,.,
@ -882,7 +882,7 @@ module_eval(<<'.,.,', 'mof.y', 156)
else else
result = CIM::Qualifier.new(qualifier,value,val[2]) result = CIM::Qualifier.new(qualifier,value,val[2])
end end
result result
end end
.,., .,.,
@ -891,7 +891,7 @@ module_eval(<<'.,.,', 'mof.y', 156)
module_eval(<<'.,.,', 'mof.y', 179) module_eval(<<'.,.,', 'mof.y', 179)
def _reduce_32(val, _values, result) def _reduce_32(val, _values, result)
result = CIM::QualifierFlavors.new val[1] result = CIM::QualifierFlavors.new val[1]
result result
end end
.,., .,.,
@ -902,7 +902,7 @@ module_eval(<<'.,.,', 'mof.y', 179)
module_eval(<<'.,.,', 'mof.y', 189) module_eval(<<'.,.,', 'mof.y', 189)
def _reduce_35(val, _values, result) def _reduce_35(val, _values, result)
result = val[1] result = val[1]
result result
end end
.,., .,.,
@ -927,7 +927,7 @@ module_eval(<<'.,.,', 'mof.y', 196)
when :amended, :toinstance when :amended, :toinstance
raise StyleError.new(@name,@lineno,@line,"'#{val[0]}' is not a valid flavor") unless @style == :wmi raise StyleError.new(@name,@lineno,@line,"'#{val[0]}' is not a valid flavor") unless @style == :wmi
end end
result result
end end
.,., .,.,
@ -942,28 +942,28 @@ module_eval(<<'.,.,', 'mof.y', 196)
module_eval(<<'.,.,', 'mof.y', 215) module_eval(<<'.,.,', 'mof.y', 215)
def _reduce_48(val, _values, result) def _reduce_48(val, _values, result)
raise ParseError.new("Class name must be prefixed by '<schema>_'") unless val[0].include?("_") || @style == :wmi raise ParseError.new("Class name must be prefixed by '<schema>_'") unless val[0].include?("_") || @style == :wmi
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mof.y', 220) module_eval(<<'.,.,', 'mof.y', 220)
def _reduce_49(val, _values, result) def _reduce_49(val, _values, result)
result = val[1] result = val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mof.y', 225) module_eval(<<'.,.,', 'mof.y', 225)
def _reduce_50(val, _values, result) def _reduce_50(val, _values, result)
result = val[1] result = val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mof.y', 230) module_eval(<<'.,.,', 'mof.y', 230)
def _reduce_51(val, _values, result) def _reduce_51(val, _values, result)
result = val[1] result = val[1]
result result
end end
.,., .,.,
@ -976,7 +976,7 @@ module_eval(<<'.,.,', 'mof.y', 236)
type = val[1] type = val[1]
end end
result = CIM::Property.new(type,val[2],val[0],val[4]) result = CIM::Property.new(type,val[2],val[0],val[4])
result result
end end
.,., .,.,
@ -986,14 +986,14 @@ module_eval(<<'.,.,', 'mof.y', 247)
if val[4] if val[4]
raise StyleError.new(@name,@lineno,@line,"Array not allowed in reference declaration") unless @style == :wmi raise StyleError.new(@name,@lineno,@line,"Array not allowed in reference declaration") unless @style == :wmi
end end
result = CIM::Reference.new(val[1],val[2],val[0],val[4]) result = CIM::Reference.new(val[1],val[2],val[0],val[4])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mof.y', 255) module_eval(<<'.,.,', 'mof.y', 255)
def _reduce_54(val, _values, result) def _reduce_54(val, _values, result)
result = CIM::Method.new(val[1],val[2],val[0],val[4]) result = CIM::Method.new(val[1],val[2],val[0],val[4])
result result
end end
.,., .,.,
@ -1004,7 +1004,7 @@ module_eval(<<'.,.,', 'mof.y', 261)
def _reduce_56(val, _values, result) def _reduce_56(val, _values, result)
# tmplprov.mof has 'string Property;' # tmplprov.mof has 'string Property;'
raise StyleError.new(@name,@lineno,@line,"Invalid keyword '#{val[0]}' used for property name") unless @style == :wmi raise StyleError.new(@name,@lineno,@line,"Invalid keyword '#{val[0]}' used for property name") unless @style == :wmi
result result
end end
.,., .,.,
@ -1013,7 +1013,7 @@ module_eval(<<'.,.,', 'mof.y', 261)
module_eval(<<'.,.,', 'mof.y', 269) module_eval(<<'.,.,', 'mof.y', 269)
def _reduce_58(val, _values, result) def _reduce_58(val, _values, result)
result = "Indication" result = "Indication"
result result
end end
.,., .,.,
@ -1050,7 +1050,7 @@ module_eval(<<'.,.,', 'mof.y', 269)
module_eval(<<'.,.,', 'mof.y', 292) module_eval(<<'.,.,', 'mof.y', 292)
def _reduce_74(val, _values, result) def _reduce_74(val, _values, result)
raise StyleError.new(@name,@lineno,@line,"'void' is not a valid datatype") unless @style == :wmi raise StyleError.new(@name,@lineno,@line,"'void' is not a valid datatype") unless @style == :wmi
result result
end end
.,., .,.,
@ -1060,14 +1060,14 @@ module_eval(<<'.,.,', 'mof.y', 297)
# WMI uses class names as data types (without REF ?!) # WMI uses class names as data types (without REF ?!)
raise StyleError.new(@name,@lineno,@line,"Expected 'ref' keyword after classname '#{val[0]}'") unless @style == :wmi raise StyleError.new(@name,@lineno,@line,"Expected 'ref' keyword after classname '#{val[0]}'") unless @style == :wmi
result = CIM::ReferenceType.new val[0] result = CIM::ReferenceType.new val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mof.y', 303) module_eval(<<'.,.,', 'mof.y', 303)
def _reduce_76(val, _values, result) def _reduce_76(val, _values, result)
result = CIM::ReferenceType.new val[0] result = CIM::ReferenceType.new val[0]
result result
end end
.,., .,.,
@ -1078,21 +1078,21 @@ module_eval(<<'.,.,', 'mof.y', 303)
module_eval(<<'.,.,', 'mof.y', 313) module_eval(<<'.,.,', 'mof.y', 313)
def _reduce_79(val, _values, result) def _reduce_79(val, _values, result)
result = val[1].unshift val[0] result = val[1].unshift val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mof.y', 318) module_eval(<<'.,.,', 'mof.y', 318)
def _reduce_80(val, _values, result) def _reduce_80(val, _values, result)
result = [] result = []
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mof.y', 320) module_eval(<<'.,.,', 'mof.y', 320)
def _reduce_81(val, _values, result) def _reduce_81(val, _values, result)
result = val[0] << val[2] result = val[0] << val[2]
result result
end end
.,., .,.,
@ -1105,7 +1105,7 @@ module_eval(<<'.,.,', 'mof.y', 325)
type = val[1] type = val[1]
end end
result = CIM::Property.new(type,val[2],val[0]) result = CIM::Property.new(type,val[2],val[0])
result result
end end
.,., .,.,
@ -1124,21 +1124,21 @@ module_eval(<<'.,.,', 'mof.y', 325)
module_eval(<<'.,.,', 'mof.y', 351) module_eval(<<'.,.,', 'mof.y', 351)
def _reduce_89(val, _values, result) def _reduce_89(val, _values, result)
raise "Default parameter value not allowed in syntax style '{@style}'" unless @style == :wmi raise "Default parameter value not allowed in syntax style '{@style}'" unless @style == :wmi
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mof.y', 356) module_eval(<<'.,.,', 'mof.y', 356)
def _reduce_90(val, _values, result) def _reduce_90(val, _values, result)
result = val[1] result = val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mof.y', 361) module_eval(<<'.,.,', 'mof.y', 361)
def _reduce_91(val, _values, result) def _reduce_91(val, _values, result)
result = -1 result = -1
result result
end end
.,., .,.,
@ -1151,7 +1151,7 @@ module_eval(<<'.,.,', 'mof.y', 361)
module_eval(<<'.,.,', 'mof.y', 372) module_eval(<<'.,.,', 'mof.y', 372)
def _reduce_95(val, _values, result) def _reduce_95(val, _values, result)
result = val[1] result = val[1]
result result
end end
.,., .,.,
@ -1164,7 +1164,7 @@ module_eval(<<'.,.,', 'mof.y', 372)
module_eval(<<'.,.,', 'mof.y', 383) module_eval(<<'.,.,', 'mof.y', 383)
def _reduce_99(val, _values, result) def _reduce_99(val, _values, result)
result = val[1] result = val[1]
result result
end end
.,., .,.,
@ -1173,14 +1173,14 @@ module_eval(<<'.,.,', 'mof.y', 383)
module_eval(<<'.,.,', 'mof.y', 389) module_eval(<<'.,.,', 'mof.y', 389)
def _reduce_101(val, _values, result) def _reduce_101(val, _values, result)
result = [ val[0] ] result = [ val[0] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mof.y', 391) module_eval(<<'.,.,', 'mof.y', 391)
def _reduce_102(val, _values, result) def _reduce_102(val, _values, result)
result = val[0] << val[2] result = val[0] << val[2]
result result
end end
.,., .,.,
@ -1199,7 +1199,7 @@ module_eval(<<'.,.,', 'mof.y', 391)
module_eval(<<'.,.,', 'mof.y', 402) module_eval(<<'.,.,', 'mof.y', 402)
def _reduce_109(val, _values, result) def _reduce_109(val, _values, result)
raise "Instance as property value not allowed in syntax style '{@style}'" unless @style == :wmi raise "Instance as property value not allowed in syntax style '{@style}'" unless @style == :wmi
result result
end end
.,., .,.,
@ -1218,7 +1218,7 @@ module_eval(<<'.,.,', 'mof.y', 402)
module_eval(<<'.,.,', 'mof.y', 416) module_eval(<<'.,.,', 'mof.y', 416)
def _reduce_116(val, _values, result) def _reduce_116(val, _values, result)
result = val[0] + val[1] result = val[0] + val[1]
result result
end end
.,., .,.,
@ -1251,7 +1251,7 @@ module_eval(<<'.,.,', 'mof.y', 416)
module_eval(<<'.,.,', 'mof.y', 471) module_eval(<<'.,.,', 'mof.y', 471)
def _reduce_130(val, _values, result) def _reduce_130(val, _values, result)
result = CIM::QualifierDeclaration.new( val[1], val[2][0], val[2][1], val[3], val[4]) result = CIM::QualifierDeclaration.new( val[1], val[2][0], val[2][1], val[3], val[4])
result result
end end
.,., .,.,
@ -1274,28 +1274,28 @@ module_eval(<<'.,.,', 'mof.y', 490)
def _reduce_138(val, _values, result) def _reduce_138(val, _values, result)
type = val[2].nil? ? val[1] : CIM::Array.new(val[2],val[1]) type = val[2].nil? ? val[1] : CIM::Array.new(val[2],val[1])
result = [ type, val[3] ] result = [ type, val[3] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mof.y', 497) module_eval(<<'.,.,', 'mof.y', 497)
def _reduce_139(val, _values, result) def _reduce_139(val, _values, result)
result = CIM::QualifierScopes.new(val[3]) result = CIM::QualifierScopes.new(val[3])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mof.y', 502) module_eval(<<'.,.,', 'mof.y', 502)
def _reduce_140(val, _values, result) def _reduce_140(val, _values, result)
result = [ val[0] ] result = [ val[0] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mof.y', 504) module_eval(<<'.,.,', 'mof.y', 504)
def _reduce_141(val, _values, result) def _reduce_141(val, _values, result)
result = val[0] << val[2] result = val[0] << val[2]
result result
end end
.,., .,.,
@ -1322,21 +1322,21 @@ module_eval(<<'.,.,', 'mof.y', 504)
module_eval(<<'.,.,', 'mof.y', 522) module_eval(<<'.,.,', 'mof.y', 522)
def _reduce_152(val, _values, result) def _reduce_152(val, _values, result)
result = CIM::QualifierFlavors.new val[3] result = CIM::QualifierFlavors.new val[3]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mof.y', 527) module_eval(<<'.,.,', 'mof.y', 527)
def _reduce_153(val, _values, result) def _reduce_153(val, _values, result)
result = [ val[0] ] result = [ val[0] ]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'mof.y', 529) module_eval(<<'.,.,', 'mof.y', 529)
def _reduce_154(val, _values, result) def _reduce_154(val, _values, result)
result = val[0] << val[2] result = val[0] << val[2]
result result
end end
.,., .,.,
@ -1353,7 +1353,7 @@ module_eval(<<'.,.,', 'mof.y', 529)
module_eval(<<'.,.,', 'mof.y', 553) module_eval(<<'.,.,', 'mof.y', 553)
def _reduce_160(val, _values, result) def _reduce_160(val, _values, result)
raise "Instance property '#{val[1]} must have a value" unless @style == :wmi raise "Instance property '#{val[1]} must have a value" unless @style == :wmi
result result
end end
.,., .,.,
@ -1363,6 +1363,6 @@ def _reduce_none(val, _values, result)
end end
end # class Parser end # class Parser
end # module MOF end # module MOF

Просмотреть файл

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.4.14 # This file is automatically generated by Racc 1.4.16.pre.1
# from Racc grammer file "". # from Racc grammer file "".
# #
@ -386,28 +386,28 @@ Racc_debug_parser = false
module_eval(<<'.,.,', 'namae.y', 39) module_eval(<<'.,.,', 'namae.y', 39)
def _reduce_1(val, _values, result) def _reduce_1(val, _values, result)
result = [] result = []
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'namae.y', 40) module_eval(<<'.,.,', 'namae.y', 40)
def _reduce_2(val, _values, result) def _reduce_2(val, _values, result)
result = [val[0]] result = [val[0]]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'namae.y', 41) module_eval(<<'.,.,', 'namae.y', 41)
def _reduce_3(val, _values, result) def _reduce_3(val, _values, result)
result = val[0] << val[2] result = val[0] << val[2]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'namae.y', 43) module_eval(<<'.,.,', 'namae.y', 43)
def _reduce_4(val, _values, result) def _reduce_4(val, _values, result)
result = Name.new(:given => val[0]) result = Name.new(:given => val[0])
result result
end end
.,., .,.,
@ -416,14 +416,14 @@ module_eval(<<'.,.,', 'namae.y', 43)
module_eval(<<'.,.,', 'namae.y', 45) module_eval(<<'.,.,', 'namae.y', 45)
def _reduce_6(val, _values, result) def _reduce_6(val, _values, result)
result = val[0].merge(:family => val[1]) result = val[0].merge(:family => val[1])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'namae.y', 46) module_eval(<<'.,.,', 'namae.y', 46)
def _reduce_7(val, _values, result) def _reduce_7(val, _values, result)
result = val[1].merge(val[0]) result = val[1].merge(val[0])
result result
end end
.,., .,.,
@ -432,14 +432,14 @@ module_eval(<<'.,.,', 'namae.y', 46)
module_eval(<<'.,.,', 'namae.y', 49) module_eval(<<'.,.,', 'namae.y', 49)
def _reduce_9(val, _values, result) def _reduce_9(val, _values, result)
result = Name.new(:appellation => val[0]) result = Name.new(:appellation => val[0])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'namae.y', 50) module_eval(<<'.,.,', 'namae.y', 50)
def _reduce_10(val, _values, result) def _reduce_10(val, _values, result)
result = Name.new(:title => val[0]) result = Name.new(:title => val[0])
result result
end end
.,., .,.,
@ -448,7 +448,7 @@ module_eval(<<'.,.,', 'namae.y', 54)
def _reduce_11(val, _values, result) def _reduce_11(val, _values, result)
result = Name.new(:given => val[0], :family => val[1], result = Name.new(:given => val[0], :family => val[1],
:suffix => val[2], :title => val[3]) :suffix => val[2], :title => val[3])
result result
end end
.,., .,.,
@ -457,7 +457,7 @@ module_eval(<<'.,.,', 'namae.y', 59)
def _reduce_12(val, _values, result) def _reduce_12(val, _values, result)
result = Name.new(:given => val[0], :nick => val[1], result = Name.new(:given => val[0], :nick => val[1],
:family => val[2], :suffix => val[3], :title => val[4]) :family => val[2], :suffix => val[3], :title => val[4])
result result
end end
.,., .,.,
@ -467,7 +467,7 @@ module_eval(<<'.,.,', 'namae.y', 64)
result = Name.new(:given => val[0], :nick => val[1], result = Name.new(:given => val[0], :nick => val[1],
:particle => val[2], :family => val[3], :particle => val[2], :family => val[3],
:suffix => val[4], :title => val[5]) :suffix => val[4], :title => val[5])
result result
end end
.,., .,.,
@ -476,7 +476,7 @@ module_eval(<<'.,.,', 'namae.y', 70)
def _reduce_14(val, _values, result) def _reduce_14(val, _values, result)
result = Name.new(:given => val[0], :particle => val[1], result = Name.new(:given => val[0], :particle => val[1],
:family => val[2]) :family => val[2])
result result
end end
.,., .,.,
@ -484,7 +484,7 @@ module_eval(<<'.,.,', 'namae.y', 70)
module_eval(<<'.,.,', 'namae.y', 75) module_eval(<<'.,.,', 'namae.y', 75)
def _reduce_15(val, _values, result) def _reduce_15(val, _values, result)
result = Name.new(:particle => val[0], :family => val[1]) result = Name.new(:particle => val[0], :family => val[1])
result result
end end
.,., .,.,
@ -493,7 +493,7 @@ module_eval(<<'.,.,', 'namae.y', 80)
def _reduce_16(val, _values, result) def _reduce_16(val, _values, result)
result = Name.new({ :family => val[0], :suffix => val[2][0], result = Name.new({ :family => val[0], :suffix => val[2][0],
:given => val[2][1] }, !!val[2][0]) :given => val[2][1] }, !!val[2][0])
result result
end end
.,., .,.,
@ -502,7 +502,7 @@ module_eval(<<'.,.,', 'namae.y', 85)
def _reduce_17(val, _values, result) def _reduce_17(val, _values, result)
result = Name.new({ :particle => val[0], :family => val[1], result = Name.new({ :particle => val[0], :family => val[1],
:suffix => val[3][0], :given => val[3][1] }, !!val[3][0]) :suffix => val[3][0], :given => val[3][1] }, !!val[3][0])
result result
end end
.,., .,.,
@ -511,7 +511,7 @@ module_eval(<<'.,.,', 'namae.y', 90)
def _reduce_18(val, _values, result) def _reduce_18(val, _values, result)
result = Name.new({ :particle => val[0,2].join(' '), :family => val[2], result = Name.new({ :particle => val[0,2].join(' '), :family => val[2],
:suffix => val[4][0], :given => val[4][1] }, !!val[4][0]) :suffix => val[4][0], :given => val[4][1] }, !!val[4][0])
result result
end end
.,., .,.,
@ -520,14 +520,14 @@ module_eval(<<'.,.,', 'namae.y', 90)
module_eval(<<'.,.,', 'namae.y', 96) module_eval(<<'.,.,', 'namae.y', 96)
def _reduce_20(val, _values, result) def _reduce_20(val, _values, result)
result = val.join(' ') result = val.join(' ')
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'namae.y', 97) module_eval(<<'.,.,', 'namae.y', 97)
def _reduce_21(val, _values, result) def _reduce_21(val, _values, result)
result = val.join(' ') result = val.join(' ')
result result
end end
.,., .,.,
@ -538,28 +538,28 @@ module_eval(<<'.,.,', 'namae.y', 97)
module_eval(<<'.,.,', 'namae.y', 101) module_eval(<<'.,.,', 'namae.y', 101)
def _reduce_24(val, _values, result) def _reduce_24(val, _values, result)
result = [nil,val[0]] result = [nil,val[0]]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'namae.y', 102) module_eval(<<'.,.,', 'namae.y', 102)
def _reduce_25(val, _values, result) def _reduce_25(val, _values, result)
result = [val[2],val[0]] result = [val[2],val[0]]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'namae.y', 103) module_eval(<<'.,.,', 'namae.y', 103)
def _reduce_26(val, _values, result) def _reduce_26(val, _values, result)
result = [val[0],nil] result = [val[0],nil]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'namae.y', 104) module_eval(<<'.,.,', 'namae.y', 104)
def _reduce_27(val, _values, result) def _reduce_27(val, _values, result)
result = [val[0],val[2]] result = [val[0],val[2]]
result result
end end
.,., .,.,
@ -568,7 +568,7 @@ module_eval(<<'.,.,', 'namae.y', 104)
module_eval(<<'.,.,', 'namae.y', 107) module_eval(<<'.,.,', 'namae.y', 107)
def _reduce_29(val, _values, result) def _reduce_29(val, _values, result)
result = val.join(' ') result = val.join(' ')
result result
end end
.,., .,.,
@ -581,7 +581,7 @@ module_eval(<<'.,.,', 'namae.y', 107)
module_eval(<<'.,.,', 'namae.y', 112) module_eval(<<'.,.,', 'namae.y', 112)
def _reduce_33(val, _values, result) def _reduce_33(val, _values, result)
result = val.join(' ') result = val.join(' ')
result result
end end
.,., .,.,
@ -608,7 +608,7 @@ module_eval(<<'.,.,', 'namae.y', 112)
module_eval(<<'.,.,', 'namae.y', 122) module_eval(<<'.,.,', 'namae.y', 122)
def _reduce_44(val, _values, result) def _reduce_44(val, _values, result)
result = val.join(' ') result = val.join(' ')
result result
end end
.,., .,.,
@ -621,7 +621,7 @@ module_eval(<<'.,.,', 'namae.y', 122)
module_eval(<<'.,.,', 'namae.y', 127) module_eval(<<'.,.,', 'namae.y', 127)
def _reduce_48(val, _values, result) def _reduce_48(val, _values, result)
result = val.join(' ') result = val.join(' ')
result result
end end
.,., .,.,
@ -631,4 +631,4 @@ def _reduce_none(val, _values, result)
end end
end # class Parser end # class Parser
end # module Namae end # module Namae

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.4.14 # This file is automatically generated by Racc 1.4.16.pre.1
# from Racc grammer file "". # from Racc grammer file "".
# #
@ -315,56 +315,56 @@ Racc_debug_parser = false
module_eval(<<'.,.,', 'nokogiri-css.y', 9) module_eval(<<'.,.,', 'nokogiri-css.y', 9)
def _reduce_1(val, _values, result) def _reduce_1(val, _values, result)
result = [val.first, val.last].flatten result = [val.first, val.last].flatten
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'nokogiri-css.y', 11) module_eval(<<'.,.,', 'nokogiri-css.y', 11)
def _reduce_2(val, _values, result) def _reduce_2(val, _values, result)
result = val.flatten result = val.flatten
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'nokogiri-css.y', 12) module_eval(<<'.,.,', 'nokogiri-css.y', 12)
def _reduce_3(val, _values, result) def _reduce_3(val, _values, result)
result = [val.last].flatten result = [val.last].flatten
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'nokogiri-css.y', 15) module_eval(<<'.,.,', 'nokogiri-css.y', 15)
def _reduce_4(val, _values, result) def _reduce_4(val, _values, result)
result = :DIRECT_ADJACENT_SELECTOR result = :DIRECT_ADJACENT_SELECTOR
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'nokogiri-css.y', 16) module_eval(<<'.,.,', 'nokogiri-css.y', 16)
def _reduce_5(val, _values, result) def _reduce_5(val, _values, result)
result = :CHILD_SELECTOR result = :CHILD_SELECTOR
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'nokogiri-css.y', 17) module_eval(<<'.,.,', 'nokogiri-css.y', 17)
def _reduce_6(val, _values, result) def _reduce_6(val, _values, result)
result = :FOLLOWING_SELECTOR result = :FOLLOWING_SELECTOR
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'nokogiri-css.y', 18) module_eval(<<'.,.,', 'nokogiri-css.y', 18)
def _reduce_7(val, _values, result) def _reduce_7(val, _values, result)
result = :DESCENDANT_SELECTOR result = :DESCENDANT_SELECTOR
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'nokogiri-css.y', 19) module_eval(<<'.,.,', 'nokogiri-css.y', 19)
def _reduce_8(val, _values, result) def _reduce_8(val, _values, result)
result = :CHILD_SELECTOR result = :CHILD_SELECTOR
result result
end end
.,., .,.,
@ -376,7 +376,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 23)
else else
Node.new(:CONDITIONAL_SELECTOR, [val.first, val[1]]) Node.new(:CONDITIONAL_SELECTOR, [val.first, val[1]])
end end
result result
end end
.,., .,.,
@ -386,7 +386,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 23)
module_eval(<<'.,.,', 'nokogiri-css.y', 31) module_eval(<<'.,.,', 'nokogiri-css.y', 31)
def _reduce_11(val, _values, result) def _reduce_11(val, _values, result)
result = Node.new(:CONDITIONAL_SELECTOR, val) result = Node.new(:CONDITIONAL_SELECTOR, val)
result result
end end
.,., .,.,
@ -394,7 +394,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 31)
module_eval(<<'.,.,', 'nokogiri-css.y', 34) module_eval(<<'.,.,', 'nokogiri-css.y', 34)
def _reduce_12(val, _values, result) def _reduce_12(val, _values, result)
result = Node.new(:CONDITIONAL_SELECTOR, val) result = Node.new(:CONDITIONAL_SELECTOR, val)
result result
end end
.,., .,.,
@ -404,7 +404,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 37)
result = Node.new(:CONDITIONAL_SELECTOR, result = Node.new(:CONDITIONAL_SELECTOR,
[Node.new(:ELEMENT_NAME, ['*']), val.first] [Node.new(:ELEMENT_NAME, ['*']), val.first]
) )
result result
end end
.,., .,.,
@ -412,7 +412,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 37)
module_eval(<<'.,.,', 'nokogiri-css.y', 44) module_eval(<<'.,.,', 'nokogiri-css.y', 44)
def _reduce_14(val, _values, result) def _reduce_14(val, _values, result)
result = Node.new(val.first, [nil, val.last]) result = Node.new(val.first, [nil, val.last])
result result
end end
.,., .,.,
@ -420,7 +420,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 44)
module_eval(<<'.,.,', 'nokogiri-css.y', 49) module_eval(<<'.,.,', 'nokogiri-css.y', 49)
def _reduce_15(val, _values, result) def _reduce_15(val, _values, result)
result = Node.new(val[1], [val.first, val.last]) result = Node.new(val[1], [val.first, val.last])
result result
end end
.,., .,.,
@ -428,7 +428,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 49)
module_eval(<<'.,.,', 'nokogiri-css.y', 52) module_eval(<<'.,.,', 'nokogiri-css.y', 52)
def _reduce_16(val, _values, result) def _reduce_16(val, _values, result)
result = Node.new(:DESCENDANT_SELECTOR, [val.first, val.last]) result = Node.new(:DESCENDANT_SELECTOR, [val.first, val.last])
result result
end end
.,., .,.,
@ -437,7 +437,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 52)
module_eval(<<'.,.,', 'nokogiri-css.y', 57) module_eval(<<'.,.,', 'nokogiri-css.y', 57)
def _reduce_18(val, _values, result) def _reduce_18(val, _values, result)
result = Node.new(:CLASS_CONDITION, [val[1]]) result = Node.new(:CLASS_CONDITION, [val[1]])
result result
end end
.,., .,.,
@ -446,7 +446,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 57)
module_eval(<<'.,.,', 'nokogiri-css.y', 61) module_eval(<<'.,.,', 'nokogiri-css.y', 61)
def _reduce_20(val, _values, result) def _reduce_20(val, _values, result)
result = Node.new(:ELEMENT_NAME, val) result = Node.new(:ELEMENT_NAME, val)
result result
end end
.,., .,.,
@ -456,7 +456,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 65)
result = Node.new(:ELEMENT_NAME, result = Node.new(:ELEMENT_NAME,
[[val.first, val.last].compact.join(':')] [[val.first, val.last].compact.join(':')]
) )
result result
end end
.,., .,.,
@ -465,14 +465,14 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 70)
def _reduce_22(val, _values, result) def _reduce_22(val, _values, result)
name = @namespaces.key?('xmlns') ? "xmlns:#{val.first}" : val.first name = @namespaces.key?('xmlns') ? "xmlns:#{val.first}" : val.first
result = Node.new(:ELEMENT_NAME, [name]) result = Node.new(:ELEMENT_NAME, [name])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'nokogiri-css.y', 75) module_eval(<<'.,.,', 'nokogiri-css.y', 75)
def _reduce_23(val, _values, result) def _reduce_23(val, _values, result)
result = val[0] result = val[0]
result result
end end
.,., .,.,
@ -484,7 +484,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 80)
result = Node.new(:ATTRIBUTE_CONDITION, result = Node.new(:ATTRIBUTE_CONDITION,
[val[1]] + (val[2] || []) [val[1]] + (val[2] || [])
) )
result result
end end
.,., .,.,
@ -494,7 +494,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 85)
result = Node.new(:ATTRIBUTE_CONDITION, result = Node.new(:ATTRIBUTE_CONDITION,
[val[1]] + (val[2] || []) [val[1]] + (val[2] || [])
) )
result result
end end
.,., .,.,
@ -505,7 +505,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 90)
result = Node.new(:PSEUDO_CLASS, result = Node.new(:PSEUDO_CLASS,
[Node.new(:FUNCTION, ['nth-child(', val[1]])] [Node.new(:FUNCTION, ['nth-child(', val[1]])]
) )
result result
end end
.,., .,.,
@ -515,7 +515,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 98)
result = Node.new(:ELEMENT_NAME, result = Node.new(:ELEMENT_NAME,
[[val.first, val.last].compact.join(':')] [[val.first, val.last].compact.join(':')]
) )
result result
end end
.,., .,.,
@ -525,7 +525,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 103)
# Default namespace is not applied to attributes. # Default namespace is not applied to attributes.
# So we don't add prefix "xmlns:" as in namespaced_ident. # So we don't add prefix "xmlns:" as in namespaced_ident.
result = Node.new(:ELEMENT_NAME, [val.first]) result = Node.new(:ELEMENT_NAME, [val.first])
result result
end end
.,., .,.,
@ -533,7 +533,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 103)
module_eval(<<'.,.,', 'nokogiri-css.y', 110) module_eval(<<'.,.,', 'nokogiri-css.y', 110)
def _reduce_30(val, _values, result) def _reduce_30(val, _values, result)
result = Node.new(:FUNCTION, [val.first.strip]) result = Node.new(:FUNCTION, [val.first.strip])
result result
end end
.,., .,.,
@ -541,7 +541,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 110)
module_eval(<<'.,.,', 'nokogiri-css.y', 113) module_eval(<<'.,.,', 'nokogiri-css.y', 113)
def _reduce_31(val, _values, result) def _reduce_31(val, _values, result)
result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten)
result result
end end
.,., .,.,
@ -549,7 +549,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 113)
module_eval(<<'.,.,', 'nokogiri-css.y', 116) module_eval(<<'.,.,', 'nokogiri-css.y', 116)
def _reduce_32(val, _values, result) def _reduce_32(val, _values, result)
result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten)
result result
end end
.,., .,.,
@ -557,7 +557,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 116)
module_eval(<<'.,.,', 'nokogiri-css.y', 119) module_eval(<<'.,.,', 'nokogiri-css.y', 119)
def _reduce_33(val, _values, result) def _reduce_33(val, _values, result)
result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten)
result result
end end
.,., .,.,
@ -565,28 +565,28 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 119)
module_eval(<<'.,.,', 'nokogiri-css.y', 122) module_eval(<<'.,.,', 'nokogiri-css.y', 122)
def _reduce_34(val, _values, result) def _reduce_34(val, _values, result)
result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'nokogiri-css.y', 126) module_eval(<<'.,.,', 'nokogiri-css.y', 126)
def _reduce_35(val, _values, result) def _reduce_35(val, _values, result)
result = [val.first, val.last] result = [val.first, val.last]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'nokogiri-css.y', 127) module_eval(<<'.,.,', 'nokogiri-css.y', 127)
def _reduce_36(val, _values, result) def _reduce_36(val, _values, result)
result = [val.first, val.last] result = [val.first, val.last]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'nokogiri-css.y', 128) module_eval(<<'.,.,', 'nokogiri-css.y', 128)
def _reduce_37(val, _values, result) def _reduce_37(val, _values, result)
result = [val.first, val.last] result = [val.first, val.last]
result result
end end
.,., .,.,
@ -611,7 +611,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 133)
# assert_xpath("//a[foo(., a, 10)]", @parser.parse('a:foo(a, 10)')) # assert_xpath("//a[foo(., a, 10)]", @parser.parse('a:foo(a, 10)'))
result = val result = val
end end
result result
end end
.,., .,.,
@ -623,7 +623,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 152)
else else
raise Racc::ParseError, "parse error on IDENT '#{val[1]}'" raise Racc::ParseError, "parse error on IDENT '#{val[1]}'"
end end
result result
end end
.,., .,.,
@ -641,7 +641,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 158)
else else
raise Racc::ParseError, "parse error on IDENT '#{val[1]}'" raise Racc::ParseError, "parse error on IDENT '#{val[1]}'"
end end
result result
end end
.,., .,.,
@ -663,7 +663,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 170)
else else
raise Racc::ParseError, "parse error on IDENT '#{val[1]}'" raise Racc::ParseError, "parse error on IDENT '#{val[1]}'"
end end
result result
end end
.,., .,.,
@ -671,14 +671,14 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 170)
module_eval(<<'.,.,', 'nokogiri-css.y', 189) module_eval(<<'.,.,', 'nokogiri-css.y', 189)
def _reduce_44(val, _values, result) def _reduce_44(val, _values, result)
result = Node.new(:PSEUDO_CLASS, [val[1]]) result = Node.new(:PSEUDO_CLASS, [val[1]])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'nokogiri-css.y', 191) module_eval(<<'.,.,', 'nokogiri-css.y', 191)
def _reduce_45(val, _values, result) def _reduce_45(val, _values, result)
result = Node.new(:PSEUDO_CLASS, [val[1]]) result = Node.new(:PSEUDO_CLASS, [val[1]])
result result
end end
.,., .,.,
@ -690,7 +690,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 191)
module_eval(<<'.,.,', 'nokogiri-css.y', 199) module_eval(<<'.,.,', 'nokogiri-css.y', 199)
def _reduce_48(val, _values, result) def _reduce_48(val, _values, result)
result = Node.new(:COMBINATOR, val) result = Node.new(:COMBINATOR, val)
result result
end end
.,., .,.,
@ -698,7 +698,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 199)
module_eval(<<'.,.,', 'nokogiri-css.y', 202) module_eval(<<'.,.,', 'nokogiri-css.y', 202)
def _reduce_49(val, _values, result) def _reduce_49(val, _values, result)
result = Node.new(:COMBINATOR, val) result = Node.new(:COMBINATOR, val)
result result
end end
.,., .,.,
@ -706,7 +706,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 202)
module_eval(<<'.,.,', 'nokogiri-css.y', 205) module_eval(<<'.,.,', 'nokogiri-css.y', 205)
def _reduce_50(val, _values, result) def _reduce_50(val, _values, result)
result = Node.new(:COMBINATOR, val) result = Node.new(:COMBINATOR, val)
result result
end end
.,., .,.,
@ -714,7 +714,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 205)
module_eval(<<'.,.,', 'nokogiri-css.y', 208) module_eval(<<'.,.,', 'nokogiri-css.y', 208)
def _reduce_51(val, _values, result) def _reduce_51(val, _values, result)
result = Node.new(:COMBINATOR, val) result = Node.new(:COMBINATOR, val)
result result
end end
.,., .,.,
@ -722,7 +722,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 208)
module_eval(<<'.,.,', 'nokogiri-css.y', 211) module_eval(<<'.,.,', 'nokogiri-css.y', 211)
def _reduce_52(val, _values, result) def _reduce_52(val, _values, result)
result = Node.new(:COMBINATOR, val) result = Node.new(:COMBINATOR, val)
result result
end end
.,., .,.,
@ -739,21 +739,21 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 211)
module_eval(<<'.,.,', 'nokogiri-css.y', 220) module_eval(<<'.,.,', 'nokogiri-css.y', 220)
def _reduce_58(val, _values, result) def _reduce_58(val, _values, result)
result = Node.new(:ID, val) result = Node.new(:ID, val)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'nokogiri-css.y', 223) module_eval(<<'.,.,', 'nokogiri-css.y', 223)
def _reduce_59(val, _values, result) def _reduce_59(val, _values, result)
result = [val.first, val[1]] result = [val.first, val[1]]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'nokogiri-css.y', 224) module_eval(<<'.,.,', 'nokogiri-css.y', 224)
def _reduce_60(val, _values, result) def _reduce_60(val, _values, result)
result = [val.first, val[1]] result = [val.first, val[1]]
result result
end end
.,., .,.,
@ -762,49 +762,49 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 224)
module_eval(<<'.,.,', 'nokogiri-css.y', 228) module_eval(<<'.,.,', 'nokogiri-css.y', 228)
def _reduce_62(val, _values, result) def _reduce_62(val, _values, result)
result = :equal result = :equal
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'nokogiri-css.y', 229) module_eval(<<'.,.,', 'nokogiri-css.y', 229)
def _reduce_63(val, _values, result) def _reduce_63(val, _values, result)
result = :prefix_match result = :prefix_match
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'nokogiri-css.y', 230) module_eval(<<'.,.,', 'nokogiri-css.y', 230)
def _reduce_64(val, _values, result) def _reduce_64(val, _values, result)
result = :suffix_match result = :suffix_match
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'nokogiri-css.y', 231) module_eval(<<'.,.,', 'nokogiri-css.y', 231)
def _reduce_65(val, _values, result) def _reduce_65(val, _values, result)
result = :substring_match result = :substring_match
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'nokogiri-css.y', 232) module_eval(<<'.,.,', 'nokogiri-css.y', 232)
def _reduce_66(val, _values, result) def _reduce_66(val, _values, result)
result = :not_equal result = :not_equal
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'nokogiri-css.y', 233) module_eval(<<'.,.,', 'nokogiri-css.y', 233)
def _reduce_67(val, _values, result) def _reduce_67(val, _values, result)
result = :includes result = :includes
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'nokogiri-css.y', 234) module_eval(<<'.,.,', 'nokogiri-css.y', 234)
def _reduce_68(val, _values, result) def _reduce_68(val, _values, result)
result = :dash_match result = :dash_match
result result
end end
.,., .,.,
@ -812,7 +812,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 234)
module_eval(<<'.,.,', 'nokogiri-css.y', 238) module_eval(<<'.,.,', 'nokogiri-css.y', 238)
def _reduce_69(val, _values, result) def _reduce_69(val, _values, result)
result = Node.new(:NOT, [val[1]]) result = Node.new(:NOT, [val[1]])
result result
end end
.,., .,.,
@ -832,5 +832,5 @@ def _reduce_none(val, _values, result)
end end
end # class Parser end # class Parser
end # module CSS end # module CSS
end # module Nokogiri end # module Nokogiri

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.4.14 # This file is automatically generated by Racc 1.4.16.pre.1
# from Racc grammer file "". # from Racc grammer file "".
# #
@ -181,84 +181,84 @@ Racc_debug_parser = false
module_eval(<<'.,.,', 'php_serialization.y', 6) module_eval(<<'.,.,', 'php_serialization.y', 6)
def _reduce_1(val, _values, result) def _reduce_1(val, _values, result)
@object = val[0] @object = val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'php_serialization.y', 7) module_eval(<<'.,.,', 'php_serialization.y', 7)
def _reduce_2(val, _values, result) def _reduce_2(val, _values, result)
@object = val[0] @object = val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'php_serialization.y', 8) module_eval(<<'.,.,', 'php_serialization.y', 8)
def _reduce_3(val, _values, result) def _reduce_3(val, _values, result)
@object = val[0] @object = val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'php_serialization.y', 9) module_eval(<<'.,.,', 'php_serialization.y', 9)
def _reduce_4(val, _values, result) def _reduce_4(val, _values, result)
@object = val[0] @object = val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'php_serialization.y', 10) module_eval(<<'.,.,', 'php_serialization.y', 10)
def _reduce_5(val, _values, result) def _reduce_5(val, _values, result)
@object = val[0] @object = val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'php_serialization.y', 11) module_eval(<<'.,.,', 'php_serialization.y', 11)
def _reduce_6(val, _values, result) def _reduce_6(val, _values, result)
@object = val[0] @object = val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'php_serialization.y', 12) module_eval(<<'.,.,', 'php_serialization.y', 12)
def _reduce_7(val, _values, result) def _reduce_7(val, _values, result)
@object = val[0] @object = val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'php_serialization.y', 15) module_eval(<<'.,.,', 'php_serialization.y', 15)
def _reduce_8(val, _values, result) def _reduce_8(val, _values, result)
result = nil result = nil
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'php_serialization.y', 18) module_eval(<<'.,.,', 'php_serialization.y', 18)
def _reduce_9(val, _values, result) def _reduce_9(val, _values, result)
result = Integer(val[2]) > 0 result = Integer(val[2]) > 0
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'php_serialization.y', 21) module_eval(<<'.,.,', 'php_serialization.y', 21)
def _reduce_10(val, _values, result) def _reduce_10(val, _values, result)
result = Integer(val[2]) result = Integer(val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'php_serialization.y', 24) module_eval(<<'.,.,', 'php_serialization.y', 24)
def _reduce_11(val, _values, result) def _reduce_11(val, _values, result)
result = Float(val[2]) result = Float(val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'php_serialization.y', 27) module_eval(<<'.,.,', 'php_serialization.y', 27)
def _reduce_12(val, _values, result) def _reduce_12(val, _values, result)
result = val[4] result = val[4]
result result
end end
.,., .,.,
@ -286,28 +286,28 @@ module_eval(<<'.,.,', 'php_serialization.y', 32)
result = Struct.new(klass_name, *attr_names).new(*values) result = Struct.new(klass_name, *attr_names).new(*values)
result.instance_variable_set("@_php_class", klass_name) result.instance_variable_set("@_php_class", klass_name)
end end
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'php_serialization.y', 56) module_eval(<<'.,.,', 'php_serialization.y', 56)
def _reduce_14(val, _values, result) def _reduce_14(val, _values, result)
result = val[0] << val[1] result = val[0] << val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'php_serialization.y', 57) module_eval(<<'.,.,', 'php_serialization.y', 57)
def _reduce_15(val, _values, result) def _reduce_15(val, _values, result)
result = [] result = []
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'php_serialization.y', 60) module_eval(<<'.,.,', 'php_serialization.y', 60)
def _reduce_16(val, _values, result) def _reduce_16(val, _values, result)
result = val result = val
result result
end end
.,., .,.,
@ -323,7 +323,7 @@ module_eval(<<'.,.,', 'php_serialization.y', 65)
else else
result = Hash[val[5]] result = Hash[val[5]]
end end
result result
end end
.,., .,.,
@ -333,4 +333,4 @@ def _reduce_none(val, _values, result)
end end
end # class Unserializer end # class Unserializer
end # module PhpSerialization end # module PhpSerialization

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.4.14 # This file is automatically generated by Racc 1.4.16.pre.1
# from Racc grammer file "". # from Racc grammer file "".
# #
@ -882,7 +882,7 @@ Racc_debug_parser = false
module_eval(<<'.,.,', 'tp_plus.y', 35) module_eval(<<'.,.,', 'tp_plus.y', 35)
def _reduce_1(val, _values, result) def _reduce_1(val, _values, result)
@interpreter.nodes = val[0] @interpreter.nodes = val[0]
result result
end end
.,., .,.,
@ -893,7 +893,7 @@ module_eval(<<'.,.,', 'tp_plus.y', 42)
def _reduce_3(val, _values, result) def _reduce_3(val, _values, result)
result = [val[0]] result = [val[0]]
result << val[1] unless val[1].nil? result << val[1] unless val[1].nil?
result result
end end
.,., .,.,
@ -902,14 +902,14 @@ module_eval(<<'.,.,', 'tp_plus.y', 46)
def _reduce_4(val, _values, result) def _reduce_4(val, _values, result)
result = val[0] << val[1] result = val[0] << val[1]
result << val[2] unless val[2].nil? result << val[2] unless val[2].nil?
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 52) module_eval(<<'.,.,', 'tp_plus.y', 52)
def _reduce_5(val, _values, result) def _reduce_5(val, _values, result)
result = val[1] result = val[1]
result result
end end
.,., .,.,
@ -960,28 +960,28 @@ module_eval(<<'.,.,', 'tp_plus.y', 52)
module_eval(<<'.,.,', 'tp_plus.y', 85) module_eval(<<'.,.,', 'tp_plus.y', 85)
def _reduce_28(val, _values, result) def _reduce_28(val, _values, result)
result = PauseNode.new result = PauseNode.new
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 86) module_eval(<<'.,.,', 'tp_plus.y', 86)
def _reduce_29(val, _values, result) def _reduce_29(val, _values, result)
result = AbortNode.new result = AbortNode.new
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 90) module_eval(<<'.,.,', 'tp_plus.y', 90)
def _reduce_30(val, _values, result) def _reduce_30(val, _values, result)
result = EmptyStmtNode.new() result = EmptyStmtNode.new()
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 94) module_eval(<<'.,.,', 'tp_plus.y', 94)
def _reduce_31(val, _values, result) def _reduce_31(val, _values, result)
result = HeaderNode.new(val[0],val[2]) result = HeaderNode.new(val[0],val[2])
result result
end end
.,., .,.,
@ -992,49 +992,49 @@ module_eval(<<'.,.,', 'tp_plus.y', 94)
module_eval(<<'.,.,', 'tp_plus.y', 103) module_eval(<<'.,.,', 'tp_plus.y', 103)
def _reduce_34(val, _values, result) def _reduce_34(val, _values, result)
result = RaiseNode.new(val[1]) result = RaiseNode.new(val[1])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 107) module_eval(<<'.,.,', 'tp_plus.y', 107)
def _reduce_35(val, _values, result) def _reduce_35(val, _values, result)
result = TimerMethodNode.new(val[0],val[1]) result = TimerMethodNode.new(val[0],val[1])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 111) module_eval(<<'.,.,', 'tp_plus.y', 111)
def _reduce_36(val, _values, result) def _reduce_36(val, _values, result)
result = EvalNode.new(val[1]) result = EvalNode.new(val[1])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 116) module_eval(<<'.,.,', 'tp_plus.y', 116)
def _reduce_37(val, _values, result) def _reduce_37(val, _values, result)
result = WaitForNode.new(val[2], val[4]) result = WaitForNode.new(val[2], val[4])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 118) module_eval(<<'.,.,', 'tp_plus.y', 118)
def _reduce_38(val, _values, result) def _reduce_38(val, _values, result)
result = WaitUntilNode.new(val[2], nil) result = WaitUntilNode.new(val[2], nil)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 120) module_eval(<<'.,.,', 'tp_plus.y', 120)
def _reduce_39(val, _values, result) def _reduce_39(val, _values, result)
result = WaitUntilNode.new(val[2],val[5]) result = WaitUntilNode.new(val[2],val[5])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 122) module_eval(<<'.,.,', 'tp_plus.y', 122)
def _reduce_40(val, _values, result) def _reduce_40(val, _values, result)
result = WaitUntilNode.new(val[2],val[5].merge(val[7])) result = WaitUntilNode.new(val[2],val[5].merge(val[7]))
result result
end end
.,., .,.,
@ -1045,70 +1045,70 @@ module_eval(<<'.,.,', 'tp_plus.y', 122)
module_eval(<<'.,.,', 'tp_plus.y', 132) module_eval(<<'.,.,', 'tp_plus.y', 132)
def _reduce_43(val, _values, result) def _reduce_43(val, _values, result)
result = { label: val[3] } result = { label: val[3] }
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 137) module_eval(<<'.,.,', 'tp_plus.y', 137)
def _reduce_44(val, _values, result) def _reduce_44(val, _values, result)
result = { timeout: [val[3],val[5]] } result = { timeout: [val[3],val[5]] }
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 141) module_eval(<<'.,.,', 'tp_plus.y', 141)
def _reduce_45(val, _values, result) def _reduce_45(val, _values, result)
result = val[0] result = val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 145) module_eval(<<'.,.,', 'tp_plus.y', 145)
def _reduce_46(val, _values, result) def _reduce_46(val, _values, result)
result = UseNode.new(val[0],val[1]) result = UseNode.new(val[0],val[1])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 150) module_eval(<<'.,.,', 'tp_plus.y', 150)
def _reduce_47(val, _values, result) def _reduce_47(val, _values, result)
result = SetSkipNode.new(val[1]) result = SetSkipNode.new(val[1])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 154) module_eval(<<'.,.,', 'tp_plus.y', 154)
def _reduce_48(val, _values, result) def _reduce_48(val, _values, result)
result = CallNode.new(val[0],val[2]) result = CallNode.new(val[0],val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 155) module_eval(<<'.,.,', 'tp_plus.y', 155)
def _reduce_49(val, _values, result) def _reduce_49(val, _values, result)
result = CallNode.new(val[1],val[3],async: true) result = CallNode.new(val[1],val[3],async: true)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 159) module_eval(<<'.,.,', 'tp_plus.y', 159)
def _reduce_50(val, _values, result) def _reduce_50(val, _values, result)
result = [val[0]] result = [val[0]]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 160) module_eval(<<'.,.,', 'tp_plus.y', 160)
def _reduce_51(val, _values, result) def _reduce_51(val, _values, result)
result = val[0] << val[2] result = val[0] << val[2]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 161) module_eval(<<'.,.,', 'tp_plus.y', 161)
def _reduce_52(val, _values, result) def _reduce_52(val, _values, result)
result = [] result = []
result result
end end
.,., .,.,
@ -1123,28 +1123,28 @@ module_eval(<<'.,.,', 'tp_plus.y', 161)
module_eval(<<'.,.,', 'tp_plus.y', 172) module_eval(<<'.,.,', 'tp_plus.y', 172)
def _reduce_57(val, _values, result) def _reduce_57(val, _values, result)
result = StringNode.new(val[0]) result = StringNode.new(val[0])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 176) module_eval(<<'.,.,', 'tp_plus.y', 176)
def _reduce_58(val, _values, result) def _reduce_58(val, _values, result)
result = IOMethodNode.new(val[0],val[1]) result = IOMethodNode.new(val[0],val[1])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 178) module_eval(<<'.,.,', 'tp_plus.y', 178)
def _reduce_59(val, _values, result) def _reduce_59(val, _values, result)
result = IOMethodNode.new(val[0],val[2]) result = IOMethodNode.new(val[0],val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 180) module_eval(<<'.,.,', 'tp_plus.y', 180)
def _reduce_60(val, _values, result) def _reduce_60(val, _values, result)
result = IOMethodNode.new(val[0],val[2],{ pulse_time: val[4], pulse_units: val[6] }) result = IOMethodNode.new(val[0],val[2],{ pulse_time: val[4], pulse_units: val[6] })
result result
end end
.,., .,.,
@ -1155,35 +1155,35 @@ module_eval(<<'.,.,', 'tp_plus.y', 180)
module_eval(<<'.,.,', 'tp_plus.y', 190) module_eval(<<'.,.,', 'tp_plus.y', 190)
def _reduce_63(val, _values, result) def _reduce_63(val, _values, result)
result = JumpNode.new(val[1]) result = JumpNode.new(val[1])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 195) module_eval(<<'.,.,', 'tp_plus.y', 195)
def _reduce_64(val, _values, result) def _reduce_64(val, _values, result)
result = ConditionalNode.new("if",val[1],val[2],val[3]) result = ConditionalNode.new("if",val[1],val[2],val[3])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 197) module_eval(<<'.,.,', 'tp_plus.y', 197)
def _reduce_65(val, _values, result) def _reduce_65(val, _values, result)
result = ConditionalNode.new("unless",val[1],val[2],val[3]) result = ConditionalNode.new("unless",val[1],val[2],val[3])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 202) module_eval(<<'.,.,', 'tp_plus.y', 202)
def _reduce_66(val, _values, result) def _reduce_66(val, _values, result)
result = ForNode.new(val[1],val[4],val[6],val[8]) result = ForNode.new(val[1],val[4],val[6],val[8])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 206) module_eval(<<'.,.,', 'tp_plus.y', 206)
def _reduce_67(val, _values, result) def _reduce_67(val, _values, result)
result = WhileNode.new(val[1],val[2]) result = WhileNode.new(val[1],val[2])
result result
end end
.,., .,.,
@ -1194,35 +1194,35 @@ module_eval(<<'.,.,', 'tp_plus.y', 206)
module_eval(<<'.,.,', 'tp_plus.y', 215) module_eval(<<'.,.,', 'tp_plus.y', 215)
def _reduce_70(val, _values, result) def _reduce_70(val, _values, result)
result = NamespaceNode.new(val[1],val[2]) result = NamespaceNode.new(val[1],val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 222) module_eval(<<'.,.,', 'tp_plus.y', 222)
def _reduce_71(val, _values, result) def _reduce_71(val, _values, result)
result = CaseNode.new(val[1],val[3],val[4]) result = CaseNode.new(val[1],val[3],val[4])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 226) module_eval(<<'.,.,', 'tp_plus.y', 226)
def _reduce_72(val, _values, result) def _reduce_72(val, _values, result)
result = val result = val
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 228) module_eval(<<'.,.,', 'tp_plus.y', 228)
def _reduce_73(val, _values, result) def _reduce_73(val, _values, result)
result = val[0] << val[1] << val[2] result = val[0] << val[1] << val[2]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 233) module_eval(<<'.,.,', 'tp_plus.y', 233)
def _reduce_74(val, _values, result) def _reduce_74(val, _values, result)
result = CaseConditionNode.new(val[1],val[3]) result = CaseConditionNode.new(val[1],val[3])
result result
end end
.,., .,.,
@ -1233,7 +1233,7 @@ module_eval(<<'.,.,', 'tp_plus.y', 233)
module_eval(<<'.,.,', 'tp_plus.y', 243) module_eval(<<'.,.,', 'tp_plus.y', 243)
def _reduce_77(val, _values, result) def _reduce_77(val, _values, result)
result = CaseConditionNode.new(nil,val[2]) result = CaseConditionNode.new(nil,val[2])
result result
end end
.,., .,.,
@ -1248,14 +1248,14 @@ module_eval(<<'.,.,', 'tp_plus.y', 243)
module_eval(<<'.,.,', 'tp_plus.y', 254) module_eval(<<'.,.,', 'tp_plus.y', 254)
def _reduce_82(val, _values, result) def _reduce_82(val, _values, result)
result = InlineConditionalNode.new(val[1], val[2], val[0]) result = InlineConditionalNode.new(val[1], val[2], val[0])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 255) module_eval(<<'.,.,', 'tp_plus.y', 255)
def _reduce_83(val, _values, result) def _reduce_83(val, _values, result)
result = InlineConditionalNode.new(val[1], val[2], val[0]) result = InlineConditionalNode.new(val[1], val[2], val[0])
result result
end end
.,., .,.,
@ -1270,70 +1270,70 @@ module_eval(<<'.,.,', 'tp_plus.y', 255)
module_eval(<<'.,.,', 'tp_plus.y', 266) module_eval(<<'.,.,', 'tp_plus.y', 266)
def _reduce_88(val, _values, result) def _reduce_88(val, _values, result)
result = val[1] result = val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 267) module_eval(<<'.,.,', 'tp_plus.y', 267)
def _reduce_89(val, _values, result) def _reduce_89(val, _values, result)
result = [] result = []
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 272) module_eval(<<'.,.,', 'tp_plus.y', 272)
def _reduce_90(val, _values, result) def _reduce_90(val, _values, result)
result = MotionNode.new(val[0],val[5],val[7]) result = MotionNode.new(val[0],val[5],val[7])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 276) module_eval(<<'.,.,', 'tp_plus.y', 276)
def _reduce_91(val, _values, result) def _reduce_91(val, _values, result)
result = val result = val
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 278) module_eval(<<'.,.,', 'tp_plus.y', 278)
def _reduce_92(val, _values, result) def _reduce_92(val, _values, result)
result = val[0] << val[1] result = val[0] << val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 283) module_eval(<<'.,.,', 'tp_plus.y', 283)
def _reduce_93(val, _values, result) def _reduce_93(val, _values, result)
result = SpeedNode.new(val[4]) result = SpeedNode.new(val[4])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 285) module_eval(<<'.,.,', 'tp_plus.y', 285)
def _reduce_94(val, _values, result) def _reduce_94(val, _values, result)
result = TerminationNode.new(val[4]) result = TerminationNode.new(val[4])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 287) module_eval(<<'.,.,', 'tp_plus.y', 287)
def _reduce_95(val, _values, result) def _reduce_95(val, _values, result)
result = OffsetNode.new(val[2],val[4]) result = OffsetNode.new(val[2],val[4])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 289) module_eval(<<'.,.,', 'tp_plus.y', 289)
def _reduce_96(val, _values, result) def _reduce_96(val, _values, result)
result = TimeNode.new(val[2],val[4],val[6]) result = TimeNode.new(val[2],val[4],val[6])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 291) module_eval(<<'.,.,', 'tp_plus.y', 291)
def _reduce_97(val, _values, result) def _reduce_97(val, _values, result)
result = SkipNode.new(val[4],val[5]) result = SkipNode.new(val[4],val[5])
result result
end end
.,., .,.,
@ -1347,14 +1347,14 @@ module_eval(<<'.,.,', 'tp_plus.y', 298)
raise Racc::ParseError, sprintf("\ninvalid termination type: (%s)", val[1]) if val[1] != 1 raise Racc::ParseError, sprintf("\ninvalid termination type: (%s)", val[1]) if val[1] != 1
result = DigitNode.new(val[1].to_i * -1) result = DigitNode.new(val[1].to_i * -1)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 305) module_eval(<<'.,.,', 'tp_plus.y', 305)
def _reduce_101(val, _values, result) def _reduce_101(val, _values, result)
result = val[1] result = val[1]
result result
end end
.,., .,.,
@ -1375,35 +1375,35 @@ module_eval(<<'.,.,', 'tp_plus.y', 305)
module_eval(<<'.,.,', 'tp_plus.y', 325) module_eval(<<'.,.,', 'tp_plus.y', 325)
def _reduce_109(val, _values, result) def _reduce_109(val, _values, result)
result = { speed: val[0], units: val[2] } result = { speed: val[0], units: val[2] }
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 326) module_eval(<<'.,.,', 'tp_plus.y', 326)
def _reduce_110(val, _values, result) def _reduce_110(val, _values, result)
result = { speed: val[0], units: nil } result = { speed: val[0], units: nil }
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 330) module_eval(<<'.,.,', 'tp_plus.y', 330)
def _reduce_111(val, _values, result) def _reduce_111(val, _values, result)
result = LabelDefinitionNode.new(val[0]) result = LabelDefinitionNode.new(val[0])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 334) module_eval(<<'.,.,', 'tp_plus.y', 334)
def _reduce_112(val, _values, result) def _reduce_112(val, _values, result)
result = DefinitionNode.new(val[0],val[2]) result = DefinitionNode.new(val[0],val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 338) module_eval(<<'.,.,', 'tp_plus.y', 338)
def _reduce_113(val, _values, result) def _reduce_113(val, _values, result)
result = AssignmentNode.new(val[0],val[2]) result = AssignmentNode.new(val[0],val[2])
result result
end end
.,., .,.,
@ -1414,7 +1414,7 @@ module_eval(<<'.,.,', 'tp_plus.y', 339)
val[0], val[0],
ExpressionNode.new(val[0],"+",val[3]) ExpressionNode.new(val[0],"+",val[3])
) )
result result
end end
.,., .,.,
@ -1425,7 +1425,7 @@ module_eval(<<'.,.,', 'tp_plus.y', 344)
val[0], val[0],
ExpressionNode.new(val[0],"-",val[3]) ExpressionNode.new(val[0],"-",val[3])
) )
result result
end end
.,., .,.,
@ -1436,70 +1436,70 @@ module_eval(<<'.,.,', 'tp_plus.y', 344)
module_eval(<<'.,.,', 'tp_plus.y', 357) module_eval(<<'.,.,', 'tp_plus.y', 357)
def _reduce_118(val, _values, result) def _reduce_118(val, _values, result)
result = VarNode.new(val[0]) result = VarNode.new(val[0])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 358) module_eval(<<'.,.,', 'tp_plus.y', 358)
def _reduce_119(val, _values, result) def _reduce_119(val, _values, result)
result = VarMethodNode.new(val[0],val[1]) result = VarMethodNode.new(val[0],val[1])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 363) module_eval(<<'.,.,', 'tp_plus.y', 363)
def _reduce_120(val, _values, result) def _reduce_120(val, _values, result)
result = NamespacedVarNode.new(val[0],val[1]) result = NamespacedVarNode.new(val[0],val[1])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 367) module_eval(<<'.,.,', 'tp_plus.y', 367)
def _reduce_121(val, _values, result) def _reduce_121(val, _values, result)
result = val[0] result = val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 369) module_eval(<<'.,.,', 'tp_plus.y', 369)
def _reduce_122(val, _values, result) def _reduce_122(val, _values, result)
result = val[0].merge(val[1]) result = val[0].merge(val[1])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 373) module_eval(<<'.,.,', 'tp_plus.y', 373)
def _reduce_123(val, _values, result) def _reduce_123(val, _values, result)
result = { method: val[2] } result = { method: val[2] }
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 375) module_eval(<<'.,.,', 'tp_plus.y', 375)
def _reduce_124(val, _values, result) def _reduce_124(val, _values, result)
result = { group: val[4] } result = { group: val[4] }
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 379) module_eval(<<'.,.,', 'tp_plus.y', 379)
def _reduce_125(val, _values, result) def _reduce_125(val, _values, result)
result = [val[0]] result = [val[0]]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 380) module_eval(<<'.,.,', 'tp_plus.y', 380)
def _reduce_126(val, _values, result) def _reduce_126(val, _values, result)
result = val[0] << val[1] result = val[0] << val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 384) module_eval(<<'.,.,', 'tp_plus.y', 384)
def _reduce_127(val, _values, result) def _reduce_127(val, _values, result)
result = val[0] result = val[0]
result result
end end
.,., .,.,
@ -1510,7 +1510,7 @@ module_eval(<<'.,.,', 'tp_plus.y', 384)
module_eval(<<'.,.,', 'tp_plus.y', 394) module_eval(<<'.,.,', 'tp_plus.y', 394)
def _reduce_130(val, _values, result) def _reduce_130(val, _values, result)
result = val[0] result = val[0]
result result
end end
.,., .,.,
@ -1519,112 +1519,112 @@ module_eval(<<'.,.,', 'tp_plus.y', 394)
module_eval(<<'.,.,', 'tp_plus.y', 396) module_eval(<<'.,.,', 'tp_plus.y', 396)
def _reduce_132(val, _values, result) def _reduce_132(val, _values, result)
result = ExpressionNode.new(val[1], "!", nil) result = ExpressionNode.new(val[1], "!", nil)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 401) module_eval(<<'.,.,', 'tp_plus.y', 401)
def _reduce_133(val, _values, result) def _reduce_133(val, _values, result)
result = ExpressionNode.new(val[0], val[1], val[2]) result = ExpressionNode.new(val[0], val[1], val[2])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 405) module_eval(<<'.,.,', 'tp_plus.y', 405)
def _reduce_134(val, _values, result) def _reduce_134(val, _values, result)
result = "==" result = "=="
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 406) module_eval(<<'.,.,', 'tp_plus.y', 406)
def _reduce_135(val, _values, result) def _reduce_135(val, _values, result)
result = "<>" result = "<>"
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 407) module_eval(<<'.,.,', 'tp_plus.y', 407)
def _reduce_136(val, _values, result) def _reduce_136(val, _values, result)
result = "<" result = "<"
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 408) module_eval(<<'.,.,', 'tp_plus.y', 408)
def _reduce_137(val, _values, result) def _reduce_137(val, _values, result)
result = ">" result = ">"
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 409) module_eval(<<'.,.,', 'tp_plus.y', 409)
def _reduce_138(val, _values, result) def _reduce_138(val, _values, result)
result = ">=" result = ">="
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 410) module_eval(<<'.,.,', 'tp_plus.y', 410)
def _reduce_139(val, _values, result) def _reduce_139(val, _values, result)
result = "<=" result = "<="
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 411) module_eval(<<'.,.,', 'tp_plus.y', 411)
def _reduce_140(val, _values, result) def _reduce_140(val, _values, result)
result = "+" result = "+"
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 412) module_eval(<<'.,.,', 'tp_plus.y', 412)
def _reduce_141(val, _values, result) def _reduce_141(val, _values, result)
result = "-" result = "-"
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 413) module_eval(<<'.,.,', 'tp_plus.y', 413)
def _reduce_142(val, _values, result) def _reduce_142(val, _values, result)
result = "||" result = "||"
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 414) module_eval(<<'.,.,', 'tp_plus.y', 414)
def _reduce_143(val, _values, result) def _reduce_143(val, _values, result)
result = "*" result = "*"
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 415) module_eval(<<'.,.,', 'tp_plus.y', 415)
def _reduce_144(val, _values, result) def _reduce_144(val, _values, result)
result = "/" result = "/"
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 416) module_eval(<<'.,.,', 'tp_plus.y', 416)
def _reduce_145(val, _values, result) def _reduce_145(val, _values, result)
result = "DIV" result = "DIV"
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 417) module_eval(<<'.,.,', 'tp_plus.y', 417)
def _reduce_146(val, _values, result) def _reduce_146(val, _values, result)
result = "%" result = "%"
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 418) module_eval(<<'.,.,', 'tp_plus.y', 418)
def _reduce_147(val, _values, result) def _reduce_147(val, _values, result)
result = "&&" result = "&&"
result result
end end
.,., .,.,
@ -1641,14 +1641,14 @@ module_eval(<<'.,.,', 'tp_plus.y', 418)
module_eval(<<'.,.,', 'tp_plus.y', 430) module_eval(<<'.,.,', 'tp_plus.y', 430)
def _reduce_153(val, _values, result) def _reduce_153(val, _values, result)
result = ParenExpressionNode.new(val[1]) result = ParenExpressionNode.new(val[1])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 435) module_eval(<<'.,.,', 'tp_plus.y', 435)
def _reduce_154(val, _values, result) def _reduce_154(val, _values, result)
result = IndirectNode.new(val[2].to_sym, val[4]) result = IndirectNode.new(val[2].to_sym, val[4])
result result
end end
.,., .,.,
@ -1657,21 +1657,21 @@ module_eval(<<'.,.,', 'tp_plus.y', 440)
def _reduce_155(val, _values, result) def _reduce_155(val, _values, result)
val[1] = val[1].to_i * -1 if val[0] == "-" val[1] = val[1].to_i * -1 if val[0] == "-"
result = DigitNode.new(val[1]) result = DigitNode.new(val[1])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 443) module_eval(<<'.,.,', 'tp_plus.y', 443)
def _reduce_156(val, _values, result) def _reduce_156(val, _values, result)
val[1] = val[1].to_f * -1 if val[0] == "-"; result = RealNode.new(val[1]) val[1] = val[1].to_f * -1 if val[0] == "-"; result = RealNode.new(val[1])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 447) module_eval(<<'.,.,', 'tp_plus.y', 447)
def _reduce_157(val, _values, result) def _reduce_157(val, _values, result)
result = "-" result = "-"
result result
end end
.,., .,.,
@ -1680,14 +1680,14 @@ module_eval(<<'.,.,', 'tp_plus.y', 447)
module_eval(<<'.,.,', 'tp_plus.y', 452) module_eval(<<'.,.,', 'tp_plus.y', 452)
def _reduce_159(val, _values, result) def _reduce_159(val, _values, result)
result = RealNode.new(val[0]) result = RealNode.new(val[0])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 456) module_eval(<<'.,.,', 'tp_plus.y', 456)
def _reduce_160(val, _values, result) def _reduce_160(val, _values, result)
result = DigitNode.new(val[0]) result = DigitNode.new(val[0])
result result
end end
.,., .,.,
@ -1718,98 +1718,98 @@ module_eval(<<'.,.,', 'tp_plus.y', 456)
module_eval(<<'.,.,', 'tp_plus.y', 476) module_eval(<<'.,.,', 'tp_plus.y', 476)
def _reduce_173(val, _values, result) def _reduce_173(val, _values, result)
result = StringRegisterNode.new(val[2].to_i) result = StringRegisterNode.new(val[2].to_i)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 480) module_eval(<<'.,.,', 'tp_plus.y', 480)
def _reduce_174(val, _values, result) def _reduce_174(val, _values, result)
result = UserAlarmNode.new(val[2].to_i) result = UserAlarmNode.new(val[2].to_i)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 484) module_eval(<<'.,.,', 'tp_plus.y', 484)
def _reduce_175(val, _values, result) def _reduce_175(val, _values, result)
result = TimerNode.new(val[2].to_i) result = TimerNode.new(val[2].to_i)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 488) module_eval(<<'.,.,', 'tp_plus.y', 488)
def _reduce_176(val, _values, result) def _reduce_176(val, _values, result)
result = ArgumentNode.new(val[2].to_i) result = ArgumentNode.new(val[2].to_i)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 492) module_eval(<<'.,.,', 'tp_plus.y', 492)
def _reduce_177(val, _values, result) def _reduce_177(val, _values, result)
result = VisionRegisterNode.new(val[2].to_i) result = VisionRegisterNode.new(val[2].to_i)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 496) module_eval(<<'.,.,', 'tp_plus.y', 496)
def _reduce_178(val, _values, result) def _reduce_178(val, _values, result)
result = PositionNode.new(val[2].to_i) result = PositionNode.new(val[2].to_i)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 500) module_eval(<<'.,.,', 'tp_plus.y', 500)
def _reduce_179(val, _values, result) def _reduce_179(val, _values, result)
result = NumregNode.new(val[2].to_i) result = NumregNode.new(val[2].to_i)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 504) module_eval(<<'.,.,', 'tp_plus.y', 504)
def _reduce_180(val, _values, result) def _reduce_180(val, _values, result)
result = PosregNode.new(val[2].to_i) result = PosregNode.new(val[2].to_i)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 508) module_eval(<<'.,.,', 'tp_plus.y', 508)
def _reduce_181(val, _values, result) def _reduce_181(val, _values, result)
result = IONode.new(val[0], val[2].to_i) result = IONode.new(val[0], val[2].to_i)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 512) module_eval(<<'.,.,', 'tp_plus.y', 512)
def _reduce_182(val, _values, result) def _reduce_182(val, _values, result)
result = IONode.new(val[0], val[2].to_i) result = IONode.new(val[0], val[2].to_i)
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 516) module_eval(<<'.,.,', 'tp_plus.y', 516)
def _reduce_183(val, _values, result) def _reduce_183(val, _values, result)
result = AddressNode.new(val[0]) result = AddressNode.new(val[0])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 520) module_eval(<<'.,.,', 'tp_plus.y', 520)
def _reduce_184(val, _values, result) def _reduce_184(val, _values, result)
result = CommentNode.new(val[0]) result = CommentNode.new(val[0])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 524) module_eval(<<'.,.,', 'tp_plus.y', 524)
def _reduce_185(val, _values, result) def _reduce_185(val, _values, result)
result = TerminatorNode.new result = TerminatorNode.new
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 525) module_eval(<<'.,.,', 'tp_plus.y', 525)
def _reduce_186(val, _values, result) def _reduce_186(val, _values, result)
result = val[0] result = val[0]
result result
end end
.,., .,.,
@ -1820,7 +1820,7 @@ module_eval(<<'.,.,', 'tp_plus.y', 525)
module_eval(<<'.,.,', 'tp_plus.y', 532) module_eval(<<'.,.,', 'tp_plus.y', 532)
def _reduce_189(val, _values, result) def _reduce_189(val, _values, result)
result = TerminatorNode.new result = TerminatorNode.new
result result
end end
.,., .,.,
@ -1829,7 +1829,7 @@ module_eval(<<'.,.,', 'tp_plus.y', 532)
module_eval(<<'.,.,', 'tp_plus.y', 538) module_eval(<<'.,.,', 'tp_plus.y', 538)
def _reduce_191(val, _values, result) def _reduce_191(val, _values, result)
result = PositionDataNode.new(val[2]) result = PositionDataNode.new(val[2])
result result
end end
.,., .,.,
@ -1838,35 +1838,35 @@ module_eval(<<'.,.,', 'tp_plus.y', 538)
module_eval(<<'.,.,', 'tp_plus.y', 546) module_eval(<<'.,.,', 'tp_plus.y', 546)
def _reduce_193(val, _values, result) def _reduce_193(val, _values, result)
result = val[2] result = val[2]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 547) module_eval(<<'.,.,', 'tp_plus.y', 547)
def _reduce_194(val, _values, result) def _reduce_194(val, _values, result)
result = {} result = {}
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 551) module_eval(<<'.,.,', 'tp_plus.y', 551)
def _reduce_195(val, _values, result) def _reduce_195(val, _values, result)
result = val[0] result = val[0]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 553) module_eval(<<'.,.,', 'tp_plus.y', 553)
def _reduce_196(val, _values, result) def _reduce_196(val, _values, result)
result = val[0].merge(val[3]) result = val[0].merge(val[3])
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 557) module_eval(<<'.,.,', 'tp_plus.y', 557)
def _reduce_197(val, _values, result) def _reduce_197(val, _values, result)
result = { val[0].to_sym => val[2] } result = { val[0].to_sym => val[2] }
result result
end end
.,., .,.,
@ -1879,21 +1879,21 @@ module_eval(<<'.,.,', 'tp_plus.y', 557)
module_eval(<<'.,.,', 'tp_plus.y', 564) module_eval(<<'.,.,', 'tp_plus.y', 564)
def _reduce_201(val, _values, result) def _reduce_201(val, _values, result)
val[1] = val[1].to_i * -1 if val[0] == "-"; result = val[1] val[1] = val[1].to_i * -1 if val[0] == "-"; result = val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 565) module_eval(<<'.,.,', 'tp_plus.y', 565)
def _reduce_202(val, _values, result) def _reduce_202(val, _values, result)
val[1] = val[1].to_f * -1 if val[0] == "-"; result = val[1] val[1] = val[1].to_f * -1 if val[0] == "-"; result = val[1]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 566) module_eval(<<'.,.,', 'tp_plus.y', 566)
def _reduce_203(val, _values, result) def _reduce_203(val, _values, result)
result = val[0] == "true" result = val[0] == "true"
result result
end end
.,., .,.,
@ -1904,21 +1904,21 @@ module_eval(<<'.,.,', 'tp_plus.y', 566)
module_eval(<<'.,.,', 'tp_plus.y', 575) module_eval(<<'.,.,', 'tp_plus.y', 575)
def _reduce_206(val, _values, result) def _reduce_206(val, _values, result)
result = val[2] result = val[2]
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 579) module_eval(<<'.,.,', 'tp_plus.y', 579)
def _reduce_207(val, _values, result) def _reduce_207(val, _values, result)
result = val result = val
result result
end end
.,., .,.,
module_eval(<<'.,.,', 'tp_plus.y', 580) module_eval(<<'.,.,', 'tp_plus.y', 580)
def _reduce_208(val, _values, result) def _reduce_208(val, _values, result)
result = val[0] << val[3] result = val[0] << val[3]
result result
end end
.,., .,.,
@ -1930,4 +1930,4 @@ def _reduce_none(val, _values, result)
end end
end # class Parser end # class Parser
end # module TPPlus end # module TPPlus

Просмотреть файл

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.4.14 # This file is automatically generated by Racc 1.4.16.pre.1
# from Racc grammer file "". # from Racc grammer file "".
# #
@ -60,7 +60,7 @@ def parse( io )
# @q.push [ false, nil ] # @q.push [ false, nil ]
@q.push [ false, [@s.pos, nil] ] @q.push [ false, [@s.pos, nil] ]
## call racc's private parse method ## call racc's private parse method
do_parse do_parse
end end
@ -326,7 +326,7 @@ Racc_debug_parser = false
module_eval(<<'.,.,', 'twowaysql.y', 20) module_eval(<<'.,.,', 'twowaysql.y', 20)
def _reduce_1(val, _values, result) def _reduce_1(val, _values, result)
result = RootNode.new( val[0] ) result = RootNode.new( val[0] )
result result
end end
.,., .,.,
@ -334,7 +334,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 20)
module_eval(<<'.,.,', 'twowaysql.y', 25) module_eval(<<'.,.,', 'twowaysql.y', 25)
def _reduce_2(val, _values, result) def _reduce_2(val, _values, result)
result = [] result = []
result result
end end
.,., .,.,
@ -342,7 +342,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 25)
module_eval(<<'.,.,', 'twowaysql.y', 29) module_eval(<<'.,.,', 'twowaysql.y', 29)
def _reduce_3(val, _values, result) def _reduce_3(val, _values, result)
result.push val[1] result.push val[1]
result result
end end
.,., .,.,
@ -356,7 +356,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 29)
module_eval(<<'.,.,', 'twowaysql.y', 38) module_eval(<<'.,.,', 'twowaysql.y', 38)
def _reduce_7(val, _values, result) def _reduce_7(val, _values, result)
result = BeginNode.new( val[1] ) result = BeginNode.new( val[1] )
result result
end end
.,., .,.,
@ -364,7 +364,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 38)
module_eval(<<'.,.,', 'twowaysql.y', 43) module_eval(<<'.,.,', 'twowaysql.y', 43)
def _reduce_8(val, _values, result) def _reduce_8(val, _values, result)
result = IfNode.new( val[0][1], val[1], val[2] ) result = IfNode.new( val[0][1], val[1], val[2] )
result result
end end
.,., .,.,
@ -372,7 +372,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 43)
module_eval(<<'.,.,', 'twowaysql.y', 48) module_eval(<<'.,.,', 'twowaysql.y', 48)
def _reduce_9(val, _values, result) def _reduce_9(val, _values, result)
result = val[1] result = val[1]
result result
end end
.,., .,.,
@ -380,7 +380,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 48)
module_eval(<<'.,.,', 'twowaysql.y', 52) module_eval(<<'.,.,', 'twowaysql.y', 52)
def _reduce_10(val, _values, result) def _reduce_10(val, _values, result)
result = nil result = nil
result result
end end
.,., .,.,
@ -394,7 +394,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 52)
module_eval(<<'.,.,', 'twowaysql.y', 61) module_eval(<<'.,.,', 'twowaysql.y', 61)
def _reduce_14(val, _values, result) def _reduce_14(val, _values, result)
result = SubStatementNode.new( val[0][1], val[1] ) result = SubStatementNode.new( val[0][1], val[1] )
result result
end end
.,., .,.,
@ -402,7 +402,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 61)
module_eval(<<'.,.,', 'twowaysql.y', 66) module_eval(<<'.,.,', 'twowaysql.y', 66)
def _reduce_15(val, _values, result) def _reduce_15(val, _values, result)
result = SubStatementNode.new( val[0][1], val[1] ) result = SubStatementNode.new( val[0][1], val[1] )
result result
end end
.,., .,.,
@ -410,7 +410,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 66)
module_eval(<<'.,.,', 'twowaysql.y', 71) module_eval(<<'.,.,', 'twowaysql.y', 71)
def _reduce_16(val, _values, result) def _reduce_16(val, _values, result)
result = LiteralNode.new( val[0][1] ) result = LiteralNode.new( val[0][1] )
result result
end end
.,., .,.,
@ -418,7 +418,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 71)
module_eval(<<'.,.,', 'twowaysql.y', 75) module_eval(<<'.,.,', 'twowaysql.y', 75)
def _reduce_17(val, _values, result) def _reduce_17(val, _values, result)
result = LiteralNode.new( val[0][1] ) result = LiteralNode.new( val[0][1] )
result result
end end
.,., .,.,
@ -426,7 +426,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 75)
module_eval(<<'.,.,', 'twowaysql.y', 79) module_eval(<<'.,.,', 'twowaysql.y', 79)
def _reduce_18(val, _values, result) def _reduce_18(val, _values, result)
result = LiteralNode.new( val[0][1] ) result = LiteralNode.new( val[0][1] )
result result
end end
.,., .,.,
@ -434,7 +434,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 79)
module_eval(<<'.,.,', 'twowaysql.y', 83) module_eval(<<'.,.,', 'twowaysql.y', 83)
def _reduce_19(val, _values, result) def _reduce_19(val, _values, result)
result = LiteralNode.new( val[0][1] ) result = LiteralNode.new( val[0][1] )
result result
end end
.,., .,.,
@ -442,7 +442,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 83)
module_eval(<<'.,.,', 'twowaysql.y', 87) module_eval(<<'.,.,', 'twowaysql.y', 87)
def _reduce_20(val, _values, result) def _reduce_20(val, _values, result)
result = WhiteSpaceNode.new( val[0][1], @preserve_space ) result = WhiteSpaceNode.new( val[0][1], @preserve_space )
result result
end end
.,., .,.,
@ -450,7 +450,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 87)
module_eval(<<'.,.,', 'twowaysql.y', 91) module_eval(<<'.,.,', 'twowaysql.y', 91)
def _reduce_21(val, _values, result) def _reduce_21(val, _values, result)
result = LiteralNode.new( val[0][1] ) result = LiteralNode.new( val[0][1] )
result result
end end
.,., .,.,
@ -458,7 +458,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 91)
module_eval(<<'.,.,', 'twowaysql.y', 95) module_eval(<<'.,.,', 'twowaysql.y', 95)
def _reduce_22(val, _values, result) def _reduce_22(val, _values, result)
result = LiteralNode.new( val[0][1] ) result = LiteralNode.new( val[0][1] )
result result
end end
.,., .,.,
@ -466,7 +466,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 95)
module_eval(<<'.,.,', 'twowaysql.y', 99) module_eval(<<'.,.,', 'twowaysql.y', 99)
def _reduce_23(val, _values, result) def _reduce_23(val, _values, result)
result = LiteralNode.new( val[0][1] ) result = LiteralNode.new( val[0][1] )
result result
end end
.,., .,.,
@ -475,7 +475,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 103)
def _reduce_24(val, _values, result) def _reduce_24(val, _values, result)
@num_questions += 1 @num_questions += 1
result = QuestionNode.new( @num_questions ) result = QuestionNode.new( @num_questions )
result result
end end
.,., .,.,
@ -483,7 +483,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 103)
module_eval(<<'.,.,', 'twowaysql.y', 108) module_eval(<<'.,.,', 'twowaysql.y', 108)
def _reduce_25(val, _values, result) def _reduce_25(val, _values, result)
result = ActualCommentNode.new( val[0][1] , val[0][2] ) result = ActualCommentNode.new( val[0][1] , val[0][2] )
result result
end end
.,., .,.,
@ -495,7 +495,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 108)
module_eval(<<'.,.,', 'twowaysql.y', 115) module_eval(<<'.,.,', 'twowaysql.y', 115)
def _reduce_28(val, _values, result) def _reduce_28(val, _values, result)
result = BindVariableNode.new( val[0][1] ) result = BindVariableNode.new( val[0][1] )
result result
end end
.,., .,.,
@ -503,7 +503,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 115)
module_eval(<<'.,.,', 'twowaysql.y', 119) module_eval(<<'.,.,', 'twowaysql.y', 119)
def _reduce_29(val, _values, result) def _reduce_29(val, _values, result)
result = BindVariableNode.new( val[0][1] ) result = BindVariableNode.new( val[0][1] )
result result
end end
.,., .,.,
@ -511,7 +511,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 119)
module_eval(<<'.,.,', 'twowaysql.y', 123) module_eval(<<'.,.,', 'twowaysql.y', 123)
def _reduce_30(val, _values, result) def _reduce_30(val, _values, result)
result = BindVariableNode.new( val[0][1] ) result = BindVariableNode.new( val[0][1] )
result result
end end
.,., .,.,
@ -519,7 +519,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 123)
module_eval(<<'.,.,', 'twowaysql.y', 127) module_eval(<<'.,.,', 'twowaysql.y', 127)
def _reduce_31(val, _values, result) def _reduce_31(val, _values, result)
result = BindVariableNode.new( val[0][1] ) result = BindVariableNode.new( val[0][1] )
result result
end end
.,., .,.,
@ -527,7 +527,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 127)
module_eval(<<'.,.,', 'twowaysql.y', 131) module_eval(<<'.,.,', 'twowaysql.y', 131)
def _reduce_32(val, _values, result) def _reduce_32(val, _values, result)
result = ParenBindVariableNode.new( val[0][1] ) result = ParenBindVariableNode.new( val[0][1] )
result result
end end
.,., .,.,
@ -535,7 +535,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 131)
module_eval(<<'.,.,', 'twowaysql.y', 136) module_eval(<<'.,.,', 'twowaysql.y', 136)
def _reduce_33(val, _values, result) def _reduce_33(val, _values, result)
result = EmbedVariableNode.new( val[0][1] ) result = EmbedVariableNode.new( val[0][1] )
result result
end end
.,., .,.,
@ -543,7 +543,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 136)
module_eval(<<'.,.,', 'twowaysql.y', 140) module_eval(<<'.,.,', 'twowaysql.y', 140)
def _reduce_34(val, _values, result) def _reduce_34(val, _values, result)
result = EmbedVariableNode.new( val[0][1] ) result = EmbedVariableNode.new( val[0][1] )
result result
end end
.,., .,.,
@ -553,4 +553,4 @@ def _reduce_none(val, _values, result)
end end
end # class Parser end # class Parser
end # module TwoWaySQL end # module TwoWaySQL