# HG changeset patch # User Waqas Hussain # Date 1344104629 -18000 # Node ID 2ab99e239d45dd6549e3b4eec4dcee6d18d1d414 # Parent cba0b426b54254e774913d667101ce83ad1d3231 tools/erlparse: Fix erlang string escape sequences. diff -r cba0b426b542 -r 2ab99e239d45 tools/erlparse.lua --- a/tools/erlparse.lua Sat Aug 04 23:22:16 2012 +0500 +++ b/tools/erlparse.lua Sat Aug 04 23:23:49 2012 +0500 @@ -51,7 +51,7 @@ return ch <= _space; end -local escapes = {["\\b"]="\b", ["\\d"]="\d", ["\\e"]="\e", ["\\f"]="\f", ["\\n"]="\n", ["\\r"]="\r", ["\\s"]="\s", ["\\t"]="\t", ["\\v"]="\v", ["\\\""]="\"", ["\\'"]="'", ["\\\\"]="\\"}; +local escapes = {["\\b"]="\b", ["\\d"]="\127", ["\\e"]="\27", ["\\f"]="\f", ["\\n"]="\n", ["\\r"]="\r", ["\\s"]=" ", ["\\t"]="\t", ["\\v"]="\v", ["\\\""]="\"", ["\\'"]="'", ["\\\\"]="\\"}; local function readString() read("\""); -- skip quote local slash = nil;