Repository: ruby/rbs (Ruby)

Issue:
Type Alias can start with a capital letter accidentally 
# Problem

Type Alias should start with a small letter.
But it can start with a capital letter accidentally in the syntax.


```ruby
# test.rbs

type T = String

class C
  def m: () -> T
end
```

```bash
$ rbs parse test.rbs
$ echo $?
0

$ rbs -I . validate --silent
/path/to/rbs-1.0.0/lib/rbs/errors.rb:96:in `check!': test.rbs:4:15...4:16: Could not find ::T (RBS::NoTypeFoundError)
	from /path/to/rbs-1.0.0/lib/rbs/variance_calculator.rb:114:in `type'
	from /path/to/rbs-1.0.0/lib/rbs/variance_calculator.rb:83:in `in_method_type'
	from /path/to/rbs-1.0.0/lib/rbs/definition_builder.rb:523:in `block (2 levels) in validate_type_params'
	from /path/to/rbs-1.0.0/lib/rbs/definition_builder.rb:522:in `each'
	from /path/to/rbs-1.0.0/lib/rbs/definition_builder.rb:522:in `block in validate_type_params'
	from /path/to/rbs-1.0.0/lib/rbs/definition_builder/method_builder.rb:48:in `block in each'
	from /home/pocke/.rbenv/versions/trunk/lib/ruby/3.1.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
	from /home/pocke/.rbenv/versions/trunk/lib/ruby/3.1.0/tsort.rb:431:in `each_strongly_connected_component_from'
	from /home/pocke/.rbenv/versions/trunk/lib/ruby/3.1.0/tsort.rb:349:in `block in each_strongly_connected_component'
	from /path/to/rbs-1.0.0/lib/rbs/definition_builder/method_builder.rb:65:in `each_value'
	from /path/to/rbs-1.0.0/lib/rbs/definition_builder/method_builder.rb:65:in `tsort_each_node'
	from /home/pocke/.rbenv/versions/trunk/lib/ruby/3.1.0/tsort.rb:347:in `call'
	from /home/pocke/.rbenv/versions/trunk/lib/ruby/3.1.0/tsort.rb:347:in `each_strongly_connected_component'
	from /home/pocke/.rbenv/versions/trunk/lib/ruby/3.1.0/tsort.rb:316:in `each_strongly_connected_component'
	from /path/to/rbs-1.0.0/lib/rbs/definition_builder/method_builder.rb:43:in `each'
	from /path/to/rbs-1.0.0/lib/rbs/definition_builder.rb:485:in `validate_type_params'
	from /path/to/rbs-1.0.0/lib/rbs/definition_builder.rb:150:in `block (2 levels) in build_instance'
	from <internal:kernel>:90:in `tap'
	from /path/to/rbs-1.0.0/lib/rbs/definition_builder.rb:146:in `block in build_instance'
	from /path/to/rbs-1.0.0/lib/rbs/definition_builder.rb:765:in `try_cache'
	from /path/to/rbs-1.0.0/lib/rbs/definition_builder.rb:135:in `build_instance'
	from /path/to/rbs-1.0.0/lib/rbs/cli.rb:423:in `block in run_validate'
	from /path/to/rbs-1.0.0/lib/rbs/cli.rb:421:in `each_key'
	from /path/to/rbs-1.0.0/lib/rbs/cli.rb:421:in `run_validate'
	from /path/to/rbs-1.0.0/lib/rbs/cli.rb:113:in `run'
	from /path/to/rbs-1.0.0/exe/rbs:7:in `<top (required)>'
	from /home/pocke/.rbenv/versions/trunk/bin/rbs:23:in `load'
	from /home/pocke/.rbenv/versions/trunk/bin/rbs:23:in `<main>'
```

# Expected Behavior


I think it should cause a syntax error.
The type alias `T` can't be referred because a name that starts with a capital letter is a class or module. So it is confusing if it doesn't cause a syntax error.



Discussion:

Patch:
diff --git a/lib/rbs/parser.rb b/lib/rbs/parser.rb
index 1e22106bc..2013949b1 100644
--- a/lib/rbs/parser.rb
+++ b/lib/rbs/parser.rb
@@ -8,7 +8,7 @@
 module RBS
   class Parser < Racc::Parser
 
-module_eval(<<'...end parser.y/module_eval...', 'parser.y', 1058)
+module_eval(<<'...end parser.y/module_eval...', 'parser.y', 1068)
 
 Types = RBS::Types
 Namespace = RBS::Namespace
@@ -401,40 +401,40 @@ def initialize(message, subject:, location:)
 ##### State transition tables begin ###
 
 clist = [
-'349,350,33,351,5,113,37,33,33,42,336,392,49,33,33,348,43,244,334,391',
-'40,41,55,56,57,58,59,60,61,62,353,33,63,54,64,65,66,77,67,68,69,83,33',
-'32,53,344,338,339,32,32,342,340,343,303,32,32,33,341,82,70,71,72,74',
-'76,75,337,346,347,73,78,80,126,32,124,48,84,85,81,86,349,350,33,351',
-'32,96,97,98,99,104,49,39,33,33,33,348,205,205,32,125,40,41,55,56,57',
-'58,59,60,61,62,79,185,63,54,64,65,66,77,67,68,69,83,53,32,160,344,338',
-'339,53,53,342,340,343,32,32,32,125,341,82,70,71,72,74,76,75,337,346',
-'347,73,78,80,40,41,161,222,84,85,81,86,349,350,120,351,180,96,97,98',
-'99,164,179,101,102,165,103,348,166,278,325,358,223,39,55,56,57,58,59',
-'60,61,62,79,395,63,54,64,65,66,77,67,68,69,83,279,125,125,344,338,339',
-'396,397,342,340,343,321,40,41,125,341,82,70,71,72,74,76,75,337,346,347',
-'73,78,80,167,317,125,125,84,85,81,86,349,350,168,351,170,96,97,98,99',
-'2,3,4,40,41,171,348,40,41,40,41,40,41,55,56,57,58,59,60,61,62,79,172',
-'63,54,64,65,66,77,67,68,69,83,40,41,113,344,338,339,40,41,342,340,343',
-'40,41,40,41,341,82,70,71,72,74,76,75,337,346,347,73,78,80,349,350,178',
-'351,84,85,81,86,-4,181,-241,184,33,41,117,348,-241,40,41,40,41,113,55',
+'351,352,33,353,5,113,37,33,33,42,338,394,49,33,33,350,43,245,336,393',
+'40,41,55,56,57,58,59,60,61,62,355,33,63,54,64,65,66,77,67,68,69,83,33',
+'32,53,346,340,341,32,32,344,342,345,305,32,32,33,343,82,70,71,72,74',
+'76,75,339,348,349,73,78,80,126,32,124,48,84,85,81,86,351,352,33,353',
+'32,96,97,98,99,104,49,39,33,33,33,350,205,205,32,125,40,41,55,56,57',
+'58,59,60,61,62,79,185,63,54,64,65,66,77,67,68,69,83,53,32,160,346,340',
+'341,53,53,344,342,345,32,32,32,125,343,82,70,71,72,74,76,75,339,348',
+'349,73,78,80,40,41,161,223,84,85,81,86,351,352,120,353,180,96,97,98',
+'99,164,179,101,102,165,103,350,166,280,327,360,224,39,55,56,57,58,59',
+'60,61,62,79,397,63,54,64,65,66,77,67,68,69,83,281,125,125,346,340,341',
+'398,399,344,342,345,323,40,41,125,343,82,70,71,72,74,76,75,339,348,349',
+'73,78,80,167,319,125,125,84,85,81,86,351,352,168,353,170,96,97,98,99',
+'2,3,4,40,41,171,350,40,41,40,41,40,41,55,56,57,58,59,60,61,62,79,172',
+'63,54,64,65,66,77,67,68,69,83,40,41,113,346,340,341,40,41,344,342,345',
+'40,41,40,41,343,82,70,71,72,74,76,75,339,348,349,73,78,80,351,352,178',
+'353,84,85,81,86,-4,181,-242,184,33,41,117,350,-242,40,41,40,41,113,55',
 '56,57,58,59,60,61,62,79,187,63,54,64,65,66,77,67,68,69,83,40,41,180',
-'344,338,339,281,282,342,340,343,32,370,371,188,341,82,70,71,72,74,76',
-'75,337,346,347,73,78,80,349,350,-104,351,84,85,81,86,40,41,40,41,-105',
-'39,-106,348,386,387,40,41,40,41,55,56,57,58,59,60,61,62,79,-107,63,54',
-'64,65,66,77,67,68,69,83,40,41,-108,344,338,339,40,41,342,340,343,40',
-'41,40,41,341,82,70,71,72,74,76,75,337,346,347,73,78,80,40,41,-109,-110',
-'84,85,81,86,349,350,-111,351,-112,96,97,98,99,-113,-114,48,-129,193',
-'194,348,195,196,197,198,206,207,55,56,57,58,59,60,61,62,79,42,63,54',
-'64,65,66,77,67,68,69,83,224,238,247,344,338,339,248,250,342,340,343',
-'252,253,42,255,341,82,70,71,72,74,76,75,337,346,347,73,78,80,349,350',
-'255,351,84,85,81,86,255,261,42,224,265,269,271,348,273,274,310,269,312',
-'273,55,56,57,58,59,60,61,62,79,322,63,54,64,65,66,77,67,68,69,83,323',
-'324,327,344,338,339,327,327,342,340,343,357,359,366,367,341,82,70,71',
-'72,74,76,75,337,346,347,73,78,80,368,369,372,374,84,85,81,86,33,377',
-'377,96,97,98,99,377,390,393,22,23,21,394,26,-219,25,401,30,402,131,132',
-'133,134,135,136,137,138,142,16,139,130,140,141,66,77,67,68,69,83,403',
-'32,405,410,411,28,412,156,413,157,159,410,,,,,82,70,71,72,74,76,75,',
-',,73,78,80,,,,,84,85,81,86,33,,,96,97,98,99,,,,22,23,21,,26,,25,,30',
+'346,340,341,283,284,344,342,345,32,372,373,188,343,82,70,71,72,74,76',
+'75,339,348,349,73,78,80,351,352,-104,353,84,85,81,86,40,41,40,41,-105',
+'39,-106,350,388,389,40,41,40,41,55,56,57,58,59,60,61,62,79,-107,63,54',
+'64,65,66,77,67,68,69,83,40,41,-108,346,340,341,40,41,344,342,345,40',
+'41,40,41,343,82,70,71,72,74,76,75,339,348,349,73,78,80,40,41,-109,-110',
+'84,85,81,86,351,352,-111,353,-112,96,97,98,99,-113,-114,48,-129,193',
+'194,350,195,196,197,198,206,207,55,56,57,58,59,60,61,62,79,42,63,54',
+'64,65,66,77,67,68,69,83,225,239,248,346,340,341,249,250,344,342,345',
+'252,254,255,42,343,82,70,71,72,74,76,75,339,348,349,73,78,80,351,352',
+'257,353,84,85,81,86,257,257,263,42,225,267,271,350,273,275,276,312,271',
+'314,55,56,57,58,59,60,61,62,79,275,63,54,64,65,66,77,67,68,69,83,324',
+'325,326,346,340,341,329,329,344,342,345,329,359,361,368,343,82,70,71',
+'72,74,76,75,339,348,349,73,78,80,369,370,371,374,84,85,81,86,33,376',
+'379,96,97,98,99,379,379,392,22,23,21,395,26,-219,25,396,30,403,131,132',
+'133,134,135,136,137,138,142,16,139,130,140,141,66,77,67,68,69,83,404',
+'32,405,407,412,28,413,156,414,157,159,415,412,,,,82,70,71,72,74,76,75',
+',,,73,78,80,,,,,84,85,81,86,33,,,96,97,98,99,,,,22,23,21,,26,,25,,30',
 ',131,132,133,134,135,136,137,138,142,16,139,130,140,141,66,77,67,68',
 '69,83,,32,,,174,28,,177,,175,,,,,,,82,70,71,72,74,76,75,,,,73,78,80',
 '176,,,,84,85,81,86,33,,,96,97,98,99,,,,22,23,21,,26,-219,25,,30,,131',
@@ -444,30 +444,30 @@ def initialize(message, subject:, location:)
 '135,136,137,138,142,16,139,130,140,141,66,77,67,68,69,83,,32,,,,28,',
 '156,,157,159,,,,,,82,70,71,72,74,76,75,,,,73,78,80,,,,,84,85,81,86,33',
 ',,96,97,98,99,,,,22,23,21,,26,-219,25,,30,,131,132,133,134,135,136,137',
-'138,142,16,139,130,140,141,66,77,67,68,69,83,,32,,,,28,,230,,,159,,',
+'138,142,16,139,130,140,141,66,77,67,68,69,83,,32,,,,28,,231,,,159,,',
 ',,,82,70,71,72,74,76,75,,,,73,78,80,,,,,84,85,81,86,33,,,96,97,98,99',
 ',,,22,23,21,,26,-219,25,,30,,131,132,133,134,135,136,137,138,142,16',
 '139,130,140,141,66,77,67,68,69,83,,32,,,,28,,156,,157,159,,,,,,82,70',
 '71,72,74,76,75,,,,73,78,80,,,,,84,85,81,86,33,,,96,97,98,99,,,,22,23',
 '21,,26,-219,25,,30,,131,132,133,134,135,136,137,138,142,16,139,130,140',
-'141,66,77,67,68,69,83,,32,,,,28,,230,,,159,,,,,,82,70,71,72,74,76,75',
+'141,66,77,67,68,69,83,,32,,,,28,,231,,,159,,,,,,82,70,71,72,74,76,75',
 ',,,73,78,80,,,,,84,85,81,86,96,97,98,99,,,,90,89,91,,,,,,,,55,56,57',
 '58,59,60,61,62,79,,63,54,64,65,66,77,67,68,69,83,,,,,,,,,190,,191,,',
 ',,,82,70,71,72,74,76,75,,95,94,73,78,80,,,,,84,85,81,86,96,97,98,99',
 ',,,90,89,91,,,,,,40,41,55,56,57,58,59,60,61,62,79,,63,54,64,65,66,77',
 '67,68,69,83,192,,,,,,,,,,,,,,,,82,70,71,72,74,76,75,,95,94,73,78,80',
 '96,97,98,99,84,85,81,86,,,,,,,,,,55,56,57,58,59,60,61,62,79,,63,54,64',
-'65,66,77,67,68,69,83,190,,191,,,,,230,,,159,,,,,,82,70,71,72,74,76,75',
+'65,66,77,67,68,69,83,190,,191,,,,,231,,,159,,,,,,82,70,71,72,74,76,75',
 '190,,191,73,78,80,96,97,98,99,84,85,81,86,,,,,,,,40,41,55,56,57,58,59',
-'60,61,62,79,,63,54,64,65,66,77,67,68,69,83,192,40,41,,,,,230,,,159,',
+'60,61,62,79,,63,54,64,65,66,77,67,68,69,83,192,40,41,,,,,231,,,159,',
 ',,,,82,70,71,72,74,76,75,192,,,73,78,80,96,97,98,99,84,85,81,86,,,,',
 ',,,,,55,56,57,58,59,60,61,62,79,,63,54,64,65,66,77,67,68,69,83,190,',
 '191,190,,191,190,,191,,,,,,,,82,70,71,72,74,76,75,,,,73,78,80,,,,,84',
-'85,81,86,,,,,,,,40,41,,40,41,,40,41,-241,,33,,117,,-241,,,298,299,113',
-',,192,,,192,,,192,,-241,,33,,117,,-241,,300,298,299,113,,,,,,295,294',
-',,32,-241,,33,,117,,-241,,300,298,299,113,,,,286,,295,294,,174,32,,177',
-',175,,,321,,300,,,,,,,309,,295,294,,33,32,,176,,317,318,314,315,316',
-'22,23,21,319,26,,25,313,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27',
+'85,81,86,,,,,,,,40,41,,40,41,,40,41,-242,,33,,117,,-242,,,300,301,113',
+',,192,,,192,,,192,,-242,,33,,117,,-242,,302,300,301,113,,,,,,297,296',
+',,32,-242,,33,,117,,-242,,302,300,301,113,,,,288,,297,296,,174,32,,177',
+',175,,,323,,302,,,,,,,311,,297,296,,33,32,,176,,319,320,316,317,318',
+'22,23,21,321,26,,25,315,30,,8,12,19,20,9,10,13,14,15,16,17,18,11,27',
 ',,33,,,,,32,,,,28,22,23,21,,26,,25,45,30,,8,12,19,20,9,10,13,14,15,16',
 '17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12,19,20,9,10',
 '13,14,15,16,17,18,11,27,,,33,,,,,32,,,,28,22,23,21,,26,,25,,30,,8,12',
@@ -523,44 +523,44 @@ def initialize(message, subject:, location:)
         end
 
 clist = [
-'321,321,48,321,1,275,5,177,215,7,320,377,28,216,217,321,24,216,320,377',
-'44,44,321,321,321,321,321,321,321,321,321,244,321,321,321,321,321,321',
-'321,321,321,321,265,48,28,321,321,321,177,215,321,321,321,275,216,217',
-'271,321,321,321,321,321,321,321,321,321,321,321,321,321,321,47,244,46',
-'27,321,321,321,321,328,328,273,328,265,328,328,328,328,32,119,35,317',
-'318,319,328,160,206,271,46,47,47,328,328,328,328,328,328,328,328,328',
-'123,328,328,328,328,328,328,328,328,328,328,119,273,51,328,328,328,160',
-'206,328,328,328,317,318,319,123,328,328,328,328,328,328,328,328,328',
-'328,328,328,328,328,6,6,51,183,328,328,328,328,329,329,36,329,116,329',
-'329,329,329,87,116,31,31,88,31,329,89,266,302,326,183,6,329,329,329',
-'329,329,329,329,329,329,382,329,329,329,329,329,329,329,329,329,329',
-'266,302,326,329,329,329,383,384,329,329,329,308,169,169,382,329,329',
-'329,329,329,329,329,329,329,329,329,329,329,329,90,308,383,384,329,329',
-'329,329,330,330,91,330,93,330,330,330,330,0,0,0,186,186,94,330,209,209',
-'210,210,211,211,330,330,330,330,330,330,330,330,330,95,330,330,330,330',
-'330,330,330,330,330,330,212,212,113,330,330,330,213,213,330,330,330',
-'214,214,219,219,330,330,330,330,330,330,330,330,330,330,330,330,330',
-'330,354,354,115,354,330,330,330,330,34,117,34,120,34,121,34,354,34,220',
-'220,221,221,34,354,354,354,354,354,354,354,354,354,127,354,354,354,354',
-'354,354,354,354,354,354,262,262,128,354,354,354,268,268,354,354,354',
-'34,345,345,129,354,354,354,354,354,354,354,354,354,354,354,354,354,354',
-'372,372,130,372,354,354,354,354,355,355,356,356,131,34,132,372,369,369',
-'375,375,378,378,372,372,372,372,372,372,372,372,372,133,372,372,372',
-'372,372,372,372,372,372,372,380,380,134,372,372,372,389,389,372,372',
-'372,404,404,406,406,372,372,372,372,372,372,372,372,372,372,372,372',
-'372,372,407,407,135,136,372,372,372,372,385,385,137,385,138,385,385',
-'385,385,139,140,141,142,145,146,385,148,150,153,154,161,162,385,385',
-'385,385,385,385,385,385,385,163,385,385,385,385,385,385,385,385,385',
-'385,188,204,218,385,385,385,223,228,385,385,385,239,240,241,242,385',
-'385,385,385,385,385,385,385,385,385,385,385,385,385,412,412,243,412',
-'385,385,385,385,245,246,249,252,254,255,256,412,257,259,277,279,280',
-'284,412,412,412,412,412,412,412,412,412,298,412,412,412,412,412,412',
-'412,412,412,412,299,300,314,412,412,412,315,316,412,412,412,324,327',
-'331,332,412,412,412,412,412,412,412,412,412,412,412,412,412,412,333',
-'335,353,357,412,412,412,412,49,361,363,49,49,49,49,365,376,379,49,49',
-'49,381,49,49,49,386,49,387,49,49,49,49,49,49,49,49,49,49,49,49,49,49',
-'49,49,49,49,49,49,388,49,392,398,400,49,403,49,409,49,49,413,,,,,49',
-'49,49,49,49,49,49,,,,49,49,49,,,,,49,49,49,49,156,,,156,156,156,156',
+'323,323,48,323,1,277,5,177,215,7,322,379,28,216,217,323,24,216,322,379',
+'44,44,323,323,323,323,323,323,323,323,323,245,323,323,323,323,323,323',
+'323,323,323,323,267,48,28,323,323,323,177,215,323,323,323,277,216,217',
+'273,323,323,323,323,323,323,323,323,323,323,323,323,323,323,47,245,46',
+'27,323,323,323,323,330,330,275,330,267,330,330,330,330,32,119,35,319',
+'320,321,330,160,206,273,46,47,47,330,330,330,330,330,330,330,330,330',
+'123,330,330,330,330,330,330,330,330,330,330,119,275,51,330,330,330,160',
+'206,330,330,330,319,320,321,123,330,330,330,330,330,330,330,330,330',
+'330,330,330,330,330,6,6,51,183,330,330,330,330,331,331,36,331,116,331',
+'331,331,331,87,116,31,31,88,31,331,89,268,304,328,183,6,331,331,331',
+'331,331,331,331,331,331,384,331,331,331,331,331,331,331,331,331,331',
+'268,304,328,331,331,331,385,386,331,331,331,310,169,169,384,331,331',
+'331,331,331,331,331,331,331,331,331,331,331,331,90,310,385,386,331,331',
+'331,331,332,332,91,332,93,332,332,332,332,0,0,0,186,186,94,332,209,209',
+'210,210,211,211,332,332,332,332,332,332,332,332,332,95,332,332,332,332',
+'332,332,332,332,332,332,212,212,113,332,332,332,213,213,332,332,332',
+'214,214,220,220,332,332,332,332,332,332,332,332,332,332,332,332,332',
+'332,356,356,115,356,332,332,332,332,34,117,34,120,34,121,34,356,34,221',
+'221,222,222,34,356,356,356,356,356,356,356,356,356,127,356,356,356,356',
+'356,356,356,356,356,356,264,264,128,356,356,356,270,270,356,356,356',
+'34,347,347,129,356,356,356,356,356,356,356,356,356,356,356,356,356,356',
+'374,374,130,374,356,356,356,356,357,357,358,358,131,34,132,374,371,371',
+'377,377,380,380,374,374,374,374,374,374,374,374,374,133,374,374,374',
+'374,374,374,374,374,374,374,382,382,134,374,374,374,391,391,374,374',
+'374,406,406,408,408,374,374,374,374,374,374,374,374,374,374,374,374',
+'374,374,409,409,135,136,374,374,374,374,387,387,137,387,138,387,387',
+'387,387,139,140,141,142,145,146,387,148,150,153,154,161,162,387,387',
+'387,387,387,387,387,387,387,163,387,387,387,387,387,387,387,387,387',
+'387,188,204,218,387,387,387,219,224,387,387,387,229,240,241,242,387',
+'387,387,387,387,387,387,387,387,387,387,387,387,387,414,414,243,414',
+'387,387,387,387,244,246,247,251,254,256,257,414,258,259,261,279,281',
+'282,414,414,414,414,414,414,414,414,414,286,414,414,414,414,414,414',
+'414,414,414,414,300,301,302,414,414,414,316,317,414,414,414,318,326',
+'329,333,414,414,414,414,414,414,414,414,414,414,414,414,414,414,334',
+'335,337,355,414,414,414,414,49,359,363,49,49,49,49,365,367,378,49,49',
+'49,381,49,49,49,383,49,388,49,49,49,49,49,49,49,49,49,49,49,49,49,49',
+'49,49,49,49,49,49,389,49,390,394,400,49,402,49,405,49,49,411,415,,,',
+'49,49,49,49,49,49,49,,,,49,49,49,,,,,49,49,49,49,156,,,156,156,156,156',
 ',,,156,156,156,,156,,156,,156,,156,156,156,156,156,156,156,156,156,156',
 '156,156,156,156,156,156,156,156,156,156,,156,,,114,156,,114,,114,,,',
 ',,,156,156,156,156,156,156,156,,,,156,156,156,114,,,,156,156,156,156',
@@ -577,10 +577,10 @@ def initialize(message, subject:, location:)
 ',205,205,205,205,,,,205,205,205,,205,205,205,,205,,205,205,205,205,205',
 '205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,,205,,,',
 '205,,205,,205,205,,,,,,205,205,205,205,205,205,205,,,,205,205,205,,',
-',,205,205,205,205,250,,,250,250,250,250,,,,250,250,250,,250,250,250',
-',250,,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250',
-'250,250,250,250,,250,,,,250,,250,,,250,,,,,,250,250,250,250,250,250',
-'250,,,,250,250,250,,,,,250,250,250,250,30,30,30,30,,,,30,30,30,,,,,',
+',,205,205,205,205,252,,,252,252,252,252,,,,252,252,252,,252,252,252',
+',252,,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252',
+'252,252,252,252,,252,,,,252,,252,,,252,,,,,,252,252,252,252,252,252',
+'252,,,,252,252,252,,,,,252,252,252,252,30,30,30,30,,,,30,30,30,,,,,',
 ',,30,30,30,30,30,30,30,30,30,,30,30,30,30,30,30,30,30,30,30,,,,,,,,',
 '143,,143,,,,,,30,30,30,30,30,30,30,,30,30,30,30,30,,,,,30,30,30,30,165',
 '165,165,165,,,,165,165,165,,,,,,143,143,165,165,165,165,165,165,165',
@@ -591,14 +591,14 @@ def initialize(message, subject:, location:)
 '197,197,197,197,201,,201,197,197,197,198,198,198,198,197,197,197,197',
 ',,,,,,,199,199,198,198,198,198,198,198,198,198,198,,198,198,198,198',
 '198,198,198,198,198,198,199,201,201,,,,,198,,,198,,,,,,198,198,198,198',
-'198,198,198,201,,,198,198,198,230,230,230,230,198,198,198,198,,,,,,',
-',,,230,230,230,230,230,230,230,230,230,,230,230,230,230,230,230,230',
-'230,230,230,202,,202,203,,203,234,,234,,,,,,,,230,230,230,230,230,230',
-'230,,,,230,230,230,,,,,230,230,230,230,,,,,,,,202,202,,203,203,,234',
-'234,272,,272,,272,,272,,,272,272,272,,,202,,,203,,,234,,276,,276,,276',
-',276,,272,276,276,276,,,,,,272,272,,,272,283,,283,,283,,283,,276,283',
-'283,283,,,,272,,276,276,,285,276,,285,,285,,,285,,283,,,,,,,276,,283',
-'283,,2,283,,285,,285,285,285,285,285,2,2,2,285,2,,2,283,2,,2,2,2,2,2',
+'198,198,198,201,,,198,198,198,231,231,231,231,198,198,198,198,,,,,,',
+',,,231,231,231,231,231,231,231,231,231,,231,231,231,231,231,231,231',
+'231,231,231,202,,202,203,,203,235,,235,,,,,,,,231,231,231,231,231,231',
+'231,,,,231,231,231,,,,,231,231,231,231,,,,,,,,202,202,,203,203,,235',
+'235,274,,274,,274,,274,,,274,274,274,,,202,,,203,,,235,,278,,278,,278',
+',278,,274,278,278,278,,,,,,274,274,,,274,285,,285,,285,,285,,278,285',
+'285,285,,,,274,,278,278,,287,278,,287,,287,,,287,,285,,,,,,,278,,285',
+'285,,2,285,,287,,287,287,287,287,287,2,2,2,287,2,,2,285,2,,2,2,2,2,2',
 '2,2,2,2,2,2,2,2,2,,,25,,,,,2,,,,2,25,25,25,,25,,25,25,25,,25,25,25,25',
 '25,25,25,25,25,25,25,25,25,25,,,26,,,,,25,,,,25,26,26,26,,26,,26,,26',
 ',26,26,26,26,26,26,26,26,26,26,26,26,26,26,,,40,,,,,26,,,,26,40,40,40',
@@ -630,31 +630,31 @@ def initialize(message, subject:, location:)
 '181,181,181,181,181,,,200,,,,,181,,,,181,200,200,200,,200,,200,,200',
 ',200,200,200,200,200,200,200,200,200,200,200,200,200,200,,,207,,,,,200',
 ',,,200,207,207,207,,207,,207,,207,,207,207,207,207,207,207,207,207,207',
-'207,207,207,207,207,,,224,,,,,207,,,,207,224,224,224,,224,,224,,224',
-',224,224,224,224,224,224,224,224,224,224,224,224,224,224,,,247,,,,,224',
-',,,224,247,247,247,,247,,247,,247,,247,247,247,247,247,247,247,247,247',
-'247,247,247,247,247,,,274,,,,,247,,,,247,274,274,274,,274,,274,,274',
-',274,274,274,274,274,274,274,274,274,274,274,274,274,274,,,310,,,,,274',
-',,,274,310,310,310,,310,,310,,310,,310,310,310,310,310,310,310,310,310',
-'310,310,310,310,310,,,322,,,,,310,,,,310,322,322,322,,322,,322,,322',
-',322,322,322,322,322,322,322,322,322,322,322,322,322,322,,,323,,,,,322',
-',,,322,323,323,323,,323,,323,,323,,323,323,323,323,323,323,323,323,323',
-'323,323,323,323,323,,,360,,,,,323,,,,323,360,360,360,,360,,360,,360',
-',360,360,360,360,360,360,360,360,360,360,360,360,360,360,,,362,,,,,360',
-',,,360,362,362,362,,362,,362,,362,,362,362,362,362,362,362,362,362,362',
-'362,362,362,362,362,,,364,,,,,362,,,,362,364,364,364,,364,,364,,364',
-',364,364,364,364,364,364,364,364,364,364,364,364,364,364,,,366,,,,,364',
-',,,364,366,366,366,,366,,366,,366,,366,366,366,366,366,366,366,366,366',
-'366,366,366,366,366,,,367,,,,,366,,,,366,367,367,367,,367,,367,,367',
-',367,367,367,367,367,367,367,367,367,367,367,367,367,367,,,368,,,,,367',
-',,,367,368,368,368,,368,,368,,368,,368,368,368,368,368,368,368,368,368',
-'368,368,368,368,368,,,374,,,,,368,,,,368,374,374,374,,374,,374,,374',
-',374,374,374,374,374,374,374,374,374,374,374,374,374,374,,,390,,,,,374',
-',,,374,390,390,390,,390,,390,,390,,390,390,390,390,390,390,390,390,390',
-'390,390,390,390,390,,,393,,,,,390,,,,390,393,393,393,,393,,393,,393',
-',393,393,393,393,393,393,393,393,393,393,393,393,393,393,,,394,,,,,393',
-',,,393,394,394,394,,394,,394,,394,,394,394,394,394,394,394,394,394,394',
-'394,394,394,394,394,,,,,,,,394,,,,394' ]
+'207,207,207,207,207,,,225,,,,,207,,,,207,225,225,225,,225,,225,,225',
+',225,225,225,225,225,225,225,225,225,225,225,225,225,225,,,248,,,,,225',
+',,,225,248,248,248,,248,,248,,248,,248,248,248,248,248,248,248,248,248',
+'248,248,248,248,248,,,276,,,,,248,,,,248,276,276,276,,276,,276,,276',
+',276,276,276,276,276,276,276,276,276,276,276,276,276,276,,,312,,,,,276',
+',,,276,312,312,312,,312,,312,,312,,312,312,312,312,312,312,312,312,312',
+'312,312,312,312,312,,,324,,,,,312,,,,312,324,324,324,,324,,324,,324',
+',324,324,324,324,324,324,324,324,324,324,324,324,324,324,,,325,,,,,324',
+',,,324,325,325,325,,325,,325,,325,,325,325,325,325,325,325,325,325,325',
+'325,325,325,325,325,,,362,,,,,325,,,,325,362,362,362,,362,,362,,362',
+',362,362,362,362,362,362,362,362,362,362,362,362,362,362,,,364,,,,,362',
+',,,362,364,364,364,,364,,364,,364,,364,364,364,364,364,364,364,364,364',
+'364,364,364,364,364,,,366,,,,,364,,,,364,366,366,366,,366,,366,,366',
+',366,366,366,366,366,366,366,366,366,366,366,366,366,366,,,368,,,,,366',
+',,,366,368,368,368,,368,,368,,368,,368,368,368,368,368,368,368,368,368',
+'368,368,368,368,368,,,369,,,,,368,,,,368,369,369,369,,369,,369,,369',
+',369,369,369,369,369,369,369,369,369,369,369,369,369,369,,,370,,,,,369',
+',,,369,370,370,370,,370,,370,,370,,370,370,370,370,370,370,370,370,370',
+'370,370,370,370,370,,,376,,,,,370,,,,370,376,376,376,,376,,376,,376',
+',376,376,376,376,376,376,376,376,376,376,376,376,376,376,,,392,,,,,376',
+',,,376,392,392,392,,392,,392,,392,,392,392,392,392,392,392,392,392,392',
+'392,392,392,392,392,,,395,,,,,392,,,,392,395,395,395,,395,,395,,395',
+',395,395,395,395,395,395,395,395,395,395,395,395,395,395,,,396,,,,,395',
+',,,395,396,396,396,,396,,396,,396,,396,396,396,396,396,396,396,396,396',
+'396,396,396,396,396,,,,,,,,396,,,,396' ]
         racc_action_check = arr = ::Array.new(3008, nil)
         idx = 0
         clist.each do |str|
@@ -686,175 +686,175 @@ def initialize(message, subject:, location:)
    nil,  2310,   nil,   132,   nil,   nil,   202,   nil,   450,   nil,
    nil,   nil,   nil,   nil,   758,   835,   912,  1280,  1346,  1321,
   2346,  1344,  1453,  1456,   478,   989,    78,  2382,   nil,   206,
-   208,   210,   232,   238,   243,     4,     9,    10,   446,   245,
-   278,   280,   nil,   504,  2418,   nil,   nil,   nil,   461,   nil,
-  1412,   nil,   nil,   nil,  1459,   nil,   nil,   nil,   nil,   492,
-   489,   462,   494,   511,    27,   517,   533,  2454,   nil,   488,
-  1066,   nil,   490,   nil,   482,   463,   499,   499,   nil,   526,
-   nil,   nil,   303,   nil,   nil,    38,   154,   nil,   279,   nil,
-   nil,    52,  1506,    77,  2490,    -8,  1528,   527,   nil,   469,
-   547,   nil,   nil,  1550,   504,  1537,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   516,   527,
-   515,   nil,   155,   nil,   nil,   nil,   nil,   nil,   168,   nil,
-  2526,   nil,   nil,   nil,   541,   545,   546,    87,    88,    89,
-   -62,    -2,  2562,  2598,   571,   nil,   156,   526,    77,   156,
-   235,   564,   565,   580,   nil,   562,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,   nil,   nil,   311,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,   545,   306,   340,   342,   559,   nil,   nil,
-  2634,   591,  2670,   592,  2706,   597,  2742,  2778,  2814,   363,
-   nil,   nil,   377,   nil,  2850,   350,   572,     0,   352,   573,
-   374,   577,   168,   185,   186,   456,   568,   570,   616,   380,
-  2886,   nil,   631,  2922,  2958,   nil,   nil,   nil,   593,   nil,
-   608,   nil,   nil,   597,   385,   nil,   387,   403,   nil,   609,
-   nil,   nil,   527,   601,   nil,   nil ]
+   208,   210,   232,   238,   243,     4,     9,    10,   446,   503,
+   245,   278,   280,   nil,   505,  2418,   nil,   nil,   nil,   465,
+   nil,  1412,   nil,   nil,   nil,  1459,   nil,   nil,   nil,   nil,
+   493,   490,   463,   511,   517,    27,   518,   534,  2454,   nil,
+   nil,   489,  1066,   nil,   491,   nil,   483,   464,   501,   500,
+   nil,   527,   nil,   nil,   303,   nil,   nil,    38,   154,   nil,
+   279,   nil,   nil,    52,  1506,    77,  2490,    -8,  1528,   528,
+   nil,   470,   548,   nil,   nil,  1550,   514,  1537,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   527,   528,   516,   nil,   155,   nil,   nil,   nil,   nil,   nil,
+   168,   nil,  2526,   nil,   nil,   nil,   545,   546,   550,    87,
+    88,    89,   -62,    -2,  2562,  2598,   572,   nil,   156,   527,
+    77,   156,   235,   565,   580,   581,   nil,   563,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   311,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   546,   306,   340,   342,   565,
+   nil,   nil,  2634,   592,  2670,   597,  2706,   598,  2742,  2778,
+  2814,   363,   nil,   nil,   377,   nil,  2850,   350,   573,     0,
+   352,   577,   374,   581,   168,   185,   186,   456,   570,   591,
+   618,   380,  2886,   nil,   632,  2922,  2958,   nil,   nil,   nil,
+   594,   nil,   610,   nil,   nil,   599,   385,   nil,   387,   403,
+   nil,   612,   nil,   nil,   527,   602,   nil,   nil ]
 
 racc_action_default = [
-  -245,  -245,  -241,    -6,   -15,  -245,    -4,  -157,  -160,  -161,
+  -246,  -246,  -242,    -6,   -15,  -246,    -4,  -157,  -160,  -161,
   -162,  -163,  -164,  -165,  -166,  -167,  -168,  -169,  -170,  -171,
-  -172,  -173,  -174,  -175,  -176,  -241,  -241,  -245,   -80,  -184,
-  -245,  -245,  -242,  -244,   -16,    -4,  -147,   416,    -1,    -5,
-  -241,  -241,  -183,  -241,  -185,  -178,  -245,  -245,  -241,  -241,
-  -182,  -245,  -204,  -241,  -104,  -105,  -106,  -107,  -108,  -109,
+  -172,  -173,  -174,  -175,  -176,  -242,  -242,  -246,   -80,  -184,
+  -246,  -246,  -243,  -245,   -16,    -4,  -147,   418,    -1,    -5,
+  -242,  -242,  -183,  -242,  -185,  -178,  -246,  -246,  -242,  -242,
+  -182,  -246,  -204,  -242,  -104,  -105,  -106,  -107,  -108,  -109,
   -110,  -111,  -112,  -113,  -114,  -115,  -116,  -117,  -118,  -119,
   -120,  -121,  -122,  -123,  -124,  -125,  -126,  -127,  -128,  -129,
-  -130,  -131,  -132,  -133,  -134,  -135,  -136,  -245,  -188,  -245,
-  -245,  -245,  -241,  -245,  -245,  -245,  -199,  -200,  -201,  -202,
-  -235,  -236,  -237,  -238,  -243,    -2,    -7,    -8,    -9,   -10,
-   -11,   -12,   -13,   -16,  -245,  -245,  -245,  -245,    -3,   -80,
-  -245,  -158,  -159,  -245,  -179,  -241,  -180,  -245,  -245,  -245,
+  -130,  -131,  -132,  -133,  -134,  -135,  -136,  -246,  -188,  -246,
+  -246,  -246,  -242,  -246,  -246,  -246,  -199,  -200,  -201,  -202,
+  -235,  -236,  -237,  -238,  -244,    -2,    -7,    -8,    -9,   -10,
+   -11,   -12,   -13,   -16,  -246,  -246,  -246,  -246,    -3,   -80,
+  -246,  -158,  -159,  -246,  -179,  -242,  -180,  -246,  -246,  -246,
   -170,  -160,  -164,  -171,  -172,  -161,  -162,  -165,  -166,  -169,
-  -163,  -115,  -167,  -231,  -197,  -245,  -208,  -209,  -211,  -212,
-  -214,  -215,  -218,  -221,  -223,  -224,  -241,  -241,  -241,  -241,
-  -245,  -245,  -245,  -206,  -187,  -245,  -241,  -241,  -241,  -193,
-  -241,  -241,  -241,   -17,   -14,   -14,   -14,  -241,  -241,  -241,
-  -240,  -241,   -79,  -245,  -149,  -177,  -186,  -181,   -81,  -225,
-  -232,  -233,  -234,  -198,  -241,  -241,  -241,  -219,  -219,  -231,
-  -241,  -231,  -231,  -231,  -245,  -241,  -245,  -241,  -189,  -190,
-  -191,  -192,  -194,  -195,  -196,  -241,  -241,  -241,  -245,  -154,
-  -155,  -156,  -148,  -245,  -241,  -207,  -215,  -210,  -217,  -213,
-  -245,  -220,  -222,  -226,  -231,  -227,  -228,  -230,   -82,  -245,
-  -245,  -203,  -137,  -137,  -241,  -137,  -245,  -241,  -150,  -205,
-  -241,  -229,  -245,   -83,   -19,  -145,   -24,   -30,   -26,   -29,
-   -57,  -239,  -153,  -216,   -30,  -241,  -245,  -139,  -142,  -146,
-   -30,  -241,   -16,  -241,  -241,   -16,   -16,   -20,  -138,  -145,
-  -245,  -143,  -144,   -16,   -25,   -71,   -23,   -31,   -32,   -33,
-   -34,   -35,   -36,   -37,   -38,   -39,   -40,   -41,  -245,  -245,
-  -245,   -27,  -245,   -56,   -58,   -59,   -60,   -61,   -71,   -18,
-  -241,  -140,  -141,   -22,   -42,   -42,   -42,  -241,  -241,  -241,
-   -68,  -245,  -241,  -241,  -245,   -28,  -245,  -245,  -245,  -245,
-  -245,   -62,   -64,   -66,   -69,  -245,   -72,   -86,   -87,   -88,
-   -89,   -90,   -91,   -92,   -93,   -94,   -97,   -98,   -99,  -100,
-  -101,  -102,  -103,  -129,  -245,   -53,   -54,  -245,   -21,   -43,
-  -241,   -50,  -241,   -50,  -241,   -50,  -241,  -241,  -241,   -73,
-   -95,   -96,  -245,  -151,  -241,   -44,  -245,  -245,   -46,  -245,
-   -48,  -245,  -245,  -245,  -245,  -245,  -245,  -245,  -245,   -55,
-  -241,   -51,  -245,  -241,  -241,   -63,   -65,   -67,   -15,   -84,
-  -245,   -74,   -75,  -245,   -45,   -52,   -47,   -49,   -70,   -76,
-   -77,   -85,  -245,   -15,  -152,   -78 ]
+  -163,  -115,  -167,  -231,  -197,  -246,  -208,  -209,  -211,  -212,
+  -214,  -215,  -218,  -221,  -223,  -224,  -242,  -242,  -242,  -242,
+  -246,  -246,  -246,  -206,  -187,  -246,  -242,  -242,  -242,  -193,
+  -242,  -242,  -242,   -17,   -14,   -14,   -14,  -242,  -242,  -242,
+  -240,  -242,   -79,  -246,  -149,  -177,  -186,  -181,   -81,  -225,
+  -232,  -233,  -234,  -198,  -242,  -242,  -242,  -219,  -219,  -231,
+  -242,  -231,  -231,  -231,  -246,  -242,  -246,  -242,  -189,  -190,
+  -191,  -192,  -194,  -195,  -196,  -242,  -242,  -242,  -246,  -246,
+  -154,  -155,  -156,  -148,  -246,  -242,  -207,  -215,  -210,  -217,
+  -213,  -246,  -220,  -222,  -226,  -231,  -227,  -228,  -230,   -82,
+  -246,  -246,  -203,  -137,  -137,  -242,  -137,  -246,  -242,  -241,
+  -150,  -205,  -242,  -229,  -246,   -83,   -19,  -145,   -24,   -30,
+   -26,   -29,   -57,  -239,  -153,  -216,   -30,  -242,  -246,  -139,
+  -142,  -146,   -30,  -242,   -16,  -242,  -242,   -16,   -16,   -20,
+  -138,  -145,  -246,  -143,  -144,   -16,   -25,   -71,   -23,   -31,
+   -32,   -33,   -34,   -35,   -36,   -37,   -38,   -39,   -40,   -41,
+  -246,  -246,  -246,   -27,  -246,   -56,   -58,   -59,   -60,   -61,
+   -71,   -18,  -242,  -140,  -141,   -22,   -42,   -42,   -42,  -242,
+  -242,  -242,   -68,  -246,  -242,  -242,  -246,   -28,  -246,  -246,
+  -246,  -246,  -246,   -62,   -64,   -66,   -69,  -246,   -72,   -86,
+   -87,   -88,   -89,   -90,   -91,   -92,   -93,   -94,   -97,   -98,
+   -99,  -100,  -101,  -102,  -103,  -129,  -246,   -53,   -54,  -246,
+   -21,   -43,  -242,   -50,  -242,   -50,  -242,   -50,  -242,  -242,
+  -242,   -73,   -95,   -96,  -246,  -151,  -242,   -44,  -246,  -246,
+   -46,  -246,   -48,  -246,  -246,  -246,  -246,  -246,  -246,  -246,
+  -246,   -55,  -242,   -51,  -246,  -242,  -242,   -63,   -65,   -67,
+   -15,   -84,  -246,   -74,   -75,  -246,   -45,   -52,   -47,   -49,
+   -70,   -76,   -77,   -85,  -246,   -15,  -152,   -78 ]
 
 racc_goto_table = [
-     6,    93,   116,    46,    92,   114,   127,   163,   218,    87,
-   354,   200,    50,   228,   228,   129,   128,   361,   363,   365,
-   189,   123,    38,   204,    47,   226,   257,   229,   267,   408,
-   376,     1,   379,   272,   381,   215,   216,   217,   121,   122,
-   276,   231,   232,   373,   415,    34,   283,   143,    35,   106,
-   105,   118,   311,   284,   254,   256,   264,   260,   328,   329,
-   330,   388,   270,   301,   305,   306,   307,   245,   228,   240,
-   275,   304,   335,   385,   400,   259,   233,   398,   235,   236,
-   237,   263,   119,   162,   173,   200,   266,   280,   183,   227,
-   169,   100,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   414,   259,   182,   259,   nil,   nil,   nil,   nil,   nil,
-   nil,   251,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+     6,    93,   129,    46,    92,   116,   127,    87,   114,   163,
+   189,   200,    50,   204,   227,    38,   230,   259,   261,   128,
+   356,   123,   229,   229,    47,   269,   410,   363,   365,   367,
+   378,     1,   381,    34,   383,   215,   216,   217,   121,   122,
+    35,   417,   106,   105,   118,   286,   261,   143,   261,   313,
+   274,   256,   258,   375,   262,   232,   233,   278,   266,   241,
+   330,   331,   332,   285,   272,   303,   234,   307,   236,   237,
+   238,   390,   265,   308,   309,   246,   277,   306,   337,   229,
+   387,   400,   119,   162,   402,   268,   200,   173,   282,   183,
+   169,   218,   333,   334,   335,   228,   100,   nil,   nil,   nil,
+   nil,   nil,   253,   182,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   416,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
    nil,   nil,   nil,   186,   nil,   nil,   nil,   nil,   nil,   nil,
    nil,   nil,   nil,   nil,   nil,   nil,    93,   nil,   nil,    92,
-   nil,   nil,   nil,   nil,   208,   nil,   nil,   nil,   331,   332,
-   333,   nil,   nil,   nil,   199,   201,   202,   203,   nil,   nil,
-   225,   241,   nil,   nil,   209,   210,   211,   nil,   212,   213,
-   214,   239,   nil,   242,   243,   nil,   219,   220,   249,   221,
-   nil,   nil,   nil,   128,   128,   246,   nil,   nil,   nil,   nil,
-   nil,   nil,   143,   143,   143,   nil,   nil,   nil,   234,   nil,
+   nil,   nil,   208,   nil,   nil,   nil,   nil,   226,   219,   nil,
+   nil,   nil,   nil,   nil,   199,   201,   202,   203,   240,   nil,
+   nil,   nil,   nil,   242,   209,   210,   211,   nil,   212,   213,
+   214,   nil,   nil,   243,   244,   nil,   220,   221,   nil,   222,
+   nil,   251,   nil,   nil,   nil,   nil,   128,   128,   247,   nil,
+   nil,   nil,   143,   143,   143,   nil,   nil,   nil,   235,   nil,
    nil,   nil,   nil,   143,   nil,   nil,   nil,   nil,   nil,   nil,
    nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,   277,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,   128,   nil,   nil,   nil,   nil,   nil,   nil,
-   116,   nil,   nil,   nil,   116,   262,   308,   nil,   143,   nil,
-   nil,   116,   302,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   279,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   128,   nil,
+   nil,   nil,   nil,   nil,   nil,   116,   264,   nil,   nil,   116,
+   143,   310,   nil,   nil,   304,   nil,   116,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
    nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
    nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   326,   nil,
-   nil,   nil,   352,   nil,   nil,   nil,   nil,   nil,   nil,   352,
-   352,   352,   360,   362,   364,   nil,   nil,   nil,   nil,   nil,
+   328,   nil,   nil,   nil,   354,   nil,   nil,   nil,   nil,   nil,
+   nil,   354,   354,   354,   362,   364,   366,   nil,   nil,   nil,
    nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   355,   356,   nil,   nil,   nil,   352,   nil,   nil,   nil,   nil,
+   nil,   nil,   357,   358,   nil,   nil,   nil,   354,   nil,   nil,
    nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,   352,   382,   383,   384,   nil,   nil,   nil,
-   nil,   nil,   nil,   nil,   nil,   nil,   352,   nil,   375,   399,
-   378,   nil,   380,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   nil,   389,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,   352,   nil,   nil,   nil,   nil,   404,   nil,
-   nil,   406,   407 ]
+   nil,   nil,   nil,   nil,   nil,   354,   384,   385,   386,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   354,   nil,
+   377,   401,   380,   nil,   382,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   391,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   354,   nil,   nil,   nil,   nil,
+   406,   nil,   nil,   408,   409 ]
 
 racc_goto_check = [
-     2,    52,    58,    20,    34,    15,    16,    59,    24,    61,
-    35,    63,    46,    64,    64,    48,    58,    35,    35,    35,
-    74,    20,     3,    50,     2,    69,    22,    69,    54,    44,
-    36,     1,    36,    19,    36,    13,    13,    13,     2,     2,
-    19,    70,    70,    35,    44,     4,    19,     2,     5,     6,
-     3,     3,    54,    22,    17,    17,    18,    17,    33,    33,
-    33,    35,    21,    23,    26,    27,    32,    37,    64,    50,
-    38,    39,    40,    42,    35,    24,    74,    43,    74,    74,
-    74,    69,    45,    49,    15,    63,    53,    56,    57,    65,
-     2,    75,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,    35,    24,    46,    24,   nil,   nil,   nil,   nil,   nil,
-   nil,    74,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+     2,    52,    48,    20,    34,    59,    16,    62,    15,    60,
+    75,    64,    46,    50,    70,     3,    70,    22,    24,    59,
+    35,    20,    65,    65,     2,    54,    44,    35,    35,    35,
+    36,     1,    36,     4,    36,    13,    13,    13,     2,     2,
+     5,    44,     6,     3,     3,    22,    24,     2,    24,    54,
+    19,    17,    17,    35,    17,    71,    71,    19,    18,    50,
+    33,    33,    33,    19,    21,    23,    75,    26,    75,    75,
+    75,    35,    70,    27,    32,    37,    38,    39,    40,    65,
+    42,    43,    45,    49,    35,    53,    64,    15,    56,    57,
+     2,    58,    24,    24,    24,    66,    76,   nil,   nil,   nil,
+   nil,   nil,    75,    46,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,    35,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
    nil,   nil,   nil,     2,   nil,   nil,   nil,   nil,   nil,   nil,
    nil,   nil,   nil,   nil,   nil,   nil,    52,   nil,   nil,    34,
-   nil,   nil,   nil,   nil,    61,   nil,   nil,   nil,    24,    24,
-    24,   nil,   nil,   nil,     2,     2,     2,     2,   nil,   nil,
-    48,    59,   nil,   nil,     2,     2,     2,   nil,     2,     2,
-     2,    48,   nil,    16,    16,   nil,     2,     2,    59,     2,
-   nil,   nil,   nil,    58,    58,    58,   nil,   nil,   nil,   nil,
+   nil,   nil,    62,   nil,   nil,   nil,   nil,    48,    59,   nil,
+   nil,   nil,   nil,   nil,     2,     2,     2,     2,    48,   nil,
+   nil,   nil,   nil,    60,     2,     2,     2,   nil,     2,     2,
+     2,   nil,   nil,    16,    16,   nil,     2,     2,   nil,     2,
+   nil,    60,   nil,   nil,   nil,   nil,    59,    59,    59,   nil,
    nil,   nil,     2,     2,     2,   nil,   nil,   nil,     2,   nil,
    nil,   nil,   nil,     2,   nil,   nil,   nil,   nil,   nil,   nil,
    nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,    16,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,    58,   nil,   nil,   nil,   nil,   nil,   nil,
-    58,   nil,   nil,   nil,    58,     2,    15,   nil,     2,   nil,
-   nil,    58,    20,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,    16,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    59,   nil,
+   nil,   nil,   nil,   nil,   nil,    59,     2,   nil,   nil,    59,
+     2,    15,   nil,   nil,    20,   nil,    59,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
    nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
    nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    20,   nil,
-   nil,   nil,    52,   nil,   nil,   nil,   nil,   nil,   nil,    52,
-    52,    52,    34,    34,    34,   nil,   nil,   nil,   nil,   nil,
+    20,   nil,   nil,   nil,    52,   nil,   nil,   nil,   nil,   nil,
+   nil,    52,    52,    52,    34,    34,    34,   nil,   nil,   nil,
    nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-     2,     2,   nil,   nil,   nil,    52,   nil,   nil,   nil,   nil,
+   nil,   nil,     2,     2,   nil,   nil,   nil,    52,   nil,   nil,
    nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,    52,    20,    20,    20,   nil,   nil,   nil,
-   nil,   nil,   nil,   nil,   nil,   nil,    52,   nil,     2,    34,
-     2,   nil,     2,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   nil,     2,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
-   nil,   nil,   nil,    52,   nil,   nil,   nil,   nil,     2,   nil,
-   nil,     2,     2 ]
+   nil,   nil,   nil,   nil,   nil,    52,    20,    20,    20,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    52,   nil,
+     2,    34,     2,   nil,     2,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,     2,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,    52,   nil,   nil,   nil,   nil,
+     2,   nil,   nil,     2,     2 ]
 
 racc_goto_pointer = [
-   nil,    31,    -2,    16,    42,    44,    15,   nil,   nil,   nil,
-   nil,   nil,   nil,  -139,   nil,   -29,   -42,  -188,  -198,  -224,
-   -22,  -194,  -218,  -210,  -169,   nil,  -211,  -210,   nil,   nil,
-   nil,   nil,  -209,  -256,   -26,  -311,  -331,  -150,  -190,  -204,
-  -248,   nil,  -296,  -308,  -369,    46,   -16,   nil,   -34,    32,
-  -137,   nil,   -29,  -169,  -227,   nil,  -181,   -32,   -32,   -46,
-   nil,   -21,   nil,  -145,  -182,  -106,   nil,   nil,   nil,  -169,
-  -156,   nil,   nil,   nil,  -123,    60 ]
+   nil,    31,    -2,     9,    30,    36,     8,   nil,   nil,   nil,
+   nil,   nil,   nil,  -139,   nil,   -26,   -42,  -192,  -198,  -209,
+   -22,  -194,  -228,  -210,  -227,   nil,  -210,  -204,   nil,   nil,
+   nil,   nil,  -203,  -256,   -26,  -303,  -333,  -142,  -186,  -200,
+  -244,   nil,  -291,  -306,  -374,    46,   -16,   nil,   -47,    32,
+  -147,   nil,   -29,  -172,  -232,   nil,  -182,   -31,   -86,   -29,
+   -44,   nil,   -23,   nil,  -145,  -173,  -100,   nil,   nil,   nil,
+  -180,  -142,   nil,   nil,   nil,  -133,    65 ]
 
 racc_goto_default = [
-   nil,   nil,    44,   nil,   nil,   409,   297,   107,   108,   109,
-   110,   111,   112,   nil,    36,   285,   115,   nil,   nil,   nil,
-   nil,   nil,   nil,   258,    24,   287,   288,   289,   290,   291,
-   292,   293,   296,   nil,   144,   nil,   nil,   nil,   nil,   nil,
-   nil,   320,   nil,   nil,   nil,   nil,   nil,    51,   nil,   nil,
-    52,   345,   145,   nil,   nil,   268,   nil,   nil,    31,     7,
-    29,   nil,    88,   158,   146,   147,   148,   149,   150,   151,
-   152,   153,   154,   155,   nil,   nil ]
+   nil,   nil,    44,   nil,   nil,   411,   299,   107,   108,   109,
+   110,   111,   112,   nil,    36,   287,   115,   nil,   nil,   nil,
+   nil,   nil,   nil,   260,    24,   289,   290,   291,   292,   293,
+   294,   295,   298,   nil,   144,   nil,   nil,   nil,   nil,   nil,
+   nil,   322,   nil,   nil,   nil,   nil,   nil,    51,   nil,   nil,
+    52,   347,   145,   nil,   nil,   270,   nil,   nil,   nil,    31,
+     7,    29,   nil,    88,   158,   146,   147,   148,   149,   150,
+   151,   152,   153,   154,   155,   nil,   nil ]
 
 racc_reduce_table = [
   0, 0, :racc_error,
@@ -1017,45 +1017,45 @@ def initialize(message, subject:, location:)
   1, 83, :_reduce_none,
   3, 83, :_reduce_158,
   3, 83, :_reduce_159,
-  1, 140, :_reduce_160,
-  1, 140, :_reduce_161,
-  1, 140, :_reduce_162,
-  1, 140, :_reduce_163,
-  1, 140, :_reduce_164,
-  1, 140, :_reduce_165,
-  1, 140, :_reduce_166,
-  1, 140, :_reduce_167,
-  1, 140, :_reduce_168,
-  1, 140, :_reduce_169,
-  1, 140, :_reduce_170,
-  1, 140, :_reduce_171,
-  1, 140, :_reduce_172,
-  1, 140, :_reduce_173,
-  1, 140, :_reduce_174,
-  1, 140, :_reduce_175,
-  1, 140, :_reduce_176,
-  4, 140, :_reduce_177,
-  2, 140, :_reduce_178,
-  3, 140, :_reduce_179,
-  3, 140, :_reduce_180,
-  4, 140, :_reduce_181,
-  2, 140, :_reduce_182,
-  2, 140, :_reduce_183,
-  1, 140, :_reduce_none,
+  1, 141, :_reduce_160,
+  1, 141, :_reduce_161,
+  1, 141, :_reduce_162,
+  1, 141, :_reduce_163,
+  1, 141, :_reduce_164,
+  1, 141, :_reduce_165,
+  1, 141, :_reduce_166,
+  1, 141, :_reduce_167,
+  1, 141, :_reduce_168,
+  1, 141, :_reduce_169,
+  1, 141, :_reduce_170,
+  1, 141, :_reduce_171,
+  1, 141, :_reduce_172,
+  1, 141, :_reduce_173,
+  1, 141, :_reduce_174,
+  1, 141, :_reduce_175,
+  1, 141, :_reduce_176,
+  4, 141, :_reduce_177,
+  2, 141, :_reduce_178,
+  3, 141, :_reduce_179,
+  3, 141, :_reduce_180,
+  4, 141, :_reduce_181,
+  2, 141, :_reduce_182,
+  2, 141, :_reduce_183,
+  1, 141, :_reduce_none,
   1, 101, :_reduce_185,
   3, 101, :_reduce_186,
-  3, 141, :_reduce_187,
-  1, 142, :_reduce_188,
-  3, 142, :_reduce_189,
-  3, 143, :_reduce_190,
-  3, 143, :_reduce_191,
-  3, 143, :_reduce_192,
-  2, 143, :_reduce_193,
-  3, 143, :_reduce_194,
-  3, 143, :_reduce_195,
-  3, 143, :_reduce_196,
-  1, 144, :_reduce_none,
-  2, 144, :_reduce_198,
+  3, 142, :_reduce_187,
+  1, 143, :_reduce_188,
+  3, 143, :_reduce_189,
+  3, 144, :_reduce_190,
+  3, 144, :_reduce_191,
+  3, 144, :_reduce_192,
+  2, 144, :_reduce_193,
+  3, 144, :_reduce_194,
+  3, 144, :_reduce_195,
+  3, 144, :_reduce_196,
+  1, 145, :_reduce_none,
+  2, 145, :_reduce_198,
   1, 115, :_reduce_none,
   1, 115, :_reduce_none,
   1, 115, :_reduce_none,
@@ -1067,45 +1067,46 @@ def initialize(message, subject:, location:)
   3, 129, :_reduce_207,
   1, 129, :_reduce_208,
   1, 129, :_reduce_none,
-  3, 146, :_reduce_210,
-  1, 146, :_reduce_211,
-  1, 146, :_reduce_none,
-  3, 148, :_reduce_213,
-  1, 148, :_reduce_214,
-  1, 148, :_reduce_none,
-  3, 150, :_reduce_216,
-  1, 150, :_reduce_217,
-  1, 150, :_reduce_none,
-  0, 151, :_reduce_219,
-  3, 151, :_reduce_220,
-  1, 151, :_reduce_221,
-  3, 151, :_reduce_222,
-  1, 151, :_reduce_223,
-  1, 151, :_reduce_224,
-  2, 145, :_reduce_225,
-  3, 147, :_reduce_226,
-  3, 149, :_reduce_227,
-  3, 152, :_reduce_228,
-  4, 153, :_reduce_229,
-  3, 154, :_reduce_230,
-  0, 155, :_reduce_none,
-  1, 155, :_reduce_none,
-  1, 155, :_reduce_none,
-  1, 155, :_reduce_none,
-  2, 105, :_reduce_235,
+  3, 147, :_reduce_210,
+  1, 147, :_reduce_211,
+  1, 147, :_reduce_none,
+  3, 149, :_reduce_213,
+  1, 149, :_reduce_214,
+  1, 149, :_reduce_none,
+  3, 151, :_reduce_216,
+  1, 151, :_reduce_217,
+  1, 151, :_reduce_none,
+  0, 152, :_reduce_219,
+  3, 152, :_reduce_220,
+  1, 152, :_reduce_221,
+  3, 152, :_reduce_222,
+  1, 152, :_reduce_223,
+  1, 152, :_reduce_224,
+  2, 146, :_reduce_225,
+  3, 148, :_reduce_226,
+  3, 150, :_reduce_227,
+  3, 153, :_reduce_228,
+  4, 154, :_reduce_229,
+  3, 155, :_reduce_230,
+  0, 156, :_reduce_none,
   1, 156, :_reduce_none,
   1, 156, :_reduce_none,
   1, 156, :_reduce_none,
+  2, 105, :_reduce_235,
+  1, 157, :_reduce_none,
+  1, 157, :_reduce_none,
+  1, 157, :_reduce_none,
   2, 118, :_reduce_239,
   2, 97, :_reduce_240,
-  0, 139, :_reduce_241,
-  1, 139, :_reduce_242,
-  2, 139, :_reduce_243,
-  1, 139, :_reduce_244 ]
+  2, 139, :_reduce_241,
+  0, 140, :_reduce_242,
+  1, 140, :_reduce_243,
+  2, 140, :_reduce_244,
+  1, 140, :_reduce_245 ]
 
-racc_reduce_n = 245
+racc_reduce_n = 246
 
-racc_shift_n = 416
+racc_shift_n = 418
 
 racc_token_table = {
   false => 0,
@@ -1350,6 +1351,7 @@ def initialize(message, subject:, location:)
   "type_param_check",
   "type_param_variance",
   "type_params0",
+  "type_alias_name",
   "namespace",
   "simple_type",
   "record_type",
@@ -3179,22 +3181,34 @@ def _reduce_240(val, _values, result)
 
 module_eval(<<'.,.,', 'parser.y', 1041)
   def _reduce_241(val, _values, result)
-            result = nil
+            namespace = val[0]&.value || Namespace.empty
+        name = val[1].value.to_sym
+        type_name = TypeName.new(namespace: namespace, name: name)
+        location = (loc0 = val[0]&.location) ? loc0 + val[1].location : val[1].location
+        result = LocatedValue.new(value: type_name, location: location)
 
     result
   end
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1044)
+module_eval(<<'.,.,', 'parser.y', 1051)
   def _reduce_242(val, _values, result)
-            result = LocatedValue.new(value: Namespace.root, location: val[0].location)
+            result = nil
 
     result
   end
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1047)
+module_eval(<<'.,.,', 'parser.y', 1054)
   def _reduce_243(val, _values, result)
+            result = LocatedValue.new(value: Namespace.root, location: val[0].location)
+
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'parser.y', 1057)
+  def _reduce_244(val, _values, result)
             namespace = Namespace.parse(val[1].value).absolute!
         result = LocatedValue.new(value: namespace, location: val[0].location + val[1].location)
 
@@ -3202,8 +3216,8 @@ def _reduce_243(val, _values, result)
   end
 .,.,
 
-module_eval(<<'.,.,', 'parser.y', 1051)
-  def _reduce_244(val, _values, result)
+module_eval(<<'.,.,', 'parser.y', 1061)
+  def _reduce_245(val, _values, result)
             namespace = Namespace.parse(val[0].value)
         result = LocatedValue.new(value: namespace, location: val[0].location)
 
diff --git a/lib/rbs/parser.y b/lib/rbs/parser.y
index 8e8c8d2d6..b164ad8ed 100644
--- a/lib/rbs/parser.y
+++ b/lib/rbs/parser.y
@@ -611,7 +611,7 @@ rule
       }
 
   type_decl:
-      annotations kTYPE qualified_name kEQ type {
+      annotations kTYPE type_alias_name kEQ type {
         location = val[1].location + val[4].location
         result = Declarations::Alias.new(name: val[2].value,
                                          type: val[4],
@@ -1037,6 +1037,16 @@ rule
         result = LocatedValue.new(value: type_name, location: location)
       }
 
+  type_alias_name:
+      namespace tLIDENT {
+        namespace = val[0]&.value || Namespace.empty
+        name = val[1].value.to_sym
+        type_name = TypeName.new(namespace: namespace, name: name)
+        location = (loc0 = val[0]&.location) ? loc0 + val[1].location : val[1].location
+        result = LocatedValue.new(value: type_name, location: location)
+      }
+
+
   namespace:
       {
         result = nil


Test patch:
diff --git a/test/rbs/signature_parsing_test.rb b/test/rbs/signature_parsing_test.rb
index 0ce309039..448c0d454 100644
--- a/test/rbs/signature_parsing_test.rb
+++ b/test/rbs/signature_parsing_test.rb
@@ -23,6 +23,12 @@ def test_type_alias
       assert_equal Types::Bases::Any.new(location: nil), type_decl.type
       assert_equal "type Steep::foo = untyped", type_decl.location.source
     end
+
+    assert_raises Parser::SyntaxError do
+      Parser.parse_signature(<<~RBS)
+        type Foo = untyped
+      RBS
+    end
   end
 
   def test_constant