From 1dbf851df92f6e8022cc693b2f5948026c516fa7 Mon Sep 17 00:00:00 2001 From: Gang ZHANG Date: Wed, 4 Dec 2019 22:05:08 +0800 Subject: [PATCH] ignore expression name checker --- lib_install.bat | 17 ++++++++----- src/main/java/depends/entity/Expression.java | 6 ++--- .../cpp-code-examples/Expressions.cpp | 25 +++++++++++++++++++ 3 files changed, 39 insertions(+), 9 deletions(-) diff --git a/lib_install.bat b/lib_install.bat index 4abeaf8..173a716 100644 --- a/lib_install.bat +++ b/lib_install.bat @@ -1,13 +1,18 @@ -mvn install:install-file -DgroupId=org.eclipse.cdt -DartifactId=org.eclipse.cdt.core -Dversion=6.5.0.201806170908 -Dpackaging=jar -Dfile=./jars/org.eclipse.cdt.core-6.5.0.201806170908.jar -DgeneratePom=true +mvn install:install-file -DgroupId=org.jruby -DartifactId=jrubyparser -Dversion=0.5.5-SNAPSHOT -Dpackaging=jar -Dfile=./jars/jrubyparser-0.5.5-SNAPSHOT.jar -DgeneratePom=true -mvn install:install-file -DgroupId=eclipse-photon -DartifactId=org.eclipse.equinox.registry -Dversion=3.8.0.v20180426-1327 -Dpackaging=jar -Dfile=./jars/org.eclipse.equinox.registry-3.8.0.v20180426-1327.jar -DgeneratePom=true +mvn install:install-file -DgroupId=org.eclipse.cdt -DartifactId=org.eclipse.cdt.core -Dversion=6.9.0.201909091953 -Dpackaging=jar -Dfile=./jars/org.eclipse.cdt.core_6.9.0.201909091953.jar -DgeneratePom=true + +mvn install:install-file -DgroupId=eclipse-photon -DartifactId=org.eclipse.equinox.registry -Dversion=3.8.500.v20190714-1850 -Dpackaging=jar -Dfile=./jars/org.eclipse.equinox.registry_3.8.500.v20190714-1850.jar -DgeneratePom=true mvn install:install-file -DgroupId=eclipse-photon -DartifactId=org.eclipse.core.runtime -Dversion=3.14.0.v20180417-0825 -Dpackaging=jar -Dfile=./jars/org.eclipse.core.runtime-3.14.0.v20180417-0825.jar -DgeneratePom=true -mvn install:install-file -DgroupId=eclipse-photon -DartifactId=org.eclipse.equinox.common -Dversion=3.10.0.v20180412-1130 -Dpackaging=jar -Dfile=./jars/org.eclipse.equinox.common-3.10.0.v20180412-1130.jar -DgeneratePom=true +mvn install:install-file -DgroupId=eclipse-photon -DartifactId=org.eclipse.equinox.common -Dversion=3.10.500.v20190815-1535 -Dpackaging=jar -Dfile=./jars/org.eclipse.equinox.common_3.10.500.v20190815-1535.jar -DgeneratePom=true -mvn install:install-file -DgroupId=eclipse-photon -DartifactId=org.eclipse.osgi -Dversion=3.13.0.v20180409-1500 -Dpackaging=jar -Dfile=./jars/org.eclipse.osgi-3.13.0.v20180409-1500.jar -DgeneratePom=true +mvn install:install-file -DgroupId=eclipse-photon -DartifactId=org.eclipse.osgi -Dversion=3.15.0.v20190830-1434 -Dpackaging=jar -Dfile=./jars/org.eclipse.osgi_3.15.0.v20190830-1434.jar -DgeneratePom=true -mvn install:install-file -DgroupId=eclipse-photon -DartifactId=org.eclipse.equinox.preferences -Dversion=3.7.100.v20180510-1129 -Dpackaging=jar -Dfile=./jars/org.eclipse.equinox.preferences-3.7.100.v20180510-1129.jar -DgeneratePom=true +mvn install:install-file -DgroupId=eclipse-photon -DartifactId=org.eclipse.equinox.preferences -Dversion=3.7.500.v20190815-1535 -Dpackaging=jar -Dfile=./jars/org.eclipse.equinox.preferences_3.7.500.v20190815-1535.jar -DgeneratePom=true + +mvn install:install-file -DgroupId=eclipse-photon -DartifactId=org.eclipse.core.jobs -Dversion=3.10.500.v20190620-1426 -Dpackaging=jar -Dfile=./jars/org.eclipse.core.jobs_3.10.500.v20190620-1426.jar -DgeneratePom=true + +mvn install:install-file -DgroupId=eclipse-photon -DartifactId=org.eclipse.core.resources -Dversion=3.13.500.v20190819-0800 -Dpackaging=jar -Dfile=./jars/org.eclipse.core.resources_3.13.500.v20190819-0800.jar -DgeneratePom=true -mvn install:install-file -DgroupId=eclipse-photon -DartifactId=org.eclipse.core.jobs -Dversion=3.10.0.v20180427-1454 -Dpackaging=jar -Dfile=./jars/org.eclipse.core.jobs-3.10.0.v20180427-1454.jar -DgeneratePom=true diff --git a/src/main/java/depends/entity/Expression.java b/src/main/java/depends/entity/Expression.java index d6f5f07..efe0a2b 100644 --- a/src/main/java/depends/entity/Expression.java +++ b/src/main/java/depends/entity/Expression.java @@ -255,9 +255,9 @@ public class Expression implements Serializable{ if (name.toLowerCase().equals("")) return true; if (name.toLowerCase().equals("")) return true; boolean result = name.matches("([a-zA-Z0-9_]|(\\.)|(\\-))*"); - if (result==false) { - System.err.println("expression name " + name); - } +// if (result==false) { +// System.err.println("expression name " + name); +// } return true; } diff --git a/src/test/resources/cpp-code-examples/Expressions.cpp b/src/test/resources/cpp-code-examples/Expressions.cpp index 7ce17b9..e20301c 100644 --- a/src/test/resources/cpp-code-examples/Expressions.cpp +++ b/src/test/resources/cpp-code-examples/Expressions.cpp @@ -18,3 +18,28 @@ void foo(ClassA& a) { //parameter a(1) a3[1].x.m = 3; //still lack 1 //set a3,t(2) } +void JsonParser::expectToken(Token tk) +{ + if (advance() != tk) { + if (tk == tkDouble) { + if(cur() == tkString + && (sv == "Infinity" || sv == "-Infinity" || sv == "NaN")) { + curToken = tkDouble; + dv = sv == "Infinity" ? + std::numeric_limits::infinity() : + sv == "-Infinity" ? + -std::numeric_limits::infinity() : + std::numeric_limits::quiet_NaN(); + return; + } else if (cur() == tkLong) { + dv = double(lv); + return; + } + } + ostringstream oss; + oss << "Incorrect token in the stream. Expected: " + << JsonParser::toString(tk) << ", found " + << JsonParser::toString(cur()); + throw Exception(oss.str()); + } +}