diff --git a/lib/lrama/new_lexer.rb b/lib/lrama/new_lexer.rb index 18b746d2..107c01c7 100644 --- a/lib/lrama/new_lexer.rb +++ b/lib/lrama/new_lexer.rb @@ -85,7 +85,7 @@ def lex_token return [:TAG, build_token(type: Token::Tag, s_value: @scanner.matched)] when @scanner.scan(/'.'/) return [:CHARACTER, build_token(type: Token::Char, s_value: @scanner.matched)] - when @scanner.scan(/'\\\\'|'\\t'|'\\f'|'\\r'|'\\n'|'\\13'/) + when @scanner.scan(/'\\\\'|'\\b'|'\\t'|'\\f'|'\\r'|'\\n'|'\\v'|'\\13'/) return [:CHARACTER, build_token(type: Token::Char, s_value: @scanner.matched)] when @scanner.scan(/"/) return [:STRING, %Q("#{@scanner.scan_until(/"/)})] diff --git a/spec/lrama/new_parser_spec.rb b/spec/lrama/new_parser_spec.rb index f61caae9..6833ac0d 100644 --- a/spec/lrama/new_parser_spec.rb +++ b/spec/lrama/new_parser_spec.rb @@ -851,7 +851,7 @@ class : keyword_class end describe "symbol number" do - xit "is not duplicated" do + it "is not duplicated" do y = <<~INPUT %{ // Prologue @@ -900,7 +900,7 @@ class : keyword_class tSTRING keyword_end { code 1 } ]) end - xit "tokens after precedence declarations have greater number than tokens defined by precedence declarations" do + it "tokens after precedence declarations have greater number than tokens defined by precedence declarations" do y = <<~INPUT %{ // Prologue @@ -950,7 +950,7 @@ class : keyword_class tSTRING keyword_end { code 1 } describe "user codes" do describe "" do - xit "is not duplicated" do + it "is not duplicated" do y = <<~INPUT %{ // Prologue @@ -1060,7 +1060,7 @@ class : keyword_class tSTRING keyword_end { code 1 } ]) end - xit "can parse action with %empty" do + it "can parse action with %empty" do y = <<~INPUT %{ // Prologue @@ -1146,7 +1146,7 @@ class : keyword_class tSTRING keyword_end { code 1 } end context "includes named references" do - xit "can parse" do + it "can parse" do y = <<~INPUT %{ // Prologue @@ -1279,7 +1279,7 @@ class : keyword_class tSTRING keyword_end { code 1 } end context "includes invalid named references" do - xit "raise an error" do + it "raise an error" do y = <<~INPUT %{ // Prologue @@ -1319,7 +1319,7 @@ class : keyword_class tSTRING keyword_end { code 1 } end describe "#fill_symbol_number" do - xit "fills token_id of Token::Char" do + it "fills token_id of Token::Char" do y = <<~INPUT %{ // Prologue @@ -1372,7 +1372,7 @@ class : keyword_class tSTRING keyword_end ; describe "#normalize_rules" do describe "referring_symbol" do - xit "uses a tag specified in code" do + it "uses a tag specified in code" do y = <<~INPUT %{ // Prologue @@ -1411,7 +1411,7 @@ class : keyword_class tSTRING keyword_end describe "Grammar#validate!" do describe "#validate_no_declared_type_reference!" do - xit "raises error when referred nterm, term and action have no tag so that type is not declared" do + it "raises error when referred nterm, term and action have no tag so that type is not declared" do y = <<~INPUT %{ // Prologue