Skip to content
This repository has been archived by the owner on May 3, 2021. It is now read-only.

Commit

Permalink
Fix json in_string
Browse files Browse the repository at this point in the history
  • Loading branch information
omarroth committed Jun 27, 2018
1 parent 2886bf0 commit c2c4602
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/json/json.bnf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ elements ::= value* proper => 1 separator => comma
comma ~ ','

string ::= '"' in_string '"' action => do_string
in_string ~ /([^"\\]|\\[\"\\\/bftnrt]|\\u[a-fA-F0-9]{4})+/
in_string ~ /([^"\\]|\\[\"\\\/bftnrt]|\\u[a-fA-F0-9]{4})*/

number ~ /-?([\d]+)(\.\d+)?([eE][+-]?\d+)?/

Expand Down
2 changes: 1 addition & 1 deletion spec/marpa_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require "./spec_helper"
describe Marpa do
it "parses json" do
grammar = File.read("examples/json/json.bnf")
input = %q([1,"abc\nd\"ef",true,-2.3,null,[],[1,2,3],{},{"a":1,"b":2}])
input = %q([1,"abc\nd\"ef","",true,-2.3,null,[],[1,2,3],{},{"a":1,"b":2}])

parser = Marpa::Parser.new
actions = JSON_Actions.new
Expand Down

0 comments on commit c2c4602

Please sign in to comment.