tkobayas commented on code in PR #5989:
URL: 
https://github.com/apache/incubator-kie-drools/pull/5989#discussion_r1634248122


##########
drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/DrlParser.java:
##########
@@ -49,12 +53,18 @@ public class DrlParser {
 
     // TODO: REMOVE THIS GENERIC MESSAGE ASAP
     private static final String     GENERIC_ERROR_MESSAGE = "Unexpected 
exception raised while parsing. This is a bug. Please contact the Development 
team :\n";
+    private static final String     DEBUG_PARSER_LOG = "parse : 
ANTLR4_PARSER_ENABLED = {}";
     private final List<DroolsError> results               = new ArrayList<>();
     private List<DroolsSentence>    editorSentences       = null;
     private Location                location              = new Location( 
Location.LOCATION_UNKNOWN );
     private DRLLexer                lexer                 = null;
     private Resource                resource              = null;
 
+    public static final String ANTLR4_PARSER_ENABLED_PROPERTY = 
"drools.drl.antlr4.parser.enabled";
+
+    // temporarily removed 'final' for testing purposes. This should be final 
when the feature gets stable
+    public static boolean ANTLR4_PARSER_ENABLED = 
Boolean.parseBoolean(System.getProperty(ANTLR4_PARSER_ENABLED_PROPERTY, 
"false")); // default is false

Review Comment:
   The new parser is disabled by default. So it shouldn't affect the default 
behavior. Also unit tests (except `drools-drl-parser-tests`) run with the old 
parser.
   
   https://github.com/apache/incubator-kie-drools/pull/5990 is for the new 
parser CI check.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to