smf 0.15.12 → 0.15.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/MANUAL.rd CHANGED
@@ -111,6 +111,7 @@ Enumerable
111
111
 
112
112
  nil �����Ǥ�̵�뤵��ޤ���
113
113
 
114
+ : join
114
115
  : join!
115
116
  �ȥ�å���ҤȤĤˤ��ޤ���
116
117
  EOT �ϡ����ե��åȤ���äȤ��礭�ʤ�Τ����Ѥ���ޤ���
data/README CHANGED
@@ -1,33 +1,33 @@
1
- SMF �⥸�塼��
1
+ SMF モジュール
2
2
  ==============
3
3
 
4
- SMF �ϥ��֥������Ȼظ�������ץȸ��� Ruby �Τ���Ρ��֥����������MIDI��
5
- ������ץ⥸�塼��Ǥ���
4
+ SMF はオブジェクト指向スクリプト言語 Ruby のための、「スタンダードMIDI
5
+ ファイル」モジュールです。
6
6
 
7
7
 
8
- ���󥹥ȡ���
8
+ インストール
9
9
  ------------
10
10
 
11
- ������ץ� "install.rb" ��Ĥ����ޤ���
11
+ スクリプト "install.rb" をつかいます。
12
12
 
13
13
  $ ruby install.rb config
14
14
  $ ruby install.rb setup
15
15
  ($ su)
16
16
  # ruby install.rb install
17
17
 
18
- ���路���ϡ�"ruby install.rb --help" �Ȥ��Ƥ���������
18
+ くわしくは、"ruby install.rb --help" としてください。
19
19
 
20
20
 
21
- ����ʸ��
21
+ 参考文献
22
22
  --------
23
23
 
24
- MIDI ���ʶ��IJ��MIDI 1.0 ���ʡץ�åȡ��ߥ塼���å� 1989
24
+ MIDI 規格協議会「MIDI 1.0 規格」リットーミュージック 1989
25
25
 
26
- �����Żһ��ȶ����MIDI 1.0 ���ʽ�ץ�åȡ��ߥ塼���å� 1998
26
+ 音楽電子事業協会「MIDI 1.0 規格書」リットーミュージック 1998
27
27
 
28
- JIS X 6054-1,2:1999 �Żҳڴ�ǥ������륤�󥿡��ե����� (MIDI)
28
+ JIS X 6054-1,2:1999 電子楽器ディジタルインターフェイス (MIDI)
29
29
 
30
30
 
31
- ������� (�դʤФ����褷)
31
+ ふなばただよし
32
32
  mailto:tadf@funaba.org
33
33
  http://www.funaba.org/
data/README.en CHANGED
@@ -1,12 +1,12 @@
1
1
  An "SMF" module
2
- ==============
2
+ ===============
3
3
 
4
- SMF is a "Standard MIDI File" module for an objectoriented
5
- scripting language Ruby.
4
+ SMF is a "Standard MIDI File" module for an object-oriented scripting
5
+ language Ruby.
6
6
 
7
7
 
8
8
  Install
9
- ‐‐‐‐‐‐‐
9
+ -------
10
10
 
11
11
  Use the script "install.rb".
12
12
 
@@ -15,19 +15,19 @@ Use the script "install.rb".
15
15
  ($ su)
16
16
  # ruby install.rb install
17
17
 
18
- For more information, type "ruby install.rb ‐‐help".
18
+ For more information, type "ruby install.rb --help".
19
19
 
20
20
 
21
21
  References
22
- ‐‐‐‐‐‐‐‐‐‐
22
+ ----------
23
23
 
24
- MIDI kikaku kyogi‐kai, MIDI 1.0 kikaku, rittor music 1989
24
+ MIDI Kikaku Kyōgi-kai, MIDI 1.0 Kikaku, rittor music 1989
25
25
 
26
- ongaku denshi jigyo kyokai, MIDI 1.0 kikaku‐sho, rittor music 1998
26
+ Ongaku Denshi Jigyō Kyōkai, MIDI 1.0 Kikaku-sho, Rittor Music 1998
27
27
 
28
- JIS X 60541,2:1999 Musical Instrument Digital Interface (MIDI)
28
+ JIS X 6054-1,2:1999 Musical Instrument Digital Interface (MIDI)
29
29
 
30
30
 
31
31
  Tadayoshi Funaba
32
32
  mailto:tadf@funaba.org
33
- http://www.funaba.org/en/
33
+ http://www.funaba.org/
data/lib/smf.rb CHANGED
@@ -1,5 +1,5 @@
1
- # smf.rb: Written by Tadayoshi Funaba 1998-2006,2008
2
- # $Id: smf.rb,v 1.39 2008-07-06 00:00:43+09 tadf Exp $
1
+ # smf.rb: Written by Tadayoshi Funaba 1998-2006,2008,2012,2014
2
+ # $Id: smf.rb,v 1.41 2014-04-27 08:44:26+09 tadf Exp $
3
3
 
4
4
  require 'smf/io'
5
5
  require 'forwardable'
@@ -31,6 +31,8 @@ module SMF
31
31
 
32
32
  def ntrks() @arr.count{|x| x} end
33
33
 
34
+ alias_method :nitems, :ntrks
35
+
34
36
  else
35
37
 
36
38
  def ntrks() @arr.nitems end
@@ -131,6 +133,8 @@ module SMF
131
133
 
132
134
  def nevts() @arr.count{|x| x} end
133
135
 
136
+ alias_method :nitems, :nevts
137
+
134
138
  else
135
139
 
136
140
  def nevts() @arr.nitems end
@@ -467,7 +471,7 @@ module SMF
467
471
 
468
472
  end
469
473
  end;
470
- end
474
+ end # <<"x"
471
475
 
472
476
  [ 'LocalControl', # val:0/127
473
477
  'MonoMode', # val:0/16
@@ -584,7 +588,7 @@ module SMF
584
588
 
585
589
  end
586
590
  end;
587
- end
591
+ end # <<"x"
588
592
 
589
593
  Text01 = GeneralPurposeText
590
594
  Text02 = CopyrightNotice
@@ -1,8 +1,8 @@
1
- # beatmap.rb: Written by Tadayoshi Funaba 2005,2006
2
- # $Id: beatmap.rb,v 1.3 2006-11-10 21:58:21+09 tadf Exp $
1
+ # beatmap.rb: Written by Tadayoshi Funaba 2005,2006,2014
2
+ # $Id: beatmap.rb,v 1.4 2014-04-27 08:46:58+09 tadf Exp $
3
3
 
4
4
  require 'smf/toy/searchsegment'
5
- require 'rational'
5
+ require 'rational' unless defined?(Rational)
6
6
 
7
7
  module SMF
8
8
 
@@ -1,5 +1,5 @@
1
- # gm.rb: Written by Tadayoshi Funaba 2005
2
- # $Id: gm.rb,v 1.2 2005-07-17 17:07:37+09 tadf Exp $
1
+ # gm.rb: Written by Tadayoshi Funaba 2005,2012
2
+ # $Id: gm.rb,v 1.3 2014-03-22 07:48:58+09 tadf Exp $
3
3
 
4
4
  module SMF
5
5
 
@@ -9,14 +9,14 @@ module SMF
9
9
  ['DataEntryMSB', 6],
10
10
  ['ChannelVolumeMSB', 7],
11
11
  ['PanMSB', 10],
12
- ['ExpressioMSB', 11],
12
+ ['ExpressionMSB', 11],
13
13
  ['BankSelectLSB', 32 + 0],
14
14
  ['ModulationDepthLSB', 32 + 1],
15
15
  ['PortamentoTimeLSB', 32 + 5],
16
16
  ['DataEntryLSB', 32 + 6],
17
17
  ['ChannelVolumeLSB', 32 + 7],
18
18
  ['PanLSB', 32 + 10],
19
- ['ExpressioLSB', 32 + 11],
19
+ ['ExpressionLSB', 32 + 11],
20
20
  ['Hold1', 64],
21
21
  ['PortamentoOnOff', 65],
22
22
  ['Sostenuto', 66],
@@ -44,7 +44,7 @@ module SMF
44
44
 
45
45
  end
46
46
  end;
47
- end
47
+ end # <<"x"
48
48
 
49
49
  [ ['PitchBendSensitivity', 0, 0],
50
50
  ['ChannelFineTune', 1, 0],
@@ -69,7 +69,7 @@ module SMF
69
69
 
70
70
  end
71
71
  end;
72
- end
72
+ end # <<"x"
73
73
 
74
74
  class MasterVolume < ExclusiveF0
75
75
 
@@ -1,5 +1,5 @@
1
- # groove.rb: Written by Tadayoshi Funaba 2005,2006,2008
2
- # $Id: groove.rb,v 1.3 2008-02-16 16:56:21+09 tadf Exp $
1
+ # groove.rb: Written by Tadayoshi Funaba 2005,2006,2008,2014
2
+ # $Id: groove.rb,v 1.4 2014-03-22 07:48:58+09 tadf Exp $
3
3
 
4
4
  require 'gsl'
5
5
 
@@ -14,9 +14,9 @@ module SMF
14
14
  x << @unit / (pat.size - 1) * i
15
15
  y << p * div * 4
16
16
  end
17
- @x = GSL::Vector.alloc(x)
18
- @y = GSL::Vector.alloc(y)
19
- @interp = GSL::Interp.alloc('linear', pat.size)
17
+ x2 = GSL::Vector.alloc(x)
18
+ y2 = GSL::Vector.alloc(y)
19
+ @spline = GSL::Spline.alloc('linear', x2, y2)
20
20
  self.amount = 0.5
21
21
  end
22
22
 
@@ -24,7 +24,7 @@ module SMF
24
24
 
25
25
  def groove(ev)
26
26
  q, r = ev.offset.divmod(@unit)
27
- r2 = @interp.eval(@x, @y, r)
27
+ r2 = @spline.eval(r)
28
28
  r3 = r + (r2 - r) * @amount
29
29
  ev.offset = (q * @unit + r3).round
30
30
  end
@@ -1,9 +1,9 @@
1
- # macro.rb: Written by Tadayoshi Funaba 1999-2006
2
- # $Id: macro.rb,v 1.5 2006-11-10 21:58:21+09 tadf Exp $
1
+ # macro.rb: Written by Tadayoshi Funaba 1999-2006,2012,2014
2
+ # $Id: macro.rb,v 1.7 2014-04-27 08:46:58+09 tadf Exp $
3
3
 
4
4
  require 'smf'
5
5
  require 'smf/toy/gm'
6
- require 'rational'
6
+ require 'rational' unless defined?(Rational)
7
7
 
8
8
  module SMF
9
9
 
@@ -95,8 +95,8 @@ module SMF
95
95
  ke[sf] = [0] * 12
96
96
  d = if sf < 0 then -1 else +1 end
97
97
  b = if d == 1 then 5 else 11 end
98
- sf.to_i.abs.times do |i|
99
- n = (b + 7 * i * d) % 12
98
+ sf.to_i.abs.times do |j|
99
+ n = (b + 7 * j * d) % 12
100
100
  ke[sf][n] += d
101
101
  end
102
102
  end
@@ -1,25 +1,22 @@
1
1
  #
2
2
  # DO NOT MODIFY!!!!
3
- # This file is automatically generated by racc 1.4.5
4
- # from racc grammer file "parser.ry".
3
+ # This file is automatically generated by Racc 1.4.11
4
+ # from Racc grammer file "".
5
5
  #
6
6
 
7
- require 'racc/parser'
8
-
7
+ require 'racc/parser.rb'
9
8
 
10
9
 
11
10
  require 'smf'
12
11
  require 'smf/toy/macro'
13
- require 'rational'
12
+ require 'rational' unless defined?(Rational)
14
13
 
15
14
  class SemanticError < StandardError; end
16
15
 
17
-
18
16
  module SMF
19
-
20
17
  class MMLParser < Racc::Parser
21
18
 
22
- module_eval <<'..end parser.ry modeval..id74aaf71953', 'parser.ry', 66
19
+ module_eval(<<'...end parser.ry/module_eval...', 'parser.ry', 66)
23
20
 
24
21
  STEPTAB = { 'w'=>1.to_r/1, 'h'=>1.to_r/2,
25
22
  'q'=>1.to_r/4, 'i'=>1.to_r/8,
@@ -38,7 +35,7 @@ module_eval <<'..end parser.ry modeval..id74aaf71953', 'parser.ry', 66
38
35
 
39
36
  def next_token
40
37
  loop do
41
- @str = @str.sub(/\A([\s\v]+)/, '')
38
+ @str = @str.sub(/\A(\s+)/, '')
42
39
  if $1
43
40
  @co += $1.count("\n")
44
41
  end
@@ -116,355 +113,353 @@ module_eval <<'..end parser.ry modeval..id74aaf71953', 'parser.ry', 66
116
113
  end
117
114
  end
118
115
 
119
- ..end parser.ry modeval..id74aaf71953
120
-
121
- ##### racc 1.4.5 generates ###
122
-
123
- racc_reduce_table = [
124
- 0, 0, :racc_error,
125
- 1, 20, :_reduce_1,
126
- 0, 21, :_reduce_2,
127
- 2, 21, :_reduce_3,
128
- 1, 22, :_reduce_4,
129
- 2, 22, :_reduce_5,
130
- 1, 23, :_reduce_6,
131
- 1, 23, :_reduce_none,
132
- 1, 23, :_reduce_none,
133
- 1, 23, :_reduce_none,
134
- 3, 23, :_reduce_10,
135
- 1, 25, :_reduce_11,
136
- 1, 26, :_reduce_12,
137
- 3, 27, :_reduce_13,
138
- 5, 27, :_reduce_14,
139
- 3, 24, :_reduce_15,
140
- 3, 24, :_reduce_16,
141
- 3, 24, :_reduce_17,
142
- 3, 24, :_reduce_18,
143
- 3, 24, :_reduce_19,
144
- 1, 24, :_reduce_20,
145
- 3, 28, :_reduce_21,
146
- 3, 28, :_reduce_22,
147
- 3, 28, :_reduce_23,
148
- 3, 28, :_reduce_24,
149
- 2, 28, :_reduce_25,
150
- 3, 28, :_reduce_26,
151
- 1, 28, :_reduce_27 ]
152
-
153
- racc_reduce_n = 28
154
-
155
- racc_shift_n = 48
116
+ ...end parser.ry/module_eval...
117
+ ##### State transition tables begin ###
156
118
 
157
119
  racc_action_table = [
158
- 19, 20, 21, 22, 37, 39, 40, 41, 18, 26,
159
- 26, 26, 10, 33, 13, 26, 26, 42, 25, 25,
160
- 25, 28, 28, 28, 25, 25, 26, 28, 28, 17,
161
- 26, 26, 26, 37, 39, 25, 26, 16, 28, 25,
162
- 25, 25, 28, 28, 28, 25, 19, 20, 28, 37,
163
- 39, 40, 41, 3, 14, 34, 15, 4, 6, nil,
164
- 38, 10, 14, 13, 15, 4, 6, nil, 10, 10,
165
- 13, 13, 37, 39, 40, 41, 19, 20, 21, 22,
166
- 10, nil, 13, 19, 20, 37, 39 ]
120
+ 20, 21, 18, 19, 37, 38, 35, 36, 23, 28,
121
+ 28, 28, 14, 34, 15, 28, 28, 46, 29, 29,
122
+ 29, 30, 30, 30, 29, 29, 28, 30, 30, 17,
123
+ 28, 28, 28, 37, 38, 29, 28, 16, 30, 29,
124
+ 29, 29, 30, 30, 30, 29, 37, 38, 30, 37,
125
+ 38, 35, 36, 14, 10, 15, 11, 12, 13, 3,
126
+ 41, 14, nil, 15, 10, 32, 11, 12, 13, nil,
127
+ 14, 14, 15, 15, 37, 38, 35, 36, 20, 21,
128
+ 18, 19, 20, 21, 20, 21 ]
167
129
 
168
130
  racc_action_check = [
169
- 23, 23, 23, 23, 35, 35, 35, 35, 7, 26,
170
- 38, 41, 10, 23, 10, 37, 40, 35, 26, 38,
171
- 41, 26, 38, 41, 37, 40, 17, 37, 40, 6,
172
- 19, 20, 25, 46, 46, 17, 39, 3, 17, 19,
173
- 20, 25, 19, 20, 25, 39, 32, 32, 39, 27,
174
- 27, 27, 27, 1, 24, 24, 24, 24, 24, nil,
175
- 27, 24, 2, 24, 2, 2, 2, nil, 21, 2,
176
- 21, 2, 44, 44, 44, 44, 8, 8, 8, 8,
177
- 22, nil, 22, 31, 31, 47, 47 ]
131
+ 24, 24, 24, 24, 40, 40, 40, 40, 13, 29,
132
+ 36, 35, 18, 24, 18, 41, 38, 40, 29, 36,
133
+ 35, 29, 36, 35, 41, 38, 37, 41, 38, 5,
134
+ 23, 20, 21, 42, 42, 37, 28, 3, 37, 23,
135
+ 20, 21, 23, 20, 21, 28, 43, 43, 28, 33,
136
+ 33, 33, 33, 14, 2, 14, 2, 2, 2, 1,
137
+ 33, 2, nil, 2, 22, 22, 22, 22, 22, nil,
138
+ 19, 22, 19, 22, 47, 47, 47, 47, 6, 6,
139
+ 6, 6, 26, 26, 25, 25 ]
178
140
 
179
141
  racc_action_pointer = [
180
- nil, 53, 54, 37, nil, nil, 16, 1, 73, nil,
181
- -3, nil, nil, nil, nil, nil, nil, 20, nil, 24,
182
- 25, 53, 65, -3, 46, 26, 3, 46, nil, nil,
183
- nil, 80, 43, nil, nil, 1, nil, 9, 4, 30,
184
- 10, 5, nil, nil, 69, nil, 30, 82 ]
142
+ nil, 59, 46, 37, nil, 22, 75, nil, nil, nil,
143
+ nil, nil, nil, -5, 38, nil, nil, nil, -3, 55,
144
+ 25, 26, 56, 24, -3, 81, 79, nil, 30, 3,
145
+ nil, nil, nil, 46, nil, 5, 4, 20, 10, nil,
146
+ 1, 9, 30, 43, nil, nil, nil, 71 ]
185
147
 
186
148
  racc_action_default = [
187
- -2, -28, -1, -28, -12, -3, -28, -4, -6, -7,
188
- -28, -8, -9, -20, -2, -11, 48, -28, -5, -28,
189
- -28, -28, -28, -28, -28, -28, -28, -13, -27, -17,
190
- -18, -15, -16, -19, -10, -28, -25, -28, -28, -28,
191
- -28, -28, -26, -23, -14, -24, -21, -22 ]
149
+ -2, -28, -1, -28, -3, -4, -6, -7, -8, -9,
150
+ -2, -11, -12, -28, -28, -20, 48, -5, -28, -28,
151
+ -28, -28, -28, -28, -28, -15, -16, -17, -28, -28,
152
+ -27, -18, -10, -13, -19, -28, -28, -28, -28, -25,
153
+ -28, -28, -21, -22, -23, -24, -26, -14 ]
192
154
 
193
155
  racc_goto_table = [
194
- 27, 2, 29, 30, 1, 23, nil, nil, 35, 36,
195
- nil, nil, nil, nil, nil, 24, 31, 32, nil, nil,
196
- 43, 44, 45, 46, 47 ]
156
+ 27, 31, 2, 33, 1, nil, 24, nil, 39, 40,
157
+ 25, 26, 22, nil, nil, 42, 43, 44, 45, nil,
158
+ nil, 47 ]
197
159
 
198
160
  racc_goto_check = [
199
- 9, 2, 9, 9, 1, 5, nil, nil, 9, 9,
200
- nil, nil, nil, nil, nil, 2, 5, 5, nil, nil,
201
- 9, 9, 9, 9, 9 ]
161
+ 9, 9, 2, 9, 1, nil, 5, nil, 9, 9,
162
+ 5, 5, 2, nil, nil, 9, 9, 9, 9, nil,
163
+ nil, 9 ]
202
164
 
203
165
  racc_goto_pointer = [
204
- nil, 4, 1, nil, nil, -5, nil, nil, nil, -17 ]
166
+ nil, 4, 2, nil, nil, -8, nil, nil, nil, -20 ]
205
167
 
206
168
  racc_goto_default = [
207
- nil, nil, nil, 5, 7, 8, 9, 11, 12, nil ]
169
+ nil, nil, nil, 4, 5, 6, 7, 8, 9, nil ]
208
170
 
209
- racc_token_table = {
210
- false => 0,
211
- Object.new => 1,
212
- :UMINUS => 2,
213
- "*" => 3,
214
- "/" => 4,
215
- "+" => 5,
216
- "-" => 6,
217
- "&" => 7,
218
- "{" => 8,
219
- "}" => 9,
220
- :NOTE => 10,
221
- :TEXT => 11,
222
- :VAR => 12,
223
- :AOP => 13,
224
- "," => 14,
225
- "(" => 15,
226
- ")" => 16,
227
- :STEP => 17,
228
- :NUM => 18 }
171
+ racc_reduce_table = [
172
+ 0, 0, :racc_error,
173
+ 1, 20, :_reduce_1,
174
+ 0, 21, :_reduce_2,
175
+ 2, 21, :_reduce_3,
176
+ 1, 22, :_reduce_4,
177
+ 2, 22, :_reduce_5,
178
+ 1, 23, :_reduce_6,
179
+ 1, 23, :_reduce_none,
180
+ 1, 23, :_reduce_none,
181
+ 1, 23, :_reduce_none,
182
+ 3, 23, :_reduce_10,
183
+ 1, 25, :_reduce_11,
184
+ 1, 26, :_reduce_12,
185
+ 3, 27, :_reduce_13,
186
+ 5, 27, :_reduce_14,
187
+ 3, 24, :_reduce_15,
188
+ 3, 24, :_reduce_16,
189
+ 3, 24, :_reduce_17,
190
+ 3, 24, :_reduce_18,
191
+ 3, 24, :_reduce_19,
192
+ 1, 24, :_reduce_20,
193
+ 3, 28, :_reduce_21,
194
+ 3, 28, :_reduce_22,
195
+ 3, 28, :_reduce_23,
196
+ 3, 28, :_reduce_24,
197
+ 2, 28, :_reduce_25,
198
+ 3, 28, :_reduce_26,
199
+ 1, 28, :_reduce_27 ]
229
200
 
230
- racc_use_result_var = true
201
+ racc_reduce_n = 28
202
+
203
+ racc_shift_n = 48
204
+
205
+ racc_token_table = {
206
+ false => 0,
207
+ :error => 1,
208
+ :UMINUS => 2,
209
+ "*" => 3,
210
+ "/" => 4,
211
+ "+" => 5,
212
+ "-" => 6,
213
+ "&" => 7,
214
+ "{" => 8,
215
+ "}" => 9,
216
+ :NOTE => 10,
217
+ :TEXT => 11,
218
+ :VAR => 12,
219
+ :AOP => 13,
220
+ "," => 14,
221
+ "(" => 15,
222
+ ")" => 16,
223
+ :STEP => 17,
224
+ :NUM => 18 }
231
225
 
232
226
  racc_nt_base = 19
233
227
 
228
+ racc_use_result_var = true
229
+
234
230
  Racc_arg = [
235
- racc_action_table,
236
- racc_action_check,
237
- racc_action_default,
238
- racc_action_pointer,
239
- racc_goto_table,
240
- racc_goto_check,
241
- racc_goto_default,
242
- racc_goto_pointer,
243
- racc_nt_base,
244
- racc_reduce_table,
245
- racc_token_table,
246
- racc_shift_n,
247
- racc_reduce_n,
248
- racc_use_result_var ]
231
+ racc_action_table,
232
+ racc_action_check,
233
+ racc_action_default,
234
+ racc_action_pointer,
235
+ racc_goto_table,
236
+ racc_goto_check,
237
+ racc_goto_default,
238
+ racc_goto_pointer,
239
+ racc_nt_base,
240
+ racc_reduce_table,
241
+ racc_token_table,
242
+ racc_shift_n,
243
+ racc_reduce_n,
244
+ racc_use_result_var ]
249
245
 
250
246
  Racc_token_to_s_table = [
251
- '$end',
252
- 'error',
253
- 'UMINUS',
254
- '"*"',
255
- '"/"',
256
- '"+"',
257
- '"-"',
258
- '"&"',
259
- '"{"',
260
- '"}"',
261
- 'NOTE',
262
- 'TEXT',
263
- 'VAR',
264
- 'AOP',
265
- '","',
266
- '"("',
267
- '")"',
268
- 'STEP',
269
- 'NUM',
270
- '$start',
271
- 'prog',
272
- 'list',
273
- 'stmt',
274
- 'expr',
275
- 'step',
276
- 'note',
277
- 'text',
278
- 'asgn',
279
- 'num']
247
+ "$end",
248
+ "error",
249
+ "UMINUS",
250
+ "\"*\"",
251
+ "\"/\"",
252
+ "\"+\"",
253
+ "\"-\"",
254
+ "\"&\"",
255
+ "\"{\"",
256
+ "\"}\"",
257
+ "NOTE",
258
+ "TEXT",
259
+ "VAR",
260
+ "AOP",
261
+ "\",\"",
262
+ "\"(\"",
263
+ "\")\"",
264
+ "STEP",
265
+ "NUM",
266
+ "$start",
267
+ "prog",
268
+ "list",
269
+ "stmt",
270
+ "expr",
271
+ "step",
272
+ "note",
273
+ "text",
274
+ "asgn",
275
+ "num" ]
280
276
 
281
277
  Racc_debug_parser = false
282
278
 
283
- ##### racc system variables end #####
279
+ ##### State transition tables end #####
284
280
 
285
- # reduce 0 omitted
281
+ # reduce 0 omitted
286
282
 
287
- module_eval <<'.,.,', 'parser.ry', 13
288
- def _reduce_1( val, _values, result )
289
- result = val[0]
290
- result
283
+ module_eval(<<'.,.,', 'parser.ry', 13)
284
+ def _reduce_1(val, _values, result)
285
+ result = val[0]
286
+ result
291
287
  end
292
288
  .,.,
293
289
 
294
- module_eval <<'.,.,', 'parser.ry', 15
295
- def _reduce_2( val, _values, result )
296
- result = [:list, []]
297
- result
290
+ module_eval(<<'.,.,', 'parser.ry', 15)
291
+ def _reduce_2(val, _values, result)
292
+ result = [:list, []]
293
+ result
298
294
  end
299
295
  .,.,
300
296
 
301
- module_eval <<'.,.,', 'parser.ry', 16
302
- def _reduce_3( val, _values, result )
303
- val[0][1] << val[1]; result = val[0]
304
- result
297
+ module_eval(<<'.,.,', 'parser.ry', 16)
298
+ def _reduce_3(val, _values, result)
299
+ val[0][1] << val[1]; result = val[0]
300
+ result
305
301
  end
306
302
  .,.,
307
303
 
308
- module_eval <<'.,.,', 'parser.ry', 19
309
- def _reduce_4( val, _values, result )
310
- result = [:stmt, val[0]]
311
- result
304
+ module_eval(<<'.,.,', 'parser.ry', 19)
305
+ def _reduce_4(val, _values, result)
306
+ result = [:stmt, val[0]]
307
+ result
312
308
  end
313
309
  .,.,
314
310
 
315
- module_eval <<'.,.,', 'parser.ry', 20
316
- def _reduce_5( val, _values, result )
317
- result = [:stmt, val[0], val[1]]
318
- result
311
+ module_eval(<<'.,.,', 'parser.ry', 20)
312
+ def _reduce_5(val, _values, result)
313
+ result = [:stmt, val[0], val[1]]
314
+ result
319
315
  end
320
316
  .,.,
321
317
 
322
- module_eval <<'.,.,', 'parser.ry', 23
323
- def _reduce_6( val, _values, result )
324
- result = [:step, val[0]]
325
- result
318
+ module_eval(<<'.,.,', 'parser.ry', 23)
319
+ def _reduce_6(val, _values, result)
320
+ result = [:step, val[0]]
321
+ result
326
322
  end
327
323
  .,.,
328
324
 
329
- # reduce 7 omitted
325
+ # reduce 7 omitted
330
326
 
331
- # reduce 8 omitted
327
+ # reduce 8 omitted
332
328
 
333
- # reduce 9 omitted
329
+ # reduce 9 omitted
334
330
 
335
- module_eval <<'.,.,', 'parser.ry', 25
336
- def _reduce_10( val, _values, result )
337
- result = val[1]
338
- result
331
+ module_eval(<<'.,.,', 'parser.ry', 25)
332
+ def _reduce_10(val, _values, result)
333
+ result = val[1]
334
+ result
339
335
  end
340
336
  .,.,
341
337
 
342
- module_eval <<'.,.,', 'parser.ry', 28
343
- def _reduce_11( val, _values, result )
344
- result = [:note, val[0]]
345
- result
338
+ module_eval(<<'.,.,', 'parser.ry', 28)
339
+ def _reduce_11(val, _values, result)
340
+ result = [:note, val[0]]
341
+ result
346
342
  end
347
343
  .,.,
348
344
 
349
- module_eval <<'.,.,', 'parser.ry', 29
350
- def _reduce_12( val, _values, result )
351
- result = [:text, val[0]]
352
- result
345
+ module_eval(<<'.,.,', 'parser.ry', 29)
346
+ def _reduce_12(val, _values, result)
347
+ result = [:text, val[0]]
348
+ result
353
349
  end
354
350
  .,.,
355
351
 
356
- module_eval <<'.,.,', 'parser.ry', 32
357
- def _reduce_13( val, _values, result )
358
- result = [:asgn, val[0], val[1], val[2]]
359
- result
352
+ module_eval(<<'.,.,', 'parser.ry', 32)
353
+ def _reduce_13(val, _values, result)
354
+ result = [:asgn, val[0], val[1], val[2]]
355
+ result
360
356
  end
361
357
  .,.,
362
358
 
363
- module_eval <<'.,.,', 'parser.ry', 34
364
- def _reduce_14( val, _values, result )
365
- result = [:asgn, val[0], val[1], val[2], val[4]]
366
- result
359
+ module_eval(<<'.,.,', 'parser.ry', 34)
360
+ def _reduce_14(val, _values, result)
361
+ result = [:asgn, val[0], val[1], val[2], val[4]]
362
+ result
367
363
  end
368
364
  .,.,
369
365
 
370
- module_eval <<'.,.,', 'parser.ry', 37
371
- def _reduce_15( val, _values, result )
372
- result = [:add, val[0], val[2]]
373
- result
366
+ module_eval(<<'.,.,', 'parser.ry', 37)
367
+ def _reduce_15(val, _values, result)
368
+ result = [:add, val[0], val[2]]
369
+ result
374
370
  end
375
371
  .,.,
376
372
 
377
- module_eval <<'.,.,', 'parser.ry', 38
378
- def _reduce_16( val, _values, result )
379
- result = [:sub, val[0], val[2]]
380
- result
373
+ module_eval(<<'.,.,', 'parser.ry', 38)
374
+ def _reduce_16(val, _values, result)
375
+ result = [:sub, val[0], val[2]]
376
+ result
381
377
  end
382
378
  .,.,
383
379
 
384
- module_eval <<'.,.,', 'parser.ry', 39
385
- def _reduce_17( val, _values, result )
386
- result = [:mul, val[0], val[2]]
387
- result
380
+ module_eval(<<'.,.,', 'parser.ry', 39)
381
+ def _reduce_17(val, _values, result)
382
+ result = [:mul, val[0], val[2]]
383
+ result
388
384
  end
389
385
  .,.,
390
386
 
391
- module_eval <<'.,.,', 'parser.ry', 40
392
- def _reduce_18( val, _values, result )
393
- result = [:div, val[0], val[2]]
394
- result
387
+ module_eval(<<'.,.,', 'parser.ry', 40)
388
+ def _reduce_18(val, _values, result)
389
+ result = [:div, val[0], val[2]]
390
+ result
395
391
  end
396
392
  .,.,
397
393
 
398
- module_eval <<'.,.,', 'parser.ry', 41
399
- def _reduce_19( val, _values, result )
400
- result = val[1]
401
- result
394
+ module_eval(<<'.,.,', 'parser.ry', 41)
395
+ def _reduce_19(val, _values, result)
396
+ result = val[1]
397
+ result
402
398
  end
403
399
  .,.,
404
400
 
405
- module_eval <<'.,.,', 'parser.ry', 42
406
- def _reduce_20( val, _values, result )
407
- result = [:imm, val[0]]
408
- result
401
+ module_eval(<<'.,.,', 'parser.ry', 42)
402
+ def _reduce_20(val, _values, result)
403
+ result = [:imm, val[0]]
404
+ result
409
405
  end
410
406
  .,.,
411
407
 
412
- module_eval <<'.,.,', 'parser.ry', 45
413
- def _reduce_21( val, _values, result )
414
- result = [:add, val[0], val[2]]
415
- result
408
+ module_eval(<<'.,.,', 'parser.ry', 45)
409
+ def _reduce_21(val, _values, result)
410
+ result = [:add, val[0], val[2]]
411
+ result
416
412
  end
417
413
  .,.,
418
414
 
419
- module_eval <<'.,.,', 'parser.ry', 46
420
- def _reduce_22( val, _values, result )
421
- result = [:sub, val[0], val[2]]
422
- result
415
+ module_eval(<<'.,.,', 'parser.ry', 46)
416
+ def _reduce_22(val, _values, result)
417
+ result = [:sub, val[0], val[2]]
418
+ result
423
419
  end
424
420
  .,.,
425
421
 
426
- module_eval <<'.,.,', 'parser.ry', 47
427
- def _reduce_23( val, _values, result )
428
- result = [:mul, val[0], val[2]]
429
- result
422
+ module_eval(<<'.,.,', 'parser.ry', 47)
423
+ def _reduce_23(val, _values, result)
424
+ result = [:mul, val[0], val[2]]
425
+ result
430
426
  end
431
427
  .,.,
432
428
 
433
- module_eval <<'.,.,', 'parser.ry', 48
434
- def _reduce_24( val, _values, result )
435
- result = [:div, val[0], val[2]]
436
- result
429
+ module_eval(<<'.,.,', 'parser.ry', 48)
430
+ def _reduce_24(val, _values, result)
431
+ result = [:div, val[0], val[2]]
432
+ result
437
433
  end
438
434
  .,.,
439
435
 
440
- module_eval <<'.,.,', 'parser.ry', 49
441
- def _reduce_25( val, _values, result )
442
- result = [:negate, val[1]]
443
- result
436
+ module_eval(<<'.,.,', 'parser.ry', 49)
437
+ def _reduce_25(val, _values, result)
438
+ result = [:negate, val[1]]
439
+ result
444
440
  end
445
441
  .,.,
446
442
 
447
- module_eval <<'.,.,', 'parser.ry', 50
448
- def _reduce_26( val, _values, result )
449
- result = val[1]
450
- result
443
+ module_eval(<<'.,.,', 'parser.ry', 50)
444
+ def _reduce_26(val, _values, result)
445
+ result = val[1]
446
+ result
451
447
  end
452
448
  .,.,
453
449
 
454
- module_eval <<'.,.,', 'parser.ry', 51
455
- def _reduce_27( val, _values, result )
456
- result = [:imm, val[0]]
457
- result
450
+ module_eval(<<'.,.,', 'parser.ry', 51)
451
+ def _reduce_27(val, _values, result)
452
+ result = [:imm, val[0]]
453
+ result
458
454
  end
459
455
  .,.,
460
456
 
461
- def _reduce_none( val, _values, result )
462
- result
463
- end
457
+ def _reduce_none(val, _values, result)
458
+ val[0]
459
+ end
464
460
 
465
461
  end # class MMLParser
466
-
467
- end # module SMF
462
+ end # module SMF
468
463
 
469
464
 
470
465
  module SMF