writeexcel 0.1.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +26 -31
- data/examples/a_simple.rb +42 -42
- data/examples/{autofilters.rb → autofilter.rb} +264 -266
- data/examples/bigfile.rb +29 -0
- data/examples/chart_area.rb +120 -0
- data/examples/chart_bar.rb +119 -0
- data/examples/chart_column.rb +119 -0
- data/examples/chart_line.rb +119 -0
- data/examples/chart_pie.rb +107 -0
- data/examples/chart_scatter.rb +120 -0
- data/examples/chart_stock.rb +147 -0
- data/examples/copyformat.rb +51 -51
- data/examples/data_validate.rb +278 -278
- data/examples/date_time.rb +86 -86
- data/examples/defined_name.rb +31 -0
- data/examples/demo.rb +120 -118
- data/examples/diag_border.rb +35 -35
- data/examples/formats.rb +489 -489
- data/examples/header.rb +136 -136
- data/examples/hidden.rb +28 -28
- data/examples/hyperlink.rb +42 -42
- data/examples/images.rb +52 -52
- data/examples/merge1.rb +39 -39
- data/examples/merge2.rb +44 -44
- data/examples/merge3.rb +65 -65
- data/examples/merge4.rb +82 -82
- data/examples/merge5.rb +79 -79
- data/examples/properties.rb +33 -0
- data/examples/properties_jp.rb +32 -0
- data/examples/protection.rb +46 -46
- data/examples/regions.rb +52 -52
- data/examples/repeat.rb +42 -42
- data/examples/stats.rb +75 -75
- data/examples/stocks.rb +80 -80
- data/examples/tab_colors.rb +30 -30
- data/examples/write_arrays.rb +82 -0
- data/lib/writeexcel.rb +1134 -18
- data/lib/writeexcel/biffwriter.rb +273 -260
- data/lib/writeexcel/chart.rb +2306 -217
- data/lib/writeexcel/charts/area.rb +152 -0
- data/lib/writeexcel/charts/bar.rb +177 -0
- data/lib/writeexcel/charts/column.rb +156 -0
- data/lib/writeexcel/charts/external.rb +61 -0
- data/lib/writeexcel/charts/line.rb +152 -0
- data/lib/writeexcel/charts/pie.rb +169 -0
- data/lib/writeexcel/charts/scatter.rb +192 -0
- data/lib/writeexcel/charts/stock.rb +211 -0
- data/lib/writeexcel/excelformulaparser.rb +208 -195
- data/lib/writeexcel/format.rb +1697 -1108
- data/lib/writeexcel/formula.rb +1050 -986
- data/lib/writeexcel/olewriter.rb +322 -322
- data/lib/writeexcel/properties.rb +251 -250
- data/lib/writeexcel/storage_lite.rb +968 -0
- data/lib/writeexcel/workbook.rb +3294 -2630
- data/lib/writeexcel/worksheet.rb +9012 -6377
- data/test/excelfile/Chart1.xls +0 -0
- data/test/excelfile/Chart2.xls +0 -0
- data/test/excelfile/Chart3.xls +0 -0
- data/test/excelfile/Chart4.xls +0 -0
- data/test/excelfile/Chart5.xls +0 -0
- data/test/perl_output/Chart1.xls.data +0 -0
- data/test/perl_output/Chart2.xls.data +0 -0
- data/test/perl_output/Chart3.xls.data +0 -0
- data/test/perl_output/Chart4.xls.data +0 -0
- data/test/perl_output/Chart5.xls.data +0 -0
- data/test/perl_output/a_simple.xls +0 -0
- data/test/perl_output/autofilter.xls +0 -0
- data/test/perl_output/chart_area.xls +0 -0
- data/test/perl_output/chart_bar.xls +0 -0
- data/test/perl_output/chart_column.xls +0 -0
- data/test/perl_output/chart_line.xls +0 -0
- data/test/perl_output/data_validate.xls +0 -0
- data/test/perl_output/date_time.xls +0 -0
- data/test/perl_output/demo.xls +0 -0
- data/test/perl_output/demo101.bin +0 -0
- data/test/perl_output/demo201.bin +0 -0
- data/test/perl_output/demo301.bin +0 -0
- data/test/perl_output/demo401.bin +0 -0
- data/test/perl_output/demo501.bin +0 -0
- data/test/perl_output/diag_border.xls +0 -0
- data/test/perl_output/headers.xls +0 -0
- data/test/perl_output/hyperlink.xls +0 -0
- data/test/perl_output/images.xls +0 -0
- data/test/perl_output/merge1.xls +0 -0
- data/test/perl_output/merge2.xls +0 -0
- data/test/perl_output/merge3.xls +0 -0
- data/test/perl_output/merge4.xls +0 -0
- data/test/perl_output/merge5.xls +0 -0
- data/test/perl_output/protection.xls +0 -0
- data/test/perl_output/regions.xls +0 -0
- data/test/perl_output/stats.xls +0 -0
- data/test/perl_output/stocks.xls +0 -0
- data/test/perl_output/tab_colors.xls +0 -0
- data/test/perl_output/unicode_cyrillic.xls +0 -0
- data/test/perl_output/workbook1.xls +0 -0
- data/test/perl_output/workbook2.xls +0 -0
- data/test/tc_all.rb +32 -31
- data/test/tc_biff.rb +104 -104
- data/test/tc_chart.rb +22 -22
- data/test/tc_example_match.rb +1944 -1280
- data/test/tc_format.rb +1254 -1267
- data/test/tc_formula.rb +63 -63
- data/test/tc_ole.rb +110 -110
- data/test/tc_storage_lite.rb +149 -0
- data/test/tc_workbook.rb +140 -115
- data/test/tc_worksheet.rb +115 -115
- data/test/test_00_IEEE_double.rb +14 -14
- data/test/test_01_add_worksheet.rb +12 -12
- data/test/test_02_merge_formats.rb +58 -58
- data/test/test_04_dimensions.rb +397 -397
- data/test/test_05_rows.rb +182 -182
- data/test/test_06_extsst.rb +80 -80
- data/test/test_11_date_time.rb +484 -484
- data/test/test_12_date_only.rb +506 -506
- data/test/test_13_date_seconds.rb +486 -486
- data/test/test_21_escher.rb +642 -629
- data/test/test_22_mso_drawing_group.rb +750 -739
- data/test/test_23_note.rb +78 -78
- data/test/test_24_txo.rb +80 -80
- data/test/test_25_position_object.rb +82 -0
- data/test/test_26_autofilter.rb +327 -327
- data/test/test_27_autofilter.rb +144 -144
- data/test/test_28_autofilter.rb +174 -174
- data/test/test_29_process_jpg.rb +681 -131
- data/test/test_30_validation_dval.rb +82 -82
- data/test/test_31_validation_dv_strings.rb +131 -131
- data/test/test_32_validation_dv_formula.rb +211 -211
- data/test/test_40_property_types.rb +191 -191
- data/test/test_41_properties.rb +238 -238
- data/test/test_42_set_properties.rb +442 -419
- data/test/test_50_name_stored.rb +305 -0
- data/test/test_51_name_print_area.rb +363 -0
- data/test/test_52_name_print_titles.rb +460 -0
- data/test/test_53_autofilter.rb +209 -0
- data/test/test_60_chart_generic.rb +576 -0
- data/test/test_61_chart_subclasses.rb +97 -0
- data/test/test_62_chart_formats.rb +270 -0
- data/test/test_63_chart_area_formats.rb +647 -0
- data/test/test_chartex.rb +35 -0
- data/test/ts_all.rb +46 -34
- data/writeexcel.gemspec +18 -0
- data/writeexcel.rdoc +583 -0
- metadata +162 -108
@@ -0,0 +1,211 @@
|
|
1
|
+
###############################################################################
|
2
|
+
#
|
3
|
+
# Stock - A writer class for Excel Stock charts.
|
4
|
+
#
|
5
|
+
# Used in conjunction with Spreadsheet::WriteExcel::Chart.
|
6
|
+
#
|
7
|
+
# See formatting note in Spreadsheet::WriteExcel::Chart.
|
8
|
+
#
|
9
|
+
# Copyright 2000-2010, John McNamara, jmcnamara@cpan.org
|
10
|
+
#
|
11
|
+
# original written in Perl by John McNamara
|
12
|
+
# converted to Ruby by Hideo Nakamura, cxn03651@msj.biglobe.ne.jp
|
13
|
+
#
|
14
|
+
|
15
|
+
require 'writeexcel'
|
16
|
+
|
17
|
+
class Chart
|
18
|
+
|
19
|
+
# ==SYNOPSIS
|
20
|
+
#
|
21
|
+
# To create a simple Excel file with a Stock chart using WriteExcel:
|
22
|
+
#
|
23
|
+
# #!/usr/bin/ruby -w
|
24
|
+
#
|
25
|
+
# require 'writeexcel'
|
26
|
+
#
|
27
|
+
# workbook = Spreadsheet::WriteExcel.new('chart.xls')
|
28
|
+
# worksheet = workbook.add_worksheet
|
29
|
+
#
|
30
|
+
# chart = workbook.add_chart(:type => Chart::Stock)
|
31
|
+
#
|
32
|
+
# # Add a series for each Open-High-Low-Close.
|
33
|
+
# chart.add_series(:categories => '=Sheet1!$A$2:$A$6', :values => '=Sheet1!$B$2:$B$6')
|
34
|
+
# chart.add_series(:categories => '=Sheet1!$A$2:$A$6', :values => '=Sheet1!$C$2:$C$6')
|
35
|
+
# chart.add_series(:categories => '=Sheet1!$A$2:$A$6', :values => '=Sheet1!$D$2:$D$6')
|
36
|
+
# chart.add_series(:categories => '=Sheet1!$A$2:$A$6', :values => '=Sheet1!$E$2:$E$6')
|
37
|
+
#
|
38
|
+
# # Add the worksheet data the chart refers to.
|
39
|
+
# # ... See the full example below.
|
40
|
+
#
|
41
|
+
# workbook.close
|
42
|
+
#
|
43
|
+
# ==DESCRIPTION
|
44
|
+
#
|
45
|
+
# This module implements Stock charts for WriteExcel. The chart object
|
46
|
+
# is created via the Workbook add_chart() method:
|
47
|
+
#
|
48
|
+
# chart = workbook.add_chart(:type => Chart::Stock)
|
49
|
+
#
|
50
|
+
# Once the object is created it can be configured via the following methods
|
51
|
+
# that are common to all chart classes:
|
52
|
+
#
|
53
|
+
# chart.add_series
|
54
|
+
# chart.set_x_axis
|
55
|
+
# chart.set_y_axis
|
56
|
+
# chart.set_title
|
57
|
+
#
|
58
|
+
# These methods are explained in detail in Chart section of WriteExcel.
|
59
|
+
# Class specific methods or settings, if any, are explained below.
|
60
|
+
#
|
61
|
+
# ==Stock Chart Methods
|
62
|
+
#
|
63
|
+
# There aren't currently any stock chart specific methods.
|
64
|
+
# See the TODO section of Chart section in WriteExcel.
|
65
|
+
#
|
66
|
+
# The default Stock chart is an Open-High-Low-Close chart.
|
67
|
+
# A series must be added for each of these data sources.
|
68
|
+
#
|
69
|
+
# The default Stock chart is in black and white. User defined colours
|
70
|
+
# will be added at a later stage.
|
71
|
+
#
|
72
|
+
# ==EXAMPLE
|
73
|
+
#
|
74
|
+
# Here is a complete example that demonstrates most of the available features
|
75
|
+
# when creating a Stock chart.
|
76
|
+
#
|
77
|
+
# #!/usr/bin/ruby -w
|
78
|
+
#
|
79
|
+
# require 'writeexcel'
|
80
|
+
#
|
81
|
+
# workbook = Spreadsheet::WriteExcel.new('chart_stock_ex.xls')
|
82
|
+
# worksheet = workbook.add_worksheet
|
83
|
+
# bold = workbook.add_format(:bold => 1)
|
84
|
+
# date_format = workbook.add_format(:num_format => 'dd/mm/yyyy')
|
85
|
+
#
|
86
|
+
# # Add the worksheet data that the charts will refer to.
|
87
|
+
# headings = [ 'Date', 'Open', 'High', 'Low', 'Close' ]
|
88
|
+
# data = [
|
89
|
+
# [ '2009-08-23', 110.75, 113.48, 109.05, 109.40 ],
|
90
|
+
# [ '2009-08-24', 111.24, 111.60, 103.57, 104.87 ],
|
91
|
+
# [ '2009-08-25', 104.96, 108.00, 103.88, 106.00 ],
|
92
|
+
# [ '2009-08-26', 104.95, 107.95, 104.66, 107.91 ],
|
93
|
+
# [ '2009-08-27', 108.10, 108.62, 105.69, 106.15 ]
|
94
|
+
# ]
|
95
|
+
#
|
96
|
+
# worksheet.write('A1', headings, bold)
|
97
|
+
#
|
98
|
+
# row = 1
|
99
|
+
# data.each do |d|
|
100
|
+
# worksheet.write(row, 0, d[0], date_format)
|
101
|
+
# worksheet.write(row, 1, d[1])
|
102
|
+
# worksheet.write(row, 2, d[2])
|
103
|
+
# worksheet.write(row, 3, d[3])
|
104
|
+
# worksheet.write(row, 4, d[4])
|
105
|
+
# row += 1
|
106
|
+
# end
|
107
|
+
#
|
108
|
+
# # Create a new chart object. In this case an embedded chart.
|
109
|
+
# chart = workbook.add_chart(:type => Chart::Stock, ::embedded => 1)
|
110
|
+
#
|
111
|
+
# # Add a series for each of the Open-High-Low-Close columns.
|
112
|
+
# chart.add_series(
|
113
|
+
# :categories => '=Sheet1!$A$2:$A$6',
|
114
|
+
# :values => '=Sheet1!$B$2:$B$6',
|
115
|
+
# :name => 'Open'
|
116
|
+
# )
|
117
|
+
#
|
118
|
+
# chart.add_series(
|
119
|
+
# :categories => '=Sheet1!$A$2:$A$6',
|
120
|
+
# :values => '=Sheet1!$C$2:$C$6',
|
121
|
+
# :name => 'High'
|
122
|
+
# )
|
123
|
+
#
|
124
|
+
# chart.add_series(
|
125
|
+
# :categories => '=Sheet1!$A$2:$A$6',
|
126
|
+
# :values => '=Sheet1!$D$2:$D$6',
|
127
|
+
# :name => 'Low'
|
128
|
+
# )
|
129
|
+
#
|
130
|
+
# chart.add_series(
|
131
|
+
# :categories => '=Sheet1!$A$2:$A$6',
|
132
|
+
# :values => '=Sheet1!$E$2:$E$6',
|
133
|
+
# :name => 'Close'
|
134
|
+
# )
|
135
|
+
#
|
136
|
+
# # Add a chart title and some axis labels.
|
137
|
+
# chart.set_title(:name => 'Open-High-Low-Close')
|
138
|
+
# chart.set_x_axis(:name => 'Date')
|
139
|
+
# chart.set_y_axis(:name => 'Share price')
|
140
|
+
#
|
141
|
+
# # Insert the chart into the worksheet (with an offset).
|
142
|
+
# worksheet.insert_chart('F2', chart, 25, 10)
|
143
|
+
#
|
144
|
+
# workbook.close
|
145
|
+
#
|
146
|
+
class Stock < Chart
|
147
|
+
###############################################################################
|
148
|
+
#
|
149
|
+
# new()
|
150
|
+
#
|
151
|
+
#
|
152
|
+
def initialize(*args) # :nodoc:
|
153
|
+
super
|
154
|
+
end
|
155
|
+
|
156
|
+
###############################################################################
|
157
|
+
#
|
158
|
+
# _store_chart_type()
|
159
|
+
#
|
160
|
+
# Implementation of the abstract method from the specific chart class.
|
161
|
+
#
|
162
|
+
# Write the LINE chart BIFF record. A stock chart uses the same LINE record
|
163
|
+
# as a line chart but with additional DROPBAR and CHARTLINE records to define
|
164
|
+
# the stock style.
|
165
|
+
#
|
166
|
+
def store_chart_type # :nodoc:
|
167
|
+
record = 0x1018 # Record identifier.
|
168
|
+
length = 0x0002 # Number of bytes to follow.
|
169
|
+
grbit = 0x0000 # Option flags.
|
170
|
+
|
171
|
+
header = [record, length].pack('vv')
|
172
|
+
data = [grbit].pack('v')
|
173
|
+
|
174
|
+
append(header, data)
|
175
|
+
end
|
176
|
+
|
177
|
+
###############################################################################
|
178
|
+
#
|
179
|
+
# _store_marker_dataformat_stream(). Overridden.
|
180
|
+
#
|
181
|
+
# This is an implementation of the parent abstract method to define
|
182
|
+
# properties of markers, linetypes, pie formats and other.
|
183
|
+
#
|
184
|
+
def store_marker_dataformat_stream # :nodoc:
|
185
|
+
store_dropbar
|
186
|
+
store_begin
|
187
|
+
store_lineformat(0x00000000, 0x0000, 0xFFFF, 0x0001, 0x004F)
|
188
|
+
store_areaformat(0x00FFFFFF, 0x0000, 0x01, 0x01, 0x09, 0x08)
|
189
|
+
store_end
|
190
|
+
|
191
|
+
store_dropbar
|
192
|
+
store_begin
|
193
|
+
store_lineformat(0x00000000, 0x0000, 0xFFFF, 0x0001, 0x004F)
|
194
|
+
store_areaformat(0x0000, 0x00FFFFFF, 0x01, 0x01, 0x08, 0x09)
|
195
|
+
store_end
|
196
|
+
|
197
|
+
store_chartline
|
198
|
+
store_lineformat(0x00000000, 0x0000, 0xFFFF, 0x0000, 0x004F)
|
199
|
+
|
200
|
+
|
201
|
+
store_dataformat(0x0000, 0xFFFD, 0x0000)
|
202
|
+
store_begin
|
203
|
+
store_3dbarshape
|
204
|
+
store_lineformat(0x00000000, 0x0005, 0xFFFF, 0x0000, 0x004F)
|
205
|
+
store_areaformat(0x00000000, 0x0000, 0x00, 0x01, 0x4D, 0x4D)
|
206
|
+
store_pieformat
|
207
|
+
store_markerformat(0x00, 0x00, 0x00, 0x00, 0x4D, 0x4D, 0x3C)
|
208
|
+
store_end
|
209
|
+
end
|
210
|
+
end
|
211
|
+
end
|
@@ -5,180 +5,183 @@
|
|
5
5
|
#
|
6
6
|
|
7
7
|
require 'racc/parser.rb'
|
8
|
-
class ExcelFormulaParser < Racc::Parser
|
8
|
+
class ExcelFormulaParser < Racc::Parser # :nodoc:
|
9
9
|
##### State transition tables begin ###
|
10
10
|
|
11
11
|
racc_action_table = [
|
12
|
-
16,
|
13
|
-
nil, 53,
|
14
|
-
13, 14, 15, 17,
|
15
|
-
|
16
|
-
5, 6,
|
17
|
-
4, 5, 6,
|
18
|
-
|
19
|
-
14, 15, 17, 18, 16, 4, 5,
|
20
|
-
13, 14, 15, 17,
|
21
|
-
5, 6,
|
22
|
-
4, 5, 6,
|
23
|
-
|
24
|
-
14, 15, 17, 18,
|
25
|
-
13, 14, 15, 17,
|
26
|
-
5, 6,
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
28, 30, 32,
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
12
|
+
16, 54, 26, 28, 30, 32, 34, 21, 20, 3,
|
13
|
+
nil, nil, 53, 19, 23, 4, 5, 6, 7, 10,
|
14
|
+
13, 14, 15, 17, 18, 16, nil, 26, 28, 30,
|
15
|
+
32, 34, 8, nil, nil, nil, nil, 16, 19, nil,
|
16
|
+
4, 5, 6, 7, 10, 13, 14, 15, 17, 18,
|
17
|
+
19, 16, 4, 5, 6, 7, 10, 13, 14, 15,
|
18
|
+
17, 18, nil, 16, 19, nil, 4, 5, 6, 7,
|
19
|
+
10, 13, 14, 15, 17, 18, 19, 16, 4, 5,
|
20
|
+
6, 7, 10, 13, 14, 15, 17, 18, nil, 16,
|
21
|
+
19, nil, 4, 5, 6, 7, 10, 13, 14, 15,
|
22
|
+
17, 18, 19, 16, 4, 5, 6, 7, 10, 13,
|
23
|
+
14, 15, 17, 18, nil, 16, 19, 37, 4, 5,
|
24
|
+
6, 7, 10, 13, 14, 15, 17, 18, 19, 16,
|
25
|
+
4, 5, 6, 7, 10, 13, 14, 15, 17, 18,
|
26
|
+
nil, 16, 19, nil, 4, 5, 6, 7, 10, 13,
|
27
|
+
14, 15, 17, 18, 19, 16, 4, 5, 6, 7,
|
28
|
+
10, 13, 14, 15, 17, 18, nil, 16, 19, nil,
|
29
|
+
4, 5, 6, 7, 10, 13, 14, 15, 17, 18,
|
30
|
+
19, 16, 4, 5, 6, 7, 10, 13, 14, 15,
|
31
|
+
17, 18, nil, 16, 19, nil, 4, 5, 6, 7,
|
32
|
+
10, 13, 14, 15, 17, 18, 19, 16, 4, 5,
|
33
|
+
6, 7, 10, 13, 14, 15, 17, 18, nil, 16,
|
34
|
+
19, nil, 4, 5, 6, 7, 10, 13, 14, 15,
|
35
|
+
17, 18, 19, nil, 4, 5, 6, 7, 10, 13,
|
36
|
+
14, 15, 17, 18, 23, 24, 27, 29, 31, 33,
|
37
|
+
nil, nil, nil, nil, nil, 22, nil, 26, 28, 30,
|
38
|
+
32, 34, nil, 52, 23, 24, 27, 29, 31, 33,
|
39
|
+
23, 24, 27, 29, nil, nil, nil, 26, 28, 30,
|
40
|
+
32, 34, nil, 26, 28, 30, 32, 34, 23, 24,
|
41
|
+
27, 29, nil, nil, nil, 23, 24, 27, 29, 31,
|
42
|
+
33, 26, 28, 30, 32, 34, 22, 25, 26, 28,
|
43
|
+
30, 32, 34, 23, 24, 27, 29, 31, 33, nil,
|
44
|
+
nil, nil, nil, nil, 22, nil, 26, 28, 30, 32,
|
45
|
+
34, 23, 24, 27, 29, 31, 33, nil, nil, nil,
|
46
|
+
nil, nil, 22, nil, 26, 28, 30, 32, 34, 23,
|
47
|
+
24, 27, 29, 31, 33, 23, nil, nil, nil, nil,
|
48
|
+
22, nil, 26, 28, 30, 32, 34, nil, 26, 28,
|
49
|
+
30, 32, 34, 23, 24, 27, 29, 31, 33, 23,
|
50
|
+
24, nil, nil, nil, 22, nil, 26, 28, 30, 32,
|
51
|
+
34, nil, 26, 28, 30, 32, 34, 23, 24, 27,
|
52
|
+
29, 31, 33, 23, 24, nil, nil, nil, 22, nil,
|
53
|
+
26, 28, 30, 32, 34, nil, 26, 28, 30, 32,
|
54
|
+
34, 23, 24, 27, 29, 31, 33, nil, nil, nil,
|
55
|
+
nil, nil, 22, nil, 26, 28, 30, 32, 34, 23,
|
56
|
+
24, 27, 29, 31, 33, nil, nil, nil, nil, nil,
|
57
|
+
22, nil, 26, 28, 30, 32, 34 ]
|
57
58
|
|
58
59
|
racc_action_check = [
|
59
|
-
|
60
|
-
nil,
|
61
|
-
|
62
|
-
|
63
|
-
2, 2, 2, 2, 2, 2, 2, 2,
|
64
|
-
53, 53, 53, 53, 53, 53, 53, 53, 53,
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
16, 16, 16, 16, 16, 16, 16, 16,
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
23, 23, 23, 23,
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
27, 27,
|
79
|
-
28, 28, 28, 28, 28, 28,
|
80
|
-
|
81
|
-
|
82
|
-
30, 30,
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
44, 44, 44, 45, 45,
|
99
|
-
|
100
|
-
45,
|
101
|
-
|
102
|
-
|
103
|
-
|
60
|
+
34, 39, 35, 35, 35, 35, 35, 4, 3, 1,
|
61
|
+
nil, nil, 39, 34, 41, 34, 34, 34, 34, 34,
|
62
|
+
34, 34, 34, 34, 34, 2, nil, 41, 41, 41,
|
63
|
+
41, 41, 2, nil, nil, nil, nil, 53, 2, nil,
|
64
|
+
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
65
|
+
53, 33, 53, 53, 53, 53, 53, 53, 53, 53,
|
66
|
+
53, 53, nil, 32, 33, nil, 33, 33, 33, 33,
|
67
|
+
33, 33, 33, 33, 33, 33, 32, 16, 32, 32,
|
68
|
+
32, 32, 32, 32, 32, 32, 32, 32, nil, 19,
|
69
|
+
16, nil, 16, 16, 16, 16, 16, 16, 16, 16,
|
70
|
+
16, 16, 19, 21, 19, 19, 19, 19, 19, 19,
|
71
|
+
19, 19, 19, 19, nil, 22, 21, 21, 21, 21,
|
72
|
+
21, 21, 21, 21, 21, 21, 21, 21, 22, 23,
|
73
|
+
22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
|
74
|
+
nil, 24, 23, nil, 23, 23, 23, 23, 23, 23,
|
75
|
+
23, 23, 23, 23, 24, 26, 24, 24, 24, 24,
|
76
|
+
24, 24, 24, 24, 24, 24, nil, 27, 26, nil,
|
77
|
+
26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
|
78
|
+
27, 28, 27, 27, 27, 27, 27, 27, 27, 27,
|
79
|
+
27, 27, nil, 29, 28, nil, 28, 28, 28, 28,
|
80
|
+
28, 28, 28, 28, 28, 28, 29, 30, 29, 29,
|
81
|
+
29, 29, 29, 29, 29, 29, 29, 29, nil, 31,
|
82
|
+
30, nil, 30, 30, 30, 30, 30, 30, 30, 30,
|
83
|
+
30, 30, 31, nil, 31, 31, 31, 31, 31, 31,
|
84
|
+
31, 31, 31, 31, 36, 36, 36, 36, 36, 36,
|
85
|
+
nil, nil, nil, nil, nil, 36, nil, 36, 36, 36,
|
86
|
+
36, 36, nil, 36, 40, 40, 40, 40, 40, 40,
|
87
|
+
48, 48, 48, 48, nil, nil, nil, 40, 40, 40,
|
88
|
+
40, 40, nil, 48, 48, 48, 48, 48, 50, 50,
|
89
|
+
50, 50, nil, nil, nil, 9, 9, 9, 9, 9,
|
90
|
+
9, 50, 50, 50, 50, 50, 9, 9, 9, 9,
|
91
|
+
9, 9, 9, 38, 38, 38, 38, 38, 38, nil,
|
92
|
+
nil, nil, nil, nil, 38, nil, 38, 38, 38, 38,
|
93
|
+
38, 49, 49, 49, 49, 49, 49, nil, nil, nil,
|
94
|
+
nil, nil, 49, nil, 49, 49, 49, 49, 49, 51,
|
95
|
+
51, 51, 51, 51, 51, 42, nil, nil, nil, nil,
|
96
|
+
51, nil, 51, 51, 51, 51, 51, nil, 42, 42,
|
97
|
+
42, 42, 42, 43, 43, 43, 43, 43, 43, 44,
|
98
|
+
44, nil, nil, nil, 43, nil, 43, 43, 43, 43,
|
99
|
+
43, nil, 44, 44, 44, 44, 44, 45, 45, 45,
|
100
|
+
45, 45, 45, 46, 46, nil, nil, nil, 45, nil,
|
101
|
+
45, 45, 45, 45, 45, nil, 46, 46, 46, 46,
|
102
|
+
46, 47, 47, 47, 47, 47, 47, nil, nil, nil,
|
103
|
+
nil, nil, 47, nil, 47, 47, 47, 47, 47, 55,
|
104
|
+
55, 55, 55, 55, 55, nil, nil, nil, nil, nil,
|
105
|
+
55, nil, 55, 55, 55, 55, 55 ]
|
104
106
|
|
105
107
|
racc_action_pointer = [
|
106
|
-
nil, 9,
|
107
|
-
nil, nil, nil, nil, nil, nil,
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
108
|
+
nil, 9, 17, 8, -14, nil, nil, nil, nil, 292,
|
109
|
+
nil, nil, nil, nil, nil, nil, 69, nil, nil, 81,
|
110
|
+
nil, 95, 107, 121, 133, nil, 147, 159, 173, 185,
|
111
|
+
199, 211, 55, 43, -8, -14, 241, nil, 310, -21,
|
112
|
+
261, 11, 352, 370, 376, 394, 400, 418, 267, 328,
|
113
|
+
285, 346, nil, 29, nil, 436 ]
|
112
114
|
|
113
115
|
racc_action_default = [
|
114
|
-
-2, -
|
115
|
-
|
116
|
-
-
|
117
|
-
-
|
118
|
-
-9, -10, -11, -7, -12, -8, -13, -5, -14,
|
119
|
-
-15, -18, -
|
116
|
+
-2, -35, -1, -35, -20, -21, -22, -23, -4, -35,
|
117
|
+
-24, -17, -30, -25, -26, -27, -35, -28, -29, -35,
|
118
|
+
56, -35, -35, -35, -35, -3, -35, -35, -35, -35,
|
119
|
+
-35, -35, -35, -35, -35, -19, -35, -32, -33, -35,
|
120
|
+
-16, -9, -10, -11, -7, -12, -8, -13, -5, -14,
|
121
|
+
-6, -15, -18, -35, -31, -34 ]
|
120
122
|
|
121
123
|
racc_goto_table = [
|
122
|
-
|
123
|
-
nil, nil, nil, nil,
|
124
|
-
40, 41, nil,
|
125
|
-
49, 50,
|
124
|
+
9, 1, 2, 39, nil, nil, nil, nil, nil, nil,
|
125
|
+
nil, nil, nil, nil, 35, nil, nil, 36, nil, 38,
|
126
|
+
40, 41, 42, nil, 43, 44, 45, 46, 47, 48,
|
127
|
+
49, 50, 51, nil, nil, nil, nil, nil, nil, nil,
|
126
128
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
127
|
-
nil,
|
129
|
+
nil, 55 ]
|
128
130
|
|
129
131
|
racc_goto_check = [
|
130
132
|
3, 1, 2, 6, nil, nil, nil, nil, nil, nil,
|
131
|
-
nil, nil, nil, nil, 3, nil, 3, nil, 3,
|
132
|
-
3, 3, nil, 3, 3, 3, 3, 3, 3,
|
133
|
-
3, 3,
|
133
|
+
nil, nil, nil, nil, 3, nil, nil, 3, nil, 3,
|
134
|
+
3, 3, 3, nil, 3, 3, 3, 3, 3, 3,
|
135
|
+
3, 3, 3, nil, nil, nil, nil, nil, nil, nil,
|
134
136
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
135
137
|
nil, 3 ]
|
136
138
|
|
137
139
|
racc_goto_pointer = [
|
138
|
-
nil, 1, 2, -2, nil, nil, -
|
140
|
+
nil, 1, 2, -2, nil, nil, -18 ]
|
139
141
|
|
140
142
|
racc_goto_default = [
|
141
|
-
nil, nil, nil, nil,
|
143
|
+
nil, nil, nil, nil, 11, 12, nil ]
|
142
144
|
|
143
145
|
racc_reduce_table = [
|
144
146
|
0, 0, :racc_error,
|
145
|
-
1,
|
146
|
-
0,
|
147
|
-
3,
|
148
|
-
2,
|
149
|
-
3,
|
150
|
-
3,
|
151
|
-
3,
|
152
|
-
3,
|
153
|
-
3,
|
154
|
-
3,
|
155
|
-
3,
|
156
|
-
3,
|
157
|
-
3,
|
158
|
-
3,
|
159
|
-
3,
|
160
|
-
3,
|
161
|
-
1, 36, :_reduce_none,
|
162
|
-
3, 37, :_reduce_18,
|
163
|
-
2, 37, :_reduce_19,
|
147
|
+
1, 35, :_reduce_none,
|
148
|
+
0, 36, :_reduce_2,
|
149
|
+
3, 36, :_reduce_3,
|
150
|
+
2, 36, :_reduce_none,
|
151
|
+
3, 37, :_reduce_5,
|
152
|
+
3, 37, :_reduce_6,
|
153
|
+
3, 37, :_reduce_7,
|
154
|
+
3, 37, :_reduce_8,
|
155
|
+
3, 37, :_reduce_9,
|
156
|
+
3, 37, :_reduce_10,
|
157
|
+
3, 37, :_reduce_11,
|
158
|
+
3, 37, :_reduce_12,
|
159
|
+
3, 37, :_reduce_13,
|
160
|
+
3, 37, :_reduce_14,
|
161
|
+
3, 37, :_reduce_15,
|
162
|
+
3, 37, :_reduce_16,
|
164
163
|
1, 37, :_reduce_none,
|
165
|
-
|
166
|
-
|
167
|
-
1,
|
168
|
-
1,
|
169
|
-
1,
|
170
|
-
1,
|
171
|
-
1,
|
172
|
-
1,
|
173
|
-
1,
|
174
|
-
|
175
|
-
|
176
|
-
1,
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
164
|
+
3, 38, :_reduce_18,
|
165
|
+
2, 38, :_reduce_19,
|
166
|
+
1, 38, :_reduce_none,
|
167
|
+
1, 38, :_reduce_21,
|
168
|
+
1, 38, :_reduce_22,
|
169
|
+
1, 38, :_reduce_23,
|
170
|
+
1, 38, :_reduce_24,
|
171
|
+
1, 38, :_reduce_25,
|
172
|
+
1, 38, :_reduce_26,
|
173
|
+
1, 38, :_reduce_27,
|
174
|
+
1, 38, :_reduce_28,
|
175
|
+
1, 38, :_reduce_29,
|
176
|
+
1, 38, :_reduce_none,
|
177
|
+
4, 39, :_reduce_31,
|
178
|
+
3, 39, :_reduce_32,
|
179
|
+
1, 40, :_reduce_33,
|
180
|
+
3, 40, :_reduce_34 ]
|
181
|
+
|
182
|
+
racc_reduce_n = 35
|
183
|
+
|
184
|
+
racc_shift_n = 56
|
182
185
|
|
183
186
|
racc_token_table = {
|
184
187
|
false => 0,
|
@@ -211,11 +214,12 @@ racc_token_table = {
|
|
211
214
|
:REF3D => 27,
|
212
215
|
:RANGE2D => 28,
|
213
216
|
:RANGE3D => 29,
|
214
|
-
:
|
215
|
-
:
|
216
|
-
|
217
|
+
:NAME => 30,
|
218
|
+
:TRUE => 31,
|
219
|
+
:FALSE => 32,
|
220
|
+
"," => 33 }
|
217
221
|
|
218
|
-
racc_nt_base =
|
222
|
+
racc_nt_base = 34
|
219
223
|
|
220
224
|
racc_use_result_var = true
|
221
225
|
|
@@ -266,6 +270,7 @@ Racc_token_to_s_table = [
|
|
266
270
|
"REF3D",
|
267
271
|
"RANGE2D",
|
268
272
|
"RANGE3D",
|
273
|
+
"NAME",
|
269
274
|
"TRUE",
|
270
275
|
"FALSE",
|
271
276
|
"\",\"",
|
@@ -287,14 +292,14 @@ Racc_debug_parser = false
|
|
287
292
|
|
288
293
|
module_eval(<<'.,.,', 'excelformula.y', 20)
|
289
294
|
def _reduce_2(val, _values, result)
|
290
|
-
result = []
|
295
|
+
result = []
|
291
296
|
result
|
292
297
|
end
|
293
298
|
.,.,
|
294
299
|
|
295
300
|
module_eval(<<'.,.,', 'excelformula.y', 21)
|
296
301
|
def _reduce_3(val, _values, result)
|
297
|
-
result.push val[1], '_arg', '1'
|
302
|
+
result.push val[1], '_arg', '1'
|
298
303
|
result
|
299
304
|
end
|
300
305
|
.,.,
|
@@ -303,84 +308,84 @@ module_eval(<<'.,.,', 'excelformula.y', 21)
|
|
303
308
|
|
304
309
|
module_eval(<<'.,.,', 'excelformula.y', 24)
|
305
310
|
def _reduce_5(val, _values, result)
|
306
|
-
result = [ val[0], val[2], 'ptgAdd' ]
|
311
|
+
result = [ val[0], val[2], 'ptgAdd' ]
|
307
312
|
result
|
308
313
|
end
|
309
314
|
.,.,
|
310
315
|
|
311
316
|
module_eval(<<'.,.,', 'excelformula.y', 25)
|
312
317
|
def _reduce_6(val, _values, result)
|
313
|
-
result = [ val[0], val[2], 'ptgSub' ]
|
318
|
+
result = [ val[0], val[2], 'ptgSub' ]
|
314
319
|
result
|
315
320
|
end
|
316
321
|
.,.,
|
317
322
|
|
318
323
|
module_eval(<<'.,.,', 'excelformula.y', 26)
|
319
324
|
def _reduce_7(val, _values, result)
|
320
|
-
result = [ val[0], val[2], 'ptgMul' ]
|
325
|
+
result = [ val[0], val[2], 'ptgMul' ]
|
321
326
|
result
|
322
327
|
end
|
323
328
|
.,.,
|
324
329
|
|
325
330
|
module_eval(<<'.,.,', 'excelformula.y', 27)
|
326
331
|
def _reduce_8(val, _values, result)
|
327
|
-
result = [ val[0], val[2], 'ptgDiv' ]
|
332
|
+
result = [ val[0], val[2], 'ptgDiv' ]
|
328
333
|
result
|
329
334
|
end
|
330
335
|
.,.,
|
331
336
|
|
332
337
|
module_eval(<<'.,.,', 'excelformula.y', 28)
|
333
338
|
def _reduce_9(val, _values, result)
|
334
|
-
result = [ val[0], val[2], 'ptgPower' ]
|
339
|
+
result = [ val[0], val[2], 'ptgPower' ]
|
335
340
|
result
|
336
341
|
end
|
337
342
|
.,.,
|
338
343
|
|
339
344
|
module_eval(<<'.,.,', 'excelformula.y', 29)
|
340
345
|
def _reduce_10(val, _values, result)
|
341
|
-
result = [ val[0], val[2], 'ptgConcat' ]
|
346
|
+
result = [ val[0], val[2], 'ptgConcat' ]
|
342
347
|
result
|
343
348
|
end
|
344
349
|
.,.,
|
345
350
|
|
346
351
|
module_eval(<<'.,.,', 'excelformula.y', 30)
|
347
352
|
def _reduce_11(val, _values, result)
|
348
|
-
result = [ val[0], val[2], 'ptgLT' ]
|
353
|
+
result = [ val[0], val[2], 'ptgLT' ]
|
349
354
|
result
|
350
355
|
end
|
351
356
|
.,.,
|
352
357
|
|
353
358
|
module_eval(<<'.,.,', 'excelformula.y', 31)
|
354
359
|
def _reduce_12(val, _values, result)
|
355
|
-
result = [ val[0], val[2], 'ptgGT' ]
|
360
|
+
result = [ val[0], val[2], 'ptgGT' ]
|
356
361
|
result
|
357
362
|
end
|
358
363
|
.,.,
|
359
364
|
|
360
365
|
module_eval(<<'.,.,', 'excelformula.y', 32)
|
361
366
|
def _reduce_13(val, _values, result)
|
362
|
-
result = [ val[0], val[2], 'ptgLE' ]
|
367
|
+
result = [ val[0], val[2], 'ptgLE' ]
|
363
368
|
result
|
364
369
|
end
|
365
370
|
.,.,
|
366
371
|
|
367
372
|
module_eval(<<'.,.,', 'excelformula.y', 33)
|
368
373
|
def _reduce_14(val, _values, result)
|
369
|
-
result = [ val[0], val[2], 'ptgGE' ]
|
374
|
+
result = [ val[0], val[2], 'ptgGE' ]
|
370
375
|
result
|
371
376
|
end
|
372
377
|
.,.,
|
373
378
|
|
374
379
|
module_eval(<<'.,.,', 'excelformula.y', 34)
|
375
380
|
def _reduce_15(val, _values, result)
|
376
|
-
result = [ val[0], val[2], 'ptgNE' ]
|
381
|
+
result = [ val[0], val[2], 'ptgNE' ]
|
377
382
|
result
|
378
383
|
end
|
379
384
|
.,.,
|
380
385
|
|
381
386
|
module_eval(<<'.,.,', 'excelformula.y', 35)
|
382
387
|
def _reduce_16(val, _values, result)
|
383
|
-
result = [ val[0], val[2], 'ptgEQ' ]
|
388
|
+
result = [ val[0], val[2], 'ptgEQ' ]
|
384
389
|
result
|
385
390
|
end
|
386
391
|
.,.,
|
@@ -389,14 +394,14 @@ module_eval(<<'.,.,', 'excelformula.y', 35)
|
|
389
394
|
|
390
395
|
module_eval(<<'.,.,', 'excelformula.y', 38)
|
391
396
|
def _reduce_18(val, _values, result)
|
392
|
-
result = [ val[1], '_arg', '1', 'ptgParen']
|
397
|
+
result = [ val[1], '_arg', '1', 'ptgParen']
|
393
398
|
result
|
394
399
|
end
|
395
400
|
.,.,
|
396
401
|
|
397
402
|
module_eval(<<'.,.,', 'excelformula.y', 39)
|
398
403
|
def _reduce_19(val, _values, result)
|
399
|
-
result = [ '_num', '-1', val[1], 'ptgMul' ]
|
404
|
+
result = [ '_num', '-1', val[1], 'ptgMul' ]
|
400
405
|
result
|
401
406
|
end
|
402
407
|
.,.,
|
@@ -405,100 +410,108 @@ module_eval(<<'.,.,', 'excelformula.y', 39)
|
|
405
410
|
|
406
411
|
module_eval(<<'.,.,', 'excelformula.y', 41)
|
407
412
|
def _reduce_21(val, _values, result)
|
408
|
-
result = [ '_num', val[0] ]
|
413
|
+
result = [ '_num', val[0] ]
|
409
414
|
result
|
410
415
|
end
|
411
416
|
.,.,
|
412
417
|
|
413
418
|
module_eval(<<'.,.,', 'excelformula.y', 42)
|
414
419
|
def _reduce_22(val, _values, result)
|
415
|
-
result = [ '_str', val[0] ]
|
420
|
+
result = [ '_str', val[0] ]
|
416
421
|
result
|
417
422
|
end
|
418
423
|
.,.,
|
419
424
|
|
420
425
|
module_eval(<<'.,.,', 'excelformula.y', 43)
|
421
426
|
def _reduce_23(val, _values, result)
|
422
|
-
result = [ '_ref2d', val[0] ]
|
427
|
+
result = [ '_ref2d', val[0] ]
|
423
428
|
result
|
424
429
|
end
|
425
430
|
.,.,
|
426
431
|
|
427
432
|
module_eval(<<'.,.,', 'excelformula.y', 44)
|
428
433
|
def _reduce_24(val, _values, result)
|
429
|
-
result = [ '_ref3d', val[0] ]
|
434
|
+
result = [ '_ref3d', val[0] ]
|
430
435
|
result
|
431
436
|
end
|
432
437
|
.,.,
|
433
438
|
|
434
439
|
module_eval(<<'.,.,', 'excelformula.y', 45)
|
435
440
|
def _reduce_25(val, _values, result)
|
436
|
-
result = [ '_range2d', val[0] ]
|
441
|
+
result = [ '_range2d', val[0] ]
|
437
442
|
result
|
438
443
|
end
|
439
444
|
.,.,
|
440
445
|
|
441
446
|
module_eval(<<'.,.,', 'excelformula.y', 46)
|
442
447
|
def _reduce_26(val, _values, result)
|
443
|
-
result = [ '_range3d', val[0] ]
|
448
|
+
result = [ '_range3d', val[0] ]
|
444
449
|
result
|
445
450
|
end
|
446
451
|
.,.,
|
447
452
|
|
448
453
|
module_eval(<<'.,.,', 'excelformula.y', 47)
|
449
454
|
def _reduce_27(val, _values, result)
|
450
|
-
result = [ '
|
455
|
+
result = [ '_name', val[0] ]
|
451
456
|
result
|
452
457
|
end
|
453
458
|
.,.,
|
454
459
|
|
455
460
|
module_eval(<<'.,.,', 'excelformula.y', 48)
|
456
461
|
def _reduce_28(val, _values, result)
|
457
|
-
result = [ 'ptgBool', '
|
462
|
+
result = [ 'ptgBool', '1' ]
|
458
463
|
result
|
459
464
|
end
|
460
465
|
.,.,
|
461
466
|
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
def _reduce_30(val, _values, result)
|
466
|
-
result = [ '_class', val[0], val[2], '_arg', val[2].size.to_s, '_func', val[0] ]
|
467
|
+
module_eval(<<'.,.,', 'excelformula.y', 49)
|
468
|
+
def _reduce_29(val, _values, result)
|
469
|
+
result = [ 'ptgBool', '0' ]
|
467
470
|
result
|
468
471
|
end
|
469
472
|
.,.,
|
470
473
|
|
474
|
+
# reduce 30 omitted
|
475
|
+
|
471
476
|
module_eval(<<'.,.,', 'excelformula.y', 52)
|
472
477
|
def _reduce_31(val, _values, result)
|
473
|
-
result = [ '_func', val[0] ]
|
478
|
+
result = [ '_class', val[0], val[2], '_arg', val[2].size.to_s, '_func', val[0] ]
|
474
479
|
result
|
475
480
|
end
|
476
481
|
.,.,
|
477
482
|
|
478
|
-
module_eval(<<'.,.,', 'excelformula.y',
|
483
|
+
module_eval(<<'.,.,', 'excelformula.y', 53)
|
479
484
|
def _reduce_32(val, _values, result)
|
480
|
-
result = val
|
485
|
+
result = [ '_func', val[0] ]
|
481
486
|
result
|
482
487
|
end
|
483
488
|
.,.,
|
484
489
|
|
485
490
|
module_eval(<<'.,.,', 'excelformula.y', 55)
|
486
491
|
def _reduce_33(val, _values, result)
|
487
|
-
result
|
492
|
+
result = val
|
488
493
|
result
|
489
494
|
end
|
490
495
|
.,.,
|
491
496
|
|
492
|
-
|
493
|
-
val
|
494
|
-
|
497
|
+
module_eval(<<'.,.,', 'excelformula.y', 56)
|
498
|
+
def _reduce_34(val, _values, result)
|
499
|
+
result.push val[2]
|
500
|
+
result
|
501
|
+
end
|
502
|
+
.,.,
|
503
|
+
|
504
|
+
def _reduce_none(val, _values, result)
|
505
|
+
val[0]
|
506
|
+
end
|
495
507
|
|
496
508
|
end # class ExcelFormulaParser
|
497
509
|
|
498
510
|
|
499
|
-
class ExcelFormulaParserError < StandardError
|
511
|
+
class ExcelFormulaParserError < StandardError #:nodoc:
|
512
|
+
end
|
500
513
|
|
501
|
-
class Node
|
514
|
+
class Node # :nodoc:
|
502
515
|
|
503
516
|
def exec_list(nodes)
|
504
517
|
v = nil
|
@@ -513,7 +526,7 @@ class Node
|
|
513
526
|
|
514
527
|
end
|
515
528
|
|
516
|
-
class RootNode < Node
|
529
|
+
class RootNode < Node # :nodoc:
|
517
530
|
|
518
531
|
def initialize(tree)
|
519
532
|
@tree = tree
|
@@ -526,7 +539,7 @@ class RootNode < Node
|
|
526
539
|
end
|
527
540
|
|
528
541
|
|
529
|
-
class FuncallNode < Node
|
542
|
+
class FuncallNode < Node # :nodoc:
|
530
543
|
|
531
544
|
def initialize(func, args)
|
532
545
|
@func = func
|
@@ -543,7 +556,7 @@ class FuncallNode < Node
|
|
543
556
|
|
544
557
|
end
|
545
558
|
|
546
|
-
class NumberNode < Node
|
559
|
+
class NumberNode < Node # :nodoc:
|
547
560
|
|
548
561
|
def initialize(val)
|
549
562
|
@val = val
|
@@ -555,7 +568,7 @@ class NumberNode < Node
|
|
555
568
|
|
556
569
|
end
|
557
570
|
|
558
|
-
class OperateNode < Node
|
571
|
+
class OperateNode < Node # :nodoc:
|
559
572
|
|
560
573
|
def initialize(op, left, right)
|
561
574
|
@op = op
|