summaryrefslogtreecommitdiff
path: root/test/racc/assets
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2019-10-30 21:01:30 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-10-30 21:02:07 +0900
commite6d611ad37ab1a8eb04fceecdfe3a61967383256 (patch)
tree211fbb6a809322c8f9e8dd09471fb0b7d0117dcc /test/racc/assets
parentd3272fcba3196738403def453ef0a5119ce16953 (diff)
Regenerate the output results for test fixtures of racc
Diffstat (limited to 'test/racc/assets')
-rw-r--r--test/racc/assets/error_recovery.y2
-rw-r--r--test/racc/assets/intp.y8
-rw-r--r--test/racc/assets/liquor.y2
-rw-r--r--test/racc/assets/mailp.y54
-rw-r--r--test/racc/assets/mof.y24
-rw-r--r--test/racc/assets/nullbug2.y4
-rw-r--r--test/racc/assets/recv.y40
-rw-r--r--test/racc/assets/syntax.y2
-rw-r--r--test/racc/assets/twowaysql.y2
9 files changed, 69 insertions, 69 deletions
diff --git a/test/racc/assets/error_recovery.y b/test/racc/assets/error_recovery.y
index 7128c364ca..1fd21ac7d0 100644
--- a/test/racc/assets/error_recovery.y
+++ b/test/racc/assets/error_recovery.y
@@ -32,4 +32,4 @@ end
---- footer
-InfiniteLoop.new.parse
+InfiniteLoop.new.parse \ No newline at end of file
diff --git a/test/racc/assets/intp.y b/test/racc/assets/intp.y
index 39e42afd74..24e547da61 100644
--- a/test/racc/assets/intp.y
+++ b/test/racc/assets/intp.y
@@ -27,7 +27,7 @@ rule
result.push val[1]
}
| stmt_list EOL
-
+
stmt : expr
| assign
| IDENT realprim
@@ -38,7 +38,7 @@ rule
| if_stmt
| while_stmt
| defun
-
+
if_stmt : IF stmt THEN EOL stmt_list else_stmt END
{
result = IfNode.new( @fname, val[0][0],
@@ -261,7 +261,7 @@ module Intp
class Core
- def initialize
+ def initialize
@ftab = {}
@obj = Object.new
@stack = []
@@ -318,7 +318,7 @@ module Intp
def lvar?(name)
@lvars.key? name
end
-
+
def [](key)
@lvars[key]
end
diff --git a/test/racc/assets/liquor.y b/test/racc/assets/liquor.y
index edf441118c..8045a072a4 100644
--- a/test/racc/assets/liquor.y
+++ b/test/racc/assets/liquor.y
@@ -310,4 +310,4 @@ rule
args << [ :kwarg, retag([ k, v ]), k, v ]
end
}
- end
+ end \ No newline at end of file
diff --git a/test/racc/assets/mailp.y b/test/racc/assets/mailp.y
index eb7d4d529d..da332a33ba 100644
--- a/test/racc/assets/mailp.y
+++ b/test/racc/assets/mailp.y
@@ -35,7 +35,7 @@ rule
@field.domain = mb.domain
}
;
-
+
datetime : day DIGIT ATOM DIGIT hour zone
# 0 1 2 3 4 5
# day month year
@@ -44,11 +44,11 @@ rule
result = (t + val[4] - val[5]).localtime
}
;
-
+
day : /* none */
| ATOM ','
;
-
+
hour : DIGIT ':' DIGIT
{
result = (result.to_i * 60 * 60) + (val[2].to_i * 60)
@@ -60,16 +60,16 @@ rule
+ val[4].to_i
}
;
-
+
zone : ATOM
{
result = ::TMail.zonestr2i( val[0] ) * 60
}
;
-
+
received : from by via with id for recvdatetime
;
-
+
from : /* none */
| FROM domain
{
@@ -84,28 +84,28 @@ rule
@field.from = Address.join( val[1] )
}
;
-
+
by : /* none */
| BY domain
{
@field.by = Address.join( val[1] )
}
;
-
+
via : /* none */
| VIA ATOM
{
@field.via = val[1]
}
;
-
+
with : /* none */
| WITH ATOM
{
@field.with.push val[1]
}
;
-
+
id : /* none */
| ID msgid
{
@@ -116,14 +116,14 @@ rule
@field.msgid = val[1]
}
;
-
+
for : /* none */
| FOR addr
{
@field.for_ = val[1].address
}
;
-
+
recvdatetime
: /* none */
| ';' datetime
@@ -131,7 +131,7 @@ rule
@field.date = val[1]
}
;
-
+
returnpath: '<' '>'
| routeaddr
{
@@ -173,7 +173,7 @@ rule
}
# | phrase ':' ';' { result = AddressGroup.new( result ) }
;
-
+
routeaddr : '<' route spec '>'
{
result = val[2]
@@ -184,22 +184,22 @@ rule
result = val[1]
}
;
-
+
route : at_domains ':'
;
-
+
at_domains: '@' domain { result = [ val[1] ] }
| at_domains ',' '@' domain { result.push val[3] }
;
-
+
spec : local '@' domain { result = Address.new( val[0], val[2] ) }
| local { result = Address.new( result, nil ) }
;
-
+
local : word { result = val }
| local '.' word { result.push val[2] }
;
-
+
domain : domword { result = val }
| domain '.' domword { result.push val[2] }
;
@@ -215,11 +215,11 @@ rule
result = val.join('')
}
;
-
+
phrase : word
| phrase word { result << ' ' << val[1] }
;
-
+
word : atom
| QUOTED
| DIGIT
@@ -228,7 +228,7 @@ rule
keys : phrase
| keys ',' phrase
;
-
+
enc : word
{
@field.encrypter = val[0]
@@ -258,7 +258,7 @@ rule
@field.sub = ''
}
;
-
+
params : /* none */
| params ';' TOKEN '=' value
{
@@ -281,7 +281,7 @@ rule
@field.disposition = val[0]
}
;
-
+
disp_params
: /* none */
| disp_params ';' disp_param
@@ -293,7 +293,7 @@ rule
@field.params[ val[0].downcase ] = val[2]
}
;
-
+
atom : ATOM
| FROM
| BY
@@ -302,7 +302,7 @@ rule
| ID
| FOR
;
-
+
end
@@ -382,7 +382,7 @@ module TMail
@scanner.scan @pass_array
end
end
-
+
def on_error( tok, val, vstack )
raise ParseError,
"\nparse error in '#{@field.name}' header, on token #{val.inspect}"
diff --git a/test/racc/assets/mof.y b/test/racc/assets/mof.y
index da3172988f..1adc5ade14 100644
--- a/test/racc/assets/mof.y
+++ b/test/racc/assets/mof.y
@@ -33,7 +33,7 @@ class MOF::Parser
octalValue
decimalValue
hexValue
-
+
rule
/* Returns a Hash of filename and MofResult */
@@ -47,7 +47,7 @@ rule
result[@name] = @result
}
;
-
+
mofProduction
: compilerDirective
| classDeclaration
@@ -66,7 +66,7 @@ rule
* compilerDirective
*
*/
-
+
compilerDirective
: "#" PRAGMA INCLUDE pragmaParameters_opt
{ raise MOF::Helper::Error.new(@name,@lineno,@line,"Missing filename after '#pragma include'") unless val[3]
@@ -107,7 +107,7 @@ rule
* classDeclaration
*
*/
-
+
classDeclaration
: qualifierList_opt CLASS className alias_opt superClass_opt "{" classFeatures "}" ";"
{ qualifiers = val[0]
@@ -151,7 +151,7 @@ rule
result << val[2] if val[2]
}
;
-
+
qualifier
: qualifierName qualifierParameter_opt flavor_opt
{ # Get qualifier decl
@@ -242,7 +242,7 @@ rule
result = CIM::Property.new(type,val[2],val[0],val[4])
}
;
-
+
referenceDeclaration
: qualifierList_opt objectRef referenceName array_opt defaultValue_opt ";"
{ if val[4]
@@ -308,7 +308,7 @@ rule
: /* empty */
| parameterList
;
-
+
parameterList
: parameter parameters
{ result = val[1].unshift val[0] }
@@ -367,7 +367,7 @@ rule
: /* empty */
| defaultValue
;
-
+
defaultValue
: "=" initializer
{ result = val[1] }
@@ -416,7 +416,7 @@ rule
| string stringValue
{ result = val[0] + val[1] }
;
-
+
referenceInitializer
: objectHandle
| aliasIdentifier
@@ -465,7 +465,7 @@ rule
* qualifierDeclaration
*
*/
-
+
qualifierDeclaration
/* 0 1 2 3 4 */
: QUALIFIER qualifierName qualifierType scope defaultFlavor_opt ";"
@@ -534,7 +534,7 @@ rule
* instanceDeclaration
*
*/
-
+
instanceDeclaration
: instance ";"
;
@@ -583,7 +583,7 @@ def initialize options = {}
@includes = options[:includes] || []
@quiet = options[:quiet]
@style = options[:style] || :cim # default to style CIM v2.2 syntax
-
+
@lineno = 1
@file = nil
@iconv = nil
diff --git a/test/racc/assets/nullbug2.y b/test/racc/assets/nullbug2.y
index 0c1d43bf3e..f09ca625e8 100644
--- a/test/racc/assets/nullbug2.y
+++ b/test/racc/assets/nullbug2.y
@@ -6,10 +6,10 @@ class A
rule
targ: operation voidhead
| variable
-
+
voidhead : void B
void:
-
+
operation: A
variable : A
end
diff --git a/test/racc/assets/recv.y b/test/racc/assets/recv.y
index b6e849dda9..0c672b3b6c 100644
--- a/test/racc/assets/recv.y
+++ b/test/racc/assets/recv.y
@@ -4,19 +4,19 @@ rule
content: RecvH received
;
-
+
datetime: day
;
-
+
msgid: '<' spec '>';
-
+
day:
| ATOM ','
;
-
+
received: recvitem_list recvdatetime
;
-
+
recvitem_list:
| recvitem_list recvitem
;
@@ -26,25 +26,25 @@ rule
by:
| BY domain
;
-
+
via:
| VIA ATOM
;
-
+
with: WITH ATOM
;
-
+
for:
| FOR addr
;
-
+
recvdatetime:
| ';' datetime
;
-
+
addr: mbox | group ;
- mboxes: mbox
+ mboxes: mbox
| mboxes ',' mbox
;
@@ -59,21 +59,21 @@ rule
routeaddr: '<' route spec '>'
| '<' spec '>'
;
-
+
route: at_domains ':' ;
-
- at_domains: '@' domain
+
+ at_domains: '@' domain
| at_domains ',' '@' domain
;
-
+
spec: local '@' domain
- | local
+ | local
;
-
+
local: word
| local '.' word
;
-
+
domain: domword
| domain '.' domword
;
@@ -86,12 +86,12 @@ rule
phrase: word
| phrase word
;
-
+
word: atom
| QUOTED
| DIGIT
;
atom: ATOM | FROM | BY | VIA | WITH | ID | FOR ;
-
+
end
diff --git a/test/racc/assets/syntax.y b/test/racc/assets/syntax.y
index 727f74a29d..e8bb1fb4d8 100644
--- a/test/racc/assets/syntax.y
+++ b/test/racc/assets/syntax.y
@@ -31,7 +31,7 @@ rule
print 'cba'
}
| cont
-
+
cont : A c2 B c2 C
c2 : C C C C C
diff --git a/test/racc/assets/twowaysql.y b/test/racc/assets/twowaysql.y
index d3bc748d3a..c729b08f7d 100644
--- a/test/racc/assets/twowaysql.y
+++ b/test/racc/assets/twowaysql.y
@@ -196,7 +196,7 @@ def parse( io )
# @q.push [ false, nil ]
@q.push [ false, [@s.pos, nil] ]
-
+
## call racc's private parse method
do_parse
end