You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mrql.apache.org by fe...@apache.org on 2015/04/22 17:43:29 UTC
[1/2] incubator-mrql git commit: Update JSON.lex
Repository: incubator-mrql
Updated Branches:
refs/heads/master 55041330f -> de568dee2
Update JSON.lex
Project: http://git-wip-us.apache.org/repos/asf/incubator-mrql/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mrql/commit/bc139d10
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mrql/tree/bc139d10
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mrql/diff/bc139d10
Branch: refs/heads/master
Commit: bc139d10fcd5ab25cf1bf5b3c749c8d915391d55
Parents: f5d2591
Author: Leonidas Fegaras <fe...@cse.uta.edu>
Authored: Tue Apr 21 13:29:15 2015 -0500
Committer: Leonidas Fegaras <fe...@cse.uta.edu>
Committed: Tue Apr 21 13:29:15 2015 -0500
----------------------------------------------------------------------
core/src/main/java/org/apache/mrql/JSON.lex | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mrql/blob/bc139d10/core/src/main/java/org/apache/mrql/JSON.lex
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/mrql/JSON.lex b/core/src/main/java/org/apache/mrql/JSON.lex
index c75d1bb..6874863 100644
--- a/core/src/main/java/org/apache/mrql/JSON.lex
+++ b/core/src/main/java/org/apache/mrql/JSON.lex
@@ -44,6 +44,10 @@ import java_cup.runtime.Symbol;
return new Symbol(s,o);
}
+ public String format ( String s ) {
+ return s.replaceAll("\\\\t", "\t").replaceAll("\\\\n", "\n").replaceAll("\\\\\"", "\"");
+ }
+
%}
INT = [+-]?[0-9]+
@@ -51,7 +55,7 @@ DOUBLE = [+-]?[0-9]+([\.][0-9]+)?([eE][+-]?[0-9]+)?
%%
-\"[^\"]*\" { return symbol(jsym.STRING,yytext().substring(1,yytext().length()-1)); }
+\"("\\\""|[^\"])*\" { return symbol(jsym.STRING,format(yytext().substring(1,yytext().length()-1))); }
{INT} { return symbol(jsym.INTEGER,new Long(yytext())); }
{DOUBLE} { return symbol(jsym.DOUBLE,new Double(yytext())); }
true { return symbol(jsym.TRUE); }
[2/2] incubator-mrql git commit: Merge branch 'MRQL-69' of
https://github.com/fegaras/incubator-mrql
Posted by fe...@apache.org.
Merge branch 'MRQL-69' of https://github.com/fegaras/incubator-mrql
Project: http://git-wip-us.apache.org/repos/asf/incubator-mrql/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mrql/commit/de568dee
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mrql/tree/de568dee
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mrql/diff/de568dee
Branch: refs/heads/master
Commit: de568dee2633490a86780631db5bc7e4e5d8043f
Parents: 5504133 bc139d1
Author: fegaras <fe...@cse.uta.edu>
Authored: Wed Apr 22 10:42:09 2015 -0500
Committer: fegaras <fe...@cse.uta.edu>
Committed: Wed Apr 22 10:42:09 2015 -0500
----------------------------------------------------------------------
core/src/main/java/org/apache/mrql/JSON.lex | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------