parser 3.2.2.4 → 3.3.0.5
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.
- checksums.yaml +4 -4
- data/lib/parser/all.rb +1 -0
- data/lib/parser/builders/default.rb +18 -1
- data/lib/parser/current.rb +14 -5
- data/lib/parser/lexer/literal.rb +16 -1
- data/lib/parser/lexer-F0.rb +295 -243
- data/lib/parser/lexer-F1.rb +444 -383
- data/lib/parser/macruby.rb +2 -2
- data/lib/parser/messages.rb +46 -41
- data/lib/parser/ruby18.rb +2 -2
- data/lib/parser/ruby19.rb +2 -2
- data/lib/parser/ruby20.rb +2 -2
- data/lib/parser/ruby21.rb +2 -2
- data/lib/parser/ruby22.rb +2 -2
- data/lib/parser/ruby23.rb +2 -2
- data/lib/parser/ruby24.rb +2 -2
- data/lib/parser/ruby25.rb +2 -2
- data/lib/parser/ruby26.rb +2 -2
- data/lib/parser/ruby27.rb +2 -2
- data/lib/parser/ruby30.rb +2 -2
- data/lib/parser/ruby31.rb +2 -2
- data/lib/parser/ruby32.rb +2 -2
- data/lib/parser/ruby33.rb +6782 -6897
- data/lib/parser/ruby34.rb +12589 -0
- data/lib/parser/rubymotion.rb +2 -2
- data/lib/parser/runner.rb +5 -0
- data/lib/parser/static_environment.rb +12 -0
- data/lib/parser/version.rb +1 -1
- metadata +7 -6
data/lib/parser/macruby.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
|
2
2
|
#
|
3
3
|
# DO NOT MODIFY!!!!
|
4
|
-
# This file is automatically generated by Racc 1.7.
|
5
|
-
# from Racc grammar file "".
|
4
|
+
# This file is automatically generated by Racc 1.7.3
|
5
|
+
# from Racc grammar file "macruby.y".
|
6
6
|
#
|
7
7
|
|
8
8
|
require 'racc/parser.rb'
|
data/lib/parser/messages.rb
CHANGED
@@ -21,6 +21,7 @@ module Parser
|
|
21
21
|
:regexp_options => 'unknown regexp options: %{options}',
|
22
22
|
:cvar_name => "`%{name}' is not allowed as a class variable name",
|
23
23
|
:ivar_name => "`%{name}' is not allowed as an instance variable name",
|
24
|
+
:gvar_name => "`%{name}' is not allowed as a global variable name",
|
24
25
|
:trailing_in_number => "trailing `%{character}' in number",
|
25
26
|
:empty_numeric => 'numeric literal without digits',
|
26
27
|
:invalid_octal => 'invalid octal digit',
|
@@ -40,51 +41,55 @@ module Parser
|
|
40
41
|
:triple_dot_at_eol => '... at EOL, should be parenthesized',
|
41
42
|
|
42
43
|
# Parser errors
|
43
|
-
:nth_ref_alias
|
44
|
-
:begin_in_method
|
45
|
-
:backref_assignment
|
46
|
-
:invalid_assignment
|
47
|
-
:module_name_const
|
48
|
-
:unexpected_token
|
49
|
-
:argument_const
|
50
|
-
:argument_ivar
|
51
|
-
:argument_gvar
|
52
|
-
:argument_cvar
|
53
|
-
:duplicate_argument
|
54
|
-
:empty_symbol
|
55
|
-
:odd_hash
|
56
|
-
:singleton_literal
|
57
|
-
:dynamic_const
|
58
|
-
:const_reassignment
|
59
|
-
:module_in_def
|
60
|
-
:class_in_def
|
61
|
-
:unexpected_percent_str
|
62
|
-
:block_and_blockarg
|
63
|
-
:masgn_as_condition
|
64
|
-
:block_given_to_yield
|
65
|
-
:invalid_regexp
|
66
|
-
:invalid_return
|
67
|
-
:csend_in_lhs_of_masgn
|
68
|
-
:cant_assign_to_numparam
|
69
|
-
:reserved_for_numparam
|
70
|
-
:ordinary_param_defined
|
71
|
-
:numparam_used_in_outer_scope
|
72
|
-
:circular_argument_reference
|
73
|
-
:pm_interp_in_var_name
|
74
|
-
:lvar_name
|
75
|
-
:undefined_lvar
|
76
|
-
:duplicate_variable_name
|
77
|
-
:duplicate_pattern_key
|
78
|
-
:endless_setter
|
79
|
-
:invalid_id_to_get
|
80
|
-
:forward_arg_after_restarg
|
81
|
-
:no_anonymous_blockarg
|
82
|
-
:no_anonymous_restarg
|
83
|
-
:no_anonymous_kwrestarg
|
44
|
+
:nth_ref_alias => 'cannot define an alias for a back-reference variable',
|
45
|
+
:begin_in_method => 'BEGIN in method',
|
46
|
+
:backref_assignment => 'cannot assign to a back-reference variable',
|
47
|
+
:invalid_assignment => 'cannot assign to a keyword',
|
48
|
+
:module_name_const => 'class or module name must be a constant literal',
|
49
|
+
:unexpected_token => 'unexpected token %{token}',
|
50
|
+
:argument_const => 'formal argument cannot be a constant',
|
51
|
+
:argument_ivar => 'formal argument cannot be an instance variable',
|
52
|
+
:argument_gvar => 'formal argument cannot be a global variable',
|
53
|
+
:argument_cvar => 'formal argument cannot be a class variable',
|
54
|
+
:duplicate_argument => 'duplicate argument name',
|
55
|
+
:empty_symbol => 'empty symbol literal',
|
56
|
+
:odd_hash => 'odd number of entries for a hash',
|
57
|
+
:singleton_literal => 'cannot define a singleton method for a literal',
|
58
|
+
:dynamic_const => 'dynamic constant assignment',
|
59
|
+
:const_reassignment => 'constant re-assignment',
|
60
|
+
:module_in_def => 'module definition in method body',
|
61
|
+
:class_in_def => 'class definition in method body',
|
62
|
+
:unexpected_percent_str => '%{type}: unknown type of percent-literal',
|
63
|
+
:block_and_blockarg => 'both block argument and literal block are passed',
|
64
|
+
:masgn_as_condition => 'multiple assignment in conditional context',
|
65
|
+
:block_given_to_yield => 'block given to yield',
|
66
|
+
:invalid_regexp => '%{message}',
|
67
|
+
:invalid_return => 'Invalid return in class/module body',
|
68
|
+
:csend_in_lhs_of_masgn => '&. inside multiple assignment destination',
|
69
|
+
:cant_assign_to_numparam => 'cannot assign to numbered parameter %{name}',
|
70
|
+
:reserved_for_numparam => '%{name} is reserved for numbered parameter',
|
71
|
+
:ordinary_param_defined => 'ordinary parameter is defined',
|
72
|
+
:numparam_used_in_outer_scope => 'numbered parameter is already used in an outer scope',
|
73
|
+
:circular_argument_reference => 'circular argument reference %{var_name}',
|
74
|
+
:pm_interp_in_var_name => 'symbol literal with interpolation is not allowed',
|
75
|
+
:lvar_name => "`%{name}' is not allowed as a local variable name",
|
76
|
+
:undefined_lvar => "no such local variable: `%{name}'",
|
77
|
+
:duplicate_variable_name => 'duplicate variable name %{name}',
|
78
|
+
:duplicate_pattern_key => 'duplicate hash pattern key %{name}',
|
79
|
+
:endless_setter => 'setter method cannot be defined in an endless method definition',
|
80
|
+
:invalid_id_to_get => 'identifier %{identifier} is not valid to get',
|
81
|
+
:forward_arg_after_restarg => '... after rest argument',
|
82
|
+
:no_anonymous_blockarg => 'no anonymous block parameter',
|
83
|
+
:no_anonymous_restarg => 'no anonymous rest parameter',
|
84
|
+
:no_anonymous_kwrestarg => 'no anonymous keyword rest parameter',
|
85
|
+
:ambiguous_anonymous_restarg => 'anonymous rest parameter is also used within block',
|
86
|
+
:ambiguous_anonymous_kwrestarg => 'anonymous keyword rest parameter is also used within block',
|
87
|
+
:ambiguous_anonymous_blockarg => 'anonymous block parameter is also used within block',
|
84
88
|
|
85
89
|
# Parser warnings
|
86
90
|
:useless_else => 'else without rescue is useless',
|
87
91
|
:duplicate_hash_key => 'key is duplicated and overwritten',
|
92
|
+
:ambiguous_it_call => '`it` calls without arguments refers to the first block param',
|
88
93
|
|
89
94
|
# Parser errors that are not Ruby errors
|
90
95
|
:invalid_encoding => 'literal contains escape sequences incompatible with UTF-8',
|
data/lib/parser/ruby18.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
|
2
2
|
#
|
3
3
|
# DO NOT MODIFY!!!!
|
4
|
-
# This file is automatically generated by Racc 1.7.
|
5
|
-
# from Racc grammar file "".
|
4
|
+
# This file is automatically generated by Racc 1.7.3
|
5
|
+
# from Racc grammar file "ruby18.y".
|
6
6
|
#
|
7
7
|
|
8
8
|
require 'racc/parser.rb'
|
data/lib/parser/ruby19.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
|
2
2
|
#
|
3
3
|
# DO NOT MODIFY!!!!
|
4
|
-
# This file is automatically generated by Racc 1.7.
|
5
|
-
# from Racc grammar file "".
|
4
|
+
# This file is automatically generated by Racc 1.7.3
|
5
|
+
# from Racc grammar file "ruby19.y".
|
6
6
|
#
|
7
7
|
|
8
8
|
require 'racc/parser.rb'
|
data/lib/parser/ruby20.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
|
2
2
|
#
|
3
3
|
# DO NOT MODIFY!!!!
|
4
|
-
# This file is automatically generated by Racc 1.7.
|
5
|
-
# from Racc grammar file "".
|
4
|
+
# This file is automatically generated by Racc 1.7.3
|
5
|
+
# from Racc grammar file "ruby20.y".
|
6
6
|
#
|
7
7
|
|
8
8
|
require 'racc/parser.rb'
|
data/lib/parser/ruby21.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
|
2
2
|
#
|
3
3
|
# DO NOT MODIFY!!!!
|
4
|
-
# This file is automatically generated by Racc 1.7.
|
5
|
-
# from Racc grammar file "".
|
4
|
+
# This file is automatically generated by Racc 1.7.3
|
5
|
+
# from Racc grammar file "ruby21.y".
|
6
6
|
#
|
7
7
|
|
8
8
|
require 'racc/parser.rb'
|
data/lib/parser/ruby22.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
|
2
2
|
#
|
3
3
|
# DO NOT MODIFY!!!!
|
4
|
-
# This file is automatically generated by Racc 1.7.
|
5
|
-
# from Racc grammar file "".
|
4
|
+
# This file is automatically generated by Racc 1.7.3
|
5
|
+
# from Racc grammar file "ruby22.y".
|
6
6
|
#
|
7
7
|
|
8
8
|
require 'racc/parser.rb'
|
data/lib/parser/ruby23.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
|
2
2
|
#
|
3
3
|
# DO NOT MODIFY!!!!
|
4
|
-
# This file is automatically generated by Racc 1.7.
|
5
|
-
# from Racc grammar file "".
|
4
|
+
# This file is automatically generated by Racc 1.7.3
|
5
|
+
# from Racc grammar file "ruby23.y".
|
6
6
|
#
|
7
7
|
|
8
8
|
require 'racc/parser.rb'
|
data/lib/parser/ruby24.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
|
2
2
|
#
|
3
3
|
# DO NOT MODIFY!!!!
|
4
|
-
# This file is automatically generated by Racc 1.7.
|
5
|
-
# from Racc grammar file "".
|
4
|
+
# This file is automatically generated by Racc 1.7.3
|
5
|
+
# from Racc grammar file "ruby24.y".
|
6
6
|
#
|
7
7
|
|
8
8
|
require 'racc/parser.rb'
|
data/lib/parser/ruby25.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
|
2
2
|
#
|
3
3
|
# DO NOT MODIFY!!!!
|
4
|
-
# This file is automatically generated by Racc 1.7.
|
5
|
-
# from Racc grammar file "".
|
4
|
+
# This file is automatically generated by Racc 1.7.3
|
5
|
+
# from Racc grammar file "ruby25.y".
|
6
6
|
#
|
7
7
|
|
8
8
|
require 'racc/parser.rb'
|
data/lib/parser/ruby26.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
|
2
2
|
#
|
3
3
|
# DO NOT MODIFY!!!!
|
4
|
-
# This file is automatically generated by Racc 1.7.
|
5
|
-
# from Racc grammar file "".
|
4
|
+
# This file is automatically generated by Racc 1.7.3
|
5
|
+
# from Racc grammar file "ruby26.y".
|
6
6
|
#
|
7
7
|
|
8
8
|
require 'racc/parser.rb'
|
data/lib/parser/ruby27.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
|
2
2
|
#
|
3
3
|
# DO NOT MODIFY!!!!
|
4
|
-
# This file is automatically generated by Racc 1.7.
|
5
|
-
# from Racc grammar file "".
|
4
|
+
# This file is automatically generated by Racc 1.7.3
|
5
|
+
# from Racc grammar file "ruby27.y".
|
6
6
|
#
|
7
7
|
|
8
8
|
require 'racc/parser.rb'
|
data/lib/parser/ruby30.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
|
2
2
|
#
|
3
3
|
# DO NOT MODIFY!!!!
|
4
|
-
# This file is automatically generated by Racc 1.7.
|
5
|
-
# from Racc grammar file "".
|
4
|
+
# This file is automatically generated by Racc 1.7.3
|
5
|
+
# from Racc grammar file "ruby30.y".
|
6
6
|
#
|
7
7
|
|
8
8
|
require 'racc/parser.rb'
|
data/lib/parser/ruby31.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
|
2
2
|
#
|
3
3
|
# DO NOT MODIFY!!!!
|
4
|
-
# This file is automatically generated by Racc 1.7.
|
5
|
-
# from Racc grammar file "".
|
4
|
+
# This file is automatically generated by Racc 1.7.3
|
5
|
+
# from Racc grammar file "ruby31.y".
|
6
6
|
#
|
7
7
|
|
8
8
|
require 'racc/parser.rb'
|
data/lib/parser/ruby32.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- encoding:utf-8; warn-indent:false; frozen_string_literal: true -*-
|
2
2
|
#
|
3
3
|
# DO NOT MODIFY!!!!
|
4
|
-
# This file is automatically generated by Racc 1.7.
|
5
|
-
# from Racc grammar file "".
|
4
|
+
# This file is automatically generated by Racc 1.7.3
|
5
|
+
# from Racc grammar file "ruby32.y".
|
6
6
|
#
|
7
7
|
|
8
8
|
require 'racc/parser.rb'
|