yarp 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -8
  3. data/CONTRIBUTING.md +2 -2
  4. data/Makefile +5 -5
  5. data/README.md +11 -12
  6. data/config.yml +6 -2
  7. data/docs/build_system.md +21 -21
  8. data/docs/building.md +4 -4
  9. data/docs/configuration.md +25 -21
  10. data/docs/design.md +2 -2
  11. data/docs/encoding.md +17 -17
  12. data/docs/fuzzing.md +4 -4
  13. data/docs/heredocs.md +3 -3
  14. data/docs/mapping.md +94 -94
  15. data/docs/ripper.md +4 -4
  16. data/docs/ruby_api.md +11 -11
  17. data/docs/serialization.md +17 -16
  18. data/docs/testing.md +6 -6
  19. data/ext/prism/api_node.c +4725 -0
  20. data/ext/{yarp → prism}/api_pack.c +82 -82
  21. data/ext/{yarp → prism}/extconf.rb +13 -13
  22. data/ext/{yarp → prism}/extension.c +175 -168
  23. data/ext/prism/extension.h +18 -0
  24. data/include/prism/ast.h +1932 -0
  25. data/include/prism/defines.h +45 -0
  26. data/include/prism/diagnostic.h +231 -0
  27. data/include/{yarp/enc/yp_encoding.h → prism/enc/pm_encoding.h} +40 -40
  28. data/include/prism/node.h +41 -0
  29. data/include/prism/pack.h +141 -0
  30. data/include/{yarp → prism}/parser.h +143 -142
  31. data/include/prism/regexp.h +19 -0
  32. data/include/prism/unescape.h +48 -0
  33. data/include/prism/util/pm_buffer.h +51 -0
  34. data/include/{yarp/util/yp_char.h → prism/util/pm_char.h} +20 -20
  35. data/include/{yarp/util/yp_constant_pool.h → prism/util/pm_constant_pool.h} +26 -22
  36. data/include/{yarp/util/yp_list.h → prism/util/pm_list.h} +21 -21
  37. data/include/prism/util/pm_memchr.h +14 -0
  38. data/include/{yarp/util/yp_newline_list.h → prism/util/pm_newline_list.h} +11 -11
  39. data/include/prism/util/pm_state_stack.h +24 -0
  40. data/include/{yarp/util/yp_string.h → prism/util/pm_string.h} +20 -20
  41. data/include/prism/util/pm_string_list.h +25 -0
  42. data/include/{yarp/util/yp_strpbrk.h → prism/util/pm_strpbrk.h} +7 -7
  43. data/include/prism/version.h +4 -0
  44. data/include/prism.h +82 -0
  45. data/lib/prism/compiler.rb +465 -0
  46. data/lib/prism/debug.rb +157 -0
  47. data/lib/{yarp/desugar_visitor.rb → prism/desugar_compiler.rb} +4 -2
  48. data/lib/prism/dispatcher.rb +2051 -0
  49. data/lib/prism/dsl.rb +750 -0
  50. data/lib/{yarp → prism}/ffi.rb +66 -67
  51. data/lib/{yarp → prism}/lex_compat.rb +40 -43
  52. data/lib/{yarp/mutation_visitor.rb → prism/mutation_compiler.rb} +3 -3
  53. data/lib/{yarp → prism}/node.rb +2012 -2593
  54. data/lib/prism/node_ext.rb +55 -0
  55. data/lib/prism/node_inspector.rb +68 -0
  56. data/lib/{yarp → prism}/pack.rb +1 -1
  57. data/lib/{yarp → prism}/parse_result/comments.rb +1 -1
  58. data/lib/{yarp → prism}/parse_result/newlines.rb +1 -1
  59. data/lib/prism/parse_result.rb +266 -0
  60. data/lib/{yarp → prism}/pattern.rb +14 -14
  61. data/lib/{yarp → prism}/ripper_compat.rb +5 -5
  62. data/lib/{yarp → prism}/serialize.rb +12 -7
  63. data/lib/prism/visitor.rb +470 -0
  64. data/lib/prism.rb +64 -0
  65. data/lib/yarp.rb +2 -614
  66. data/src/diagnostic.c +213 -208
  67. data/src/enc/pm_big5.c +52 -0
  68. data/src/enc/pm_euc_jp.c +58 -0
  69. data/src/enc/{yp_gbk.c → pm_gbk.c} +16 -16
  70. data/src/enc/pm_shift_jis.c +56 -0
  71. data/src/enc/{yp_tables.c → pm_tables.c} +69 -69
  72. data/src/enc/{yp_unicode.c → pm_unicode.c} +40 -40
  73. data/src/enc/pm_windows_31j.c +56 -0
  74. data/src/node.c +1293 -1233
  75. data/src/pack.c +247 -247
  76. data/src/prettyprint.c +1479 -1479
  77. data/src/{yarp.c → prism.c} +5205 -5083
  78. data/src/regexp.c +132 -132
  79. data/src/serialize.c +1121 -1121
  80. data/src/token_type.c +169 -167
  81. data/src/unescape.c +106 -87
  82. data/src/util/pm_buffer.c +103 -0
  83. data/src/util/{yp_char.c → pm_char.c} +72 -72
  84. data/src/util/{yp_constant_pool.c → pm_constant_pool.c} +85 -64
  85. data/src/util/{yp_list.c → pm_list.c} +10 -10
  86. data/src/util/{yp_memchr.c → pm_memchr.c} +6 -4
  87. data/src/util/{yp_newline_list.c → pm_newline_list.c} +21 -21
  88. data/src/util/{yp_state_stack.c → pm_state_stack.c} +4 -4
  89. data/src/util/{yp_string.c → pm_string.c} +38 -38
  90. data/src/util/pm_string_list.c +29 -0
  91. data/src/util/{yp_strncasecmp.c → pm_strncasecmp.c} +1 -1
  92. data/src/util/{yp_strpbrk.c → pm_strpbrk.c} +8 -8
  93. data/yarp.gemspec +68 -59
  94. metadata +70 -61
  95. data/ext/yarp/api_node.c +0 -4728
  96. data/ext/yarp/extension.h +0 -18
  97. data/include/yarp/ast.h +0 -1929
  98. data/include/yarp/defines.h +0 -45
  99. data/include/yarp/diagnostic.h +0 -226
  100. data/include/yarp/node.h +0 -42
  101. data/include/yarp/pack.h +0 -141
  102. data/include/yarp/regexp.h +0 -19
  103. data/include/yarp/unescape.h +0 -44
  104. data/include/yarp/util/yp_buffer.h +0 -51
  105. data/include/yarp/util/yp_memchr.h +0 -14
  106. data/include/yarp/util/yp_state_stack.h +0 -24
  107. data/include/yarp/util/yp_string_list.h +0 -25
  108. data/include/yarp/version.h +0 -4
  109. data/include/yarp.h +0 -82
  110. data/src/enc/yp_big5.c +0 -52
  111. data/src/enc/yp_euc_jp.c +0 -58
  112. data/src/enc/yp_shift_jis.c +0 -56
  113. data/src/enc/yp_windows_31j.c +0 -56
  114. data/src/util/yp_buffer.c +0 -101
  115. data/src/util/yp_string_list.c +0 -29
data/src/token_type.c CHANGED
@@ -7,340 +7,342 @@
7
7
  /******************************************************************************/
8
8
  #include <string.h>
9
9
 
10
- #include "yarp/ast.h"
10
+ #include "prism/ast.h"
11
11
 
12
12
  // Returns a string representation of the given token type.
13
- YP_EXPORTED_FUNCTION const char *
14
- yp_token_type_to_str(yp_token_type_t token_type)
13
+ PRISM_EXPORTED_FUNCTION const char *
14
+ pm_token_type_to_str(pm_token_type_t token_type)
15
15
  {
16
16
  switch (token_type) {
17
- case YP_TOKEN_EOF:
17
+ case PM_TOKEN_EOF:
18
18
  return "EOF";
19
- case YP_TOKEN_MISSING:
19
+ case PM_TOKEN_MISSING:
20
20
  return "MISSING";
21
- case YP_TOKEN_NOT_PROVIDED:
21
+ case PM_TOKEN_NOT_PROVIDED:
22
22
  return "NOT_PROVIDED";
23
- case YP_TOKEN_AMPERSAND:
23
+ case PM_TOKEN_AMPERSAND:
24
24
  return "AMPERSAND";
25
- case YP_TOKEN_AMPERSAND_AMPERSAND:
25
+ case PM_TOKEN_AMPERSAND_AMPERSAND:
26
26
  return "AMPERSAND_AMPERSAND";
27
- case YP_TOKEN_AMPERSAND_AMPERSAND_EQUAL:
27
+ case PM_TOKEN_AMPERSAND_AMPERSAND_EQUAL:
28
28
  return "AMPERSAND_AMPERSAND_EQUAL";
29
- case YP_TOKEN_AMPERSAND_DOT:
29
+ case PM_TOKEN_AMPERSAND_DOT:
30
30
  return "AMPERSAND_DOT";
31
- case YP_TOKEN_AMPERSAND_EQUAL:
31
+ case PM_TOKEN_AMPERSAND_EQUAL:
32
32
  return "AMPERSAND_EQUAL";
33
- case YP_TOKEN_BACKTICK:
33
+ case PM_TOKEN_BACKTICK:
34
34
  return "BACKTICK";
35
- case YP_TOKEN_BACK_REFERENCE:
35
+ case PM_TOKEN_BACK_REFERENCE:
36
36
  return "BACK_REFERENCE";
37
- case YP_TOKEN_BANG:
37
+ case PM_TOKEN_BANG:
38
38
  return "BANG";
39
- case YP_TOKEN_BANG_EQUAL:
39
+ case PM_TOKEN_BANG_EQUAL:
40
40
  return "BANG_EQUAL";
41
- case YP_TOKEN_BANG_TILDE:
41
+ case PM_TOKEN_BANG_TILDE:
42
42
  return "BANG_TILDE";
43
- case YP_TOKEN_BRACE_LEFT:
43
+ case PM_TOKEN_BRACE_LEFT:
44
44
  return "BRACE_LEFT";
45
- case YP_TOKEN_BRACE_RIGHT:
45
+ case PM_TOKEN_BRACE_RIGHT:
46
46
  return "BRACE_RIGHT";
47
- case YP_TOKEN_BRACKET_LEFT:
47
+ case PM_TOKEN_BRACKET_LEFT:
48
48
  return "BRACKET_LEFT";
49
- case YP_TOKEN_BRACKET_LEFT_ARRAY:
49
+ case PM_TOKEN_BRACKET_LEFT_ARRAY:
50
50
  return "BRACKET_LEFT_ARRAY";
51
- case YP_TOKEN_BRACKET_LEFT_RIGHT:
51
+ case PM_TOKEN_BRACKET_LEFT_RIGHT:
52
52
  return "BRACKET_LEFT_RIGHT";
53
- case YP_TOKEN_BRACKET_LEFT_RIGHT_EQUAL:
53
+ case PM_TOKEN_BRACKET_LEFT_RIGHT_EQUAL:
54
54
  return "BRACKET_LEFT_RIGHT_EQUAL";
55
- case YP_TOKEN_BRACKET_RIGHT:
55
+ case PM_TOKEN_BRACKET_RIGHT:
56
56
  return "BRACKET_RIGHT";
57
- case YP_TOKEN_CARET:
57
+ case PM_TOKEN_CARET:
58
58
  return "CARET";
59
- case YP_TOKEN_CARET_EQUAL:
59
+ case PM_TOKEN_CARET_EQUAL:
60
60
  return "CARET_EQUAL";
61
- case YP_TOKEN_CHARACTER_LITERAL:
61
+ case PM_TOKEN_CHARACTER_LITERAL:
62
62
  return "CHARACTER_LITERAL";
63
- case YP_TOKEN_CLASS_VARIABLE:
63
+ case PM_TOKEN_CLASS_VARIABLE:
64
64
  return "CLASS_VARIABLE";
65
- case YP_TOKEN_COLON:
65
+ case PM_TOKEN_COLON:
66
66
  return "COLON";
67
- case YP_TOKEN_COLON_COLON:
67
+ case PM_TOKEN_COLON_COLON:
68
68
  return "COLON_COLON";
69
- case YP_TOKEN_COMMA:
69
+ case PM_TOKEN_COMMA:
70
70
  return "COMMA";
71
- case YP_TOKEN_COMMENT:
71
+ case PM_TOKEN_COMMENT:
72
72
  return "COMMENT";
73
- case YP_TOKEN_CONSTANT:
73
+ case PM_TOKEN_CONSTANT:
74
74
  return "CONSTANT";
75
- case YP_TOKEN_DOT:
75
+ case PM_TOKEN_DOT:
76
76
  return "DOT";
77
- case YP_TOKEN_DOT_DOT:
77
+ case PM_TOKEN_DOT_DOT:
78
78
  return "DOT_DOT";
79
- case YP_TOKEN_DOT_DOT_DOT:
79
+ case PM_TOKEN_DOT_DOT_DOT:
80
80
  return "DOT_DOT_DOT";
81
- case YP_TOKEN_EMBDOC_BEGIN:
81
+ case PM_TOKEN_EMBDOC_BEGIN:
82
82
  return "EMBDOC_BEGIN";
83
- case YP_TOKEN_EMBDOC_END:
83
+ case PM_TOKEN_EMBDOC_END:
84
84
  return "EMBDOC_END";
85
- case YP_TOKEN_EMBDOC_LINE:
85
+ case PM_TOKEN_EMBDOC_LINE:
86
86
  return "EMBDOC_LINE";
87
- case YP_TOKEN_EMBEXPR_BEGIN:
87
+ case PM_TOKEN_EMBEXPR_BEGIN:
88
88
  return "EMBEXPR_BEGIN";
89
- case YP_TOKEN_EMBEXPR_END:
89
+ case PM_TOKEN_EMBEXPR_END:
90
90
  return "EMBEXPR_END";
91
- case YP_TOKEN_EMBVAR:
91
+ case PM_TOKEN_EMBVAR:
92
92
  return "EMBVAR";
93
- case YP_TOKEN_EQUAL:
93
+ case PM_TOKEN_EQUAL:
94
94
  return "EQUAL";
95
- case YP_TOKEN_EQUAL_EQUAL:
95
+ case PM_TOKEN_EQUAL_EQUAL:
96
96
  return "EQUAL_EQUAL";
97
- case YP_TOKEN_EQUAL_EQUAL_EQUAL:
97
+ case PM_TOKEN_EQUAL_EQUAL_EQUAL:
98
98
  return "EQUAL_EQUAL_EQUAL";
99
- case YP_TOKEN_EQUAL_GREATER:
99
+ case PM_TOKEN_EQUAL_GREATER:
100
100
  return "EQUAL_GREATER";
101
- case YP_TOKEN_EQUAL_TILDE:
101
+ case PM_TOKEN_EQUAL_TILDE:
102
102
  return "EQUAL_TILDE";
103
- case YP_TOKEN_FLOAT:
103
+ case PM_TOKEN_FLOAT:
104
104
  return "FLOAT";
105
- case YP_TOKEN_FLOAT_IMAGINARY:
105
+ case PM_TOKEN_FLOAT_IMAGINARY:
106
106
  return "FLOAT_IMAGINARY";
107
- case YP_TOKEN_FLOAT_RATIONAL:
107
+ case PM_TOKEN_FLOAT_RATIONAL:
108
108
  return "FLOAT_RATIONAL";
109
- case YP_TOKEN_FLOAT_RATIONAL_IMAGINARY:
109
+ case PM_TOKEN_FLOAT_RATIONAL_IMAGINARY:
110
110
  return "FLOAT_RATIONAL_IMAGINARY";
111
- case YP_TOKEN_GLOBAL_VARIABLE:
111
+ case PM_TOKEN_GLOBAL_VARIABLE:
112
112
  return "GLOBAL_VARIABLE";
113
- case YP_TOKEN_GREATER:
113
+ case PM_TOKEN_GREATER:
114
114
  return "GREATER";
115
- case YP_TOKEN_GREATER_EQUAL:
115
+ case PM_TOKEN_GREATER_EQUAL:
116
116
  return "GREATER_EQUAL";
117
- case YP_TOKEN_GREATER_GREATER:
117
+ case PM_TOKEN_GREATER_GREATER:
118
118
  return "GREATER_GREATER";
119
- case YP_TOKEN_GREATER_GREATER_EQUAL:
119
+ case PM_TOKEN_GREATER_GREATER_EQUAL:
120
120
  return "GREATER_GREATER_EQUAL";
121
- case YP_TOKEN_HEREDOC_END:
121
+ case PM_TOKEN_HEREDOC_END:
122
122
  return "HEREDOC_END";
123
- case YP_TOKEN_HEREDOC_START:
123
+ case PM_TOKEN_HEREDOC_START:
124
124
  return "HEREDOC_START";
125
- case YP_TOKEN_IDENTIFIER:
125
+ case PM_TOKEN_IDENTIFIER:
126
126
  return "IDENTIFIER";
127
- case YP_TOKEN_IGNORED_NEWLINE:
127
+ case PM_TOKEN_IGNORED_NEWLINE:
128
128
  return "IGNORED_NEWLINE";
129
- case YP_TOKEN_INSTANCE_VARIABLE:
129
+ case PM_TOKEN_INSTANCE_VARIABLE:
130
130
  return "INSTANCE_VARIABLE";
131
- case YP_TOKEN_INTEGER:
131
+ case PM_TOKEN_INTEGER:
132
132
  return "INTEGER";
133
- case YP_TOKEN_INTEGER_IMAGINARY:
133
+ case PM_TOKEN_INTEGER_IMAGINARY:
134
134
  return "INTEGER_IMAGINARY";
135
- case YP_TOKEN_INTEGER_RATIONAL:
135
+ case PM_TOKEN_INTEGER_RATIONAL:
136
136
  return "INTEGER_RATIONAL";
137
- case YP_TOKEN_INTEGER_RATIONAL_IMAGINARY:
137
+ case PM_TOKEN_INTEGER_RATIONAL_IMAGINARY:
138
138
  return "INTEGER_RATIONAL_IMAGINARY";
139
- case YP_TOKEN_KEYWORD_ALIAS:
139
+ case PM_TOKEN_KEYWORD_ALIAS:
140
140
  return "KEYWORD_ALIAS";
141
- case YP_TOKEN_KEYWORD_AND:
141
+ case PM_TOKEN_KEYWORD_AND:
142
142
  return "KEYWORD_AND";
143
- case YP_TOKEN_KEYWORD_BEGIN:
143
+ case PM_TOKEN_KEYWORD_BEGIN:
144
144
  return "KEYWORD_BEGIN";
145
- case YP_TOKEN_KEYWORD_BEGIN_UPCASE:
145
+ case PM_TOKEN_KEYWORD_BEGIN_UPCASE:
146
146
  return "KEYWORD_BEGIN_UPCASE";
147
- case YP_TOKEN_KEYWORD_BREAK:
147
+ case PM_TOKEN_KEYWORD_BREAK:
148
148
  return "KEYWORD_BREAK";
149
- case YP_TOKEN_KEYWORD_CASE:
149
+ case PM_TOKEN_KEYWORD_CASE:
150
150
  return "KEYWORD_CASE";
151
- case YP_TOKEN_KEYWORD_CLASS:
151
+ case PM_TOKEN_KEYWORD_CLASS:
152
152
  return "KEYWORD_CLASS";
153
- case YP_TOKEN_KEYWORD_DEF:
153
+ case PM_TOKEN_KEYWORD_DEF:
154
154
  return "KEYWORD_DEF";
155
- case YP_TOKEN_KEYWORD_DEFINED:
155
+ case PM_TOKEN_KEYWORD_DEFINED:
156
156
  return "KEYWORD_DEFINED";
157
- case YP_TOKEN_KEYWORD_DO:
157
+ case PM_TOKEN_KEYWORD_DO:
158
158
  return "KEYWORD_DO";
159
- case YP_TOKEN_KEYWORD_DO_LOOP:
159
+ case PM_TOKEN_KEYWORD_DO_LOOP:
160
160
  return "KEYWORD_DO_LOOP";
161
- case YP_TOKEN_KEYWORD_ELSE:
161
+ case PM_TOKEN_KEYWORD_ELSE:
162
162
  return "KEYWORD_ELSE";
163
- case YP_TOKEN_KEYWORD_ELSIF:
163
+ case PM_TOKEN_KEYWORD_ELSIF:
164
164
  return "KEYWORD_ELSIF";
165
- case YP_TOKEN_KEYWORD_END:
165
+ case PM_TOKEN_KEYWORD_END:
166
166
  return "KEYWORD_END";
167
- case YP_TOKEN_KEYWORD_END_UPCASE:
167
+ case PM_TOKEN_KEYWORD_END_UPCASE:
168
168
  return "KEYWORD_END_UPCASE";
169
- case YP_TOKEN_KEYWORD_ENSURE:
169
+ case PM_TOKEN_KEYWORD_ENSURE:
170
170
  return "KEYWORD_ENSURE";
171
- case YP_TOKEN_KEYWORD_FALSE:
171
+ case PM_TOKEN_KEYWORD_FALSE:
172
172
  return "KEYWORD_FALSE";
173
- case YP_TOKEN_KEYWORD_FOR:
173
+ case PM_TOKEN_KEYWORD_FOR:
174
174
  return "KEYWORD_FOR";
175
- case YP_TOKEN_KEYWORD_IF:
175
+ case PM_TOKEN_KEYWORD_IF:
176
176
  return "KEYWORD_IF";
177
- case YP_TOKEN_KEYWORD_IF_MODIFIER:
177
+ case PM_TOKEN_KEYWORD_IF_MODIFIER:
178
178
  return "KEYWORD_IF_MODIFIER";
179
- case YP_TOKEN_KEYWORD_IN:
179
+ case PM_TOKEN_KEYWORD_IN:
180
180
  return "KEYWORD_IN";
181
- case YP_TOKEN_KEYWORD_MODULE:
181
+ case PM_TOKEN_KEYWORD_MODULE:
182
182
  return "KEYWORD_MODULE";
183
- case YP_TOKEN_KEYWORD_NEXT:
183
+ case PM_TOKEN_KEYWORD_NEXT:
184
184
  return "KEYWORD_NEXT";
185
- case YP_TOKEN_KEYWORD_NIL:
185
+ case PM_TOKEN_KEYWORD_NIL:
186
186
  return "KEYWORD_NIL";
187
- case YP_TOKEN_KEYWORD_NOT:
187
+ case PM_TOKEN_KEYWORD_NOT:
188
188
  return "KEYWORD_NOT";
189
- case YP_TOKEN_KEYWORD_OR:
189
+ case PM_TOKEN_KEYWORD_OR:
190
190
  return "KEYWORD_OR";
191
- case YP_TOKEN_KEYWORD_REDO:
191
+ case PM_TOKEN_KEYWORD_REDO:
192
192
  return "KEYWORD_REDO";
193
- case YP_TOKEN_KEYWORD_RESCUE:
193
+ case PM_TOKEN_KEYWORD_RESCUE:
194
194
  return "KEYWORD_RESCUE";
195
- case YP_TOKEN_KEYWORD_RESCUE_MODIFIER:
195
+ case PM_TOKEN_KEYWORD_RESCUE_MODIFIER:
196
196
  return "KEYWORD_RESCUE_MODIFIER";
197
- case YP_TOKEN_KEYWORD_RETRY:
197
+ case PM_TOKEN_KEYWORD_RETRY:
198
198
  return "KEYWORD_RETRY";
199
- case YP_TOKEN_KEYWORD_RETURN:
199
+ case PM_TOKEN_KEYWORD_RETURN:
200
200
  return "KEYWORD_RETURN";
201
- case YP_TOKEN_KEYWORD_SELF:
201
+ case PM_TOKEN_KEYWORD_SELF:
202
202
  return "KEYWORD_SELF";
203
- case YP_TOKEN_KEYWORD_SUPER:
203
+ case PM_TOKEN_KEYWORD_SUPER:
204
204
  return "KEYWORD_SUPER";
205
- case YP_TOKEN_KEYWORD_THEN:
205
+ case PM_TOKEN_KEYWORD_THEN:
206
206
  return "KEYWORD_THEN";
207
- case YP_TOKEN_KEYWORD_TRUE:
207
+ case PM_TOKEN_KEYWORD_TRUE:
208
208
  return "KEYWORD_TRUE";
209
- case YP_TOKEN_KEYWORD_UNDEF:
209
+ case PM_TOKEN_KEYWORD_UNDEF:
210
210
  return "KEYWORD_UNDEF";
211
- case YP_TOKEN_KEYWORD_UNLESS:
211
+ case PM_TOKEN_KEYWORD_UNLESS:
212
212
  return "KEYWORD_UNLESS";
213
- case YP_TOKEN_KEYWORD_UNLESS_MODIFIER:
213
+ case PM_TOKEN_KEYWORD_UNLESS_MODIFIER:
214
214
  return "KEYWORD_UNLESS_MODIFIER";
215
- case YP_TOKEN_KEYWORD_UNTIL:
215
+ case PM_TOKEN_KEYWORD_UNTIL:
216
216
  return "KEYWORD_UNTIL";
217
- case YP_TOKEN_KEYWORD_UNTIL_MODIFIER:
217
+ case PM_TOKEN_KEYWORD_UNTIL_MODIFIER:
218
218
  return "KEYWORD_UNTIL_MODIFIER";
219
- case YP_TOKEN_KEYWORD_WHEN:
219
+ case PM_TOKEN_KEYWORD_WHEN:
220
220
  return "KEYWORD_WHEN";
221
- case YP_TOKEN_KEYWORD_WHILE:
221
+ case PM_TOKEN_KEYWORD_WHILE:
222
222
  return "KEYWORD_WHILE";
223
- case YP_TOKEN_KEYWORD_WHILE_MODIFIER:
223
+ case PM_TOKEN_KEYWORD_WHILE_MODIFIER:
224
224
  return "KEYWORD_WHILE_MODIFIER";
225
- case YP_TOKEN_KEYWORD_YIELD:
225
+ case PM_TOKEN_KEYWORD_YIELD:
226
226
  return "KEYWORD_YIELD";
227
- case YP_TOKEN_KEYWORD___ENCODING__:
227
+ case PM_TOKEN_KEYWORD___ENCODING__:
228
228
  return "KEYWORD___ENCODING__";
229
- case YP_TOKEN_KEYWORD___FILE__:
229
+ case PM_TOKEN_KEYWORD___FILE__:
230
230
  return "KEYWORD___FILE__";
231
- case YP_TOKEN_KEYWORD___LINE__:
231
+ case PM_TOKEN_KEYWORD___LINE__:
232
232
  return "KEYWORD___LINE__";
233
- case YP_TOKEN_LABEL:
233
+ case PM_TOKEN_LABEL:
234
234
  return "LABEL";
235
- case YP_TOKEN_LABEL_END:
235
+ case PM_TOKEN_LABEL_END:
236
236
  return "LABEL_END";
237
- case YP_TOKEN_LAMBDA_BEGIN:
237
+ case PM_TOKEN_LAMBDA_BEGIN:
238
238
  return "LAMBDA_BEGIN";
239
- case YP_TOKEN_LESS:
239
+ case PM_TOKEN_LESS:
240
240
  return "LESS";
241
- case YP_TOKEN_LESS_EQUAL:
241
+ case PM_TOKEN_LESS_EQUAL:
242
242
  return "LESS_EQUAL";
243
- case YP_TOKEN_LESS_EQUAL_GREATER:
243
+ case PM_TOKEN_LESS_EQUAL_GREATER:
244
244
  return "LESS_EQUAL_GREATER";
245
- case YP_TOKEN_LESS_LESS:
245
+ case PM_TOKEN_LESS_LESS:
246
246
  return "LESS_LESS";
247
- case YP_TOKEN_LESS_LESS_EQUAL:
247
+ case PM_TOKEN_LESS_LESS_EQUAL:
248
248
  return "LESS_LESS_EQUAL";
249
- case YP_TOKEN_MINUS:
249
+ case PM_TOKEN_METHOD_NAME:
250
+ return "METHOD_NAME";
251
+ case PM_TOKEN_MINUS:
250
252
  return "MINUS";
251
- case YP_TOKEN_MINUS_EQUAL:
253
+ case PM_TOKEN_MINUS_EQUAL:
252
254
  return "MINUS_EQUAL";
253
- case YP_TOKEN_MINUS_GREATER:
255
+ case PM_TOKEN_MINUS_GREATER:
254
256
  return "MINUS_GREATER";
255
- case YP_TOKEN_NEWLINE:
257
+ case PM_TOKEN_NEWLINE:
256
258
  return "NEWLINE";
257
- case YP_TOKEN_NUMBERED_REFERENCE:
259
+ case PM_TOKEN_NUMBERED_REFERENCE:
258
260
  return "NUMBERED_REFERENCE";
259
- case YP_TOKEN_PARENTHESIS_LEFT:
261
+ case PM_TOKEN_PARENTHESIS_LEFT:
260
262
  return "PARENTHESIS_LEFT";
261
- case YP_TOKEN_PARENTHESIS_LEFT_PARENTHESES:
263
+ case PM_TOKEN_PARENTHESIS_LEFT_PARENTHESES:
262
264
  return "PARENTHESIS_LEFT_PARENTHESES";
263
- case YP_TOKEN_PARENTHESIS_RIGHT:
265
+ case PM_TOKEN_PARENTHESIS_RIGHT:
264
266
  return "PARENTHESIS_RIGHT";
265
- case YP_TOKEN_PERCENT:
267
+ case PM_TOKEN_PERCENT:
266
268
  return "PERCENT";
267
- case YP_TOKEN_PERCENT_EQUAL:
269
+ case PM_TOKEN_PERCENT_EQUAL:
268
270
  return "PERCENT_EQUAL";
269
- case YP_TOKEN_PERCENT_LOWER_I:
271
+ case PM_TOKEN_PERCENT_LOWER_I:
270
272
  return "PERCENT_LOWER_I";
271
- case YP_TOKEN_PERCENT_LOWER_W:
273
+ case PM_TOKEN_PERCENT_LOWER_W:
272
274
  return "PERCENT_LOWER_W";
273
- case YP_TOKEN_PERCENT_LOWER_X:
275
+ case PM_TOKEN_PERCENT_LOWER_X:
274
276
  return "PERCENT_LOWER_X";
275
- case YP_TOKEN_PERCENT_UPPER_I:
277
+ case PM_TOKEN_PERCENT_UPPER_I:
276
278
  return "PERCENT_UPPER_I";
277
- case YP_TOKEN_PERCENT_UPPER_W:
279
+ case PM_TOKEN_PERCENT_UPPER_W:
278
280
  return "PERCENT_UPPER_W";
279
- case YP_TOKEN_PIPE:
281
+ case PM_TOKEN_PIPE:
280
282
  return "PIPE";
281
- case YP_TOKEN_PIPE_EQUAL:
283
+ case PM_TOKEN_PIPE_EQUAL:
282
284
  return "PIPE_EQUAL";
283
- case YP_TOKEN_PIPE_PIPE:
285
+ case PM_TOKEN_PIPE_PIPE:
284
286
  return "PIPE_PIPE";
285
- case YP_TOKEN_PIPE_PIPE_EQUAL:
287
+ case PM_TOKEN_PIPE_PIPE_EQUAL:
286
288
  return "PIPE_PIPE_EQUAL";
287
- case YP_TOKEN_PLUS:
289
+ case PM_TOKEN_PLUS:
288
290
  return "PLUS";
289
- case YP_TOKEN_PLUS_EQUAL:
291
+ case PM_TOKEN_PLUS_EQUAL:
290
292
  return "PLUS_EQUAL";
291
- case YP_TOKEN_QUESTION_MARK:
293
+ case PM_TOKEN_QUESTION_MARK:
292
294
  return "QUESTION_MARK";
293
- case YP_TOKEN_REGEXP_BEGIN:
295
+ case PM_TOKEN_REGEXP_BEGIN:
294
296
  return "REGEXP_BEGIN";
295
- case YP_TOKEN_REGEXP_END:
297
+ case PM_TOKEN_REGEXP_END:
296
298
  return "REGEXP_END";
297
- case YP_TOKEN_SEMICOLON:
299
+ case PM_TOKEN_SEMICOLON:
298
300
  return "SEMICOLON";
299
- case YP_TOKEN_SLASH:
301
+ case PM_TOKEN_SLASH:
300
302
  return "SLASH";
301
- case YP_TOKEN_SLASH_EQUAL:
303
+ case PM_TOKEN_SLASH_EQUAL:
302
304
  return "SLASH_EQUAL";
303
- case YP_TOKEN_STAR:
305
+ case PM_TOKEN_STAR:
304
306
  return "STAR";
305
- case YP_TOKEN_STAR_EQUAL:
307
+ case PM_TOKEN_STAR_EQUAL:
306
308
  return "STAR_EQUAL";
307
- case YP_TOKEN_STAR_STAR:
309
+ case PM_TOKEN_STAR_STAR:
308
310
  return "STAR_STAR";
309
- case YP_TOKEN_STAR_STAR_EQUAL:
311
+ case PM_TOKEN_STAR_STAR_EQUAL:
310
312
  return "STAR_STAR_EQUAL";
311
- case YP_TOKEN_STRING_BEGIN:
313
+ case PM_TOKEN_STRING_BEGIN:
312
314
  return "STRING_BEGIN";
313
- case YP_TOKEN_STRING_CONTENT:
315
+ case PM_TOKEN_STRING_CONTENT:
314
316
  return "STRING_CONTENT";
315
- case YP_TOKEN_STRING_END:
317
+ case PM_TOKEN_STRING_END:
316
318
  return "STRING_END";
317
- case YP_TOKEN_SYMBOL_BEGIN:
319
+ case PM_TOKEN_SYMBOL_BEGIN:
318
320
  return "SYMBOL_BEGIN";
319
- case YP_TOKEN_TILDE:
321
+ case PM_TOKEN_TILDE:
320
322
  return "TILDE";
321
- case YP_TOKEN_UAMPERSAND:
323
+ case PM_TOKEN_UAMPERSAND:
322
324
  return "UAMPERSAND";
323
- case YP_TOKEN_UCOLON_COLON:
325
+ case PM_TOKEN_UCOLON_COLON:
324
326
  return "UCOLON_COLON";
325
- case YP_TOKEN_UDOT_DOT:
327
+ case PM_TOKEN_UDOT_DOT:
326
328
  return "UDOT_DOT";
327
- case YP_TOKEN_UDOT_DOT_DOT:
329
+ case PM_TOKEN_UDOT_DOT_DOT:
328
330
  return "UDOT_DOT_DOT";
329
- case YP_TOKEN_UMINUS:
331
+ case PM_TOKEN_UMINUS:
330
332
  return "UMINUS";
331
- case YP_TOKEN_UMINUS_NUM:
333
+ case PM_TOKEN_UMINUS_NUM:
332
334
  return "UMINUS_NUM";
333
- case YP_TOKEN_UPLUS:
335
+ case PM_TOKEN_UPLUS:
334
336
  return "UPLUS";
335
- case YP_TOKEN_USTAR:
337
+ case PM_TOKEN_USTAR:
336
338
  return "USTAR";
337
- case YP_TOKEN_USTAR_STAR:
339
+ case PM_TOKEN_USTAR_STAR:
338
340
  return "USTAR_STAR";
339
- case YP_TOKEN_WORDS_SEP:
341
+ case PM_TOKEN_WORDS_SEP:
340
342
  return "WORDS_SEP";
341
- case YP_TOKEN___END__:
343
+ case PM_TOKEN___END__:
342
344
  return "__END__";
343
- case YP_TOKEN_MAXIMUM:
345
+ case PM_TOKEN_MAXIMUM:
344
346
  return "MAXIMUM";
345
347
  }
346
348
  return "\0";