line 1:14205 reportContextSensitivity d=3 (binaryBody), input='OR'
line 1:14229 reportAttemptingFullContext d=3 (binaryBody), input='OR "google.com"'
line 1:23 reportAttemptingFullContext d=3 (binaryBody), input='OR'
line 1:23 reportContextSensitivity d=3 (binaryBody), input='OR'
line 1:36 reportAttemptingFullContext d=3 (binaryBody), input='OR'
line 1:36 reportContextSensitivity d=3 (binaryBody), input='OR'
line 1:49 reportAttemptingFullContext d=3 (binaryBody), input='OR'
line 1:49 reportContextSensitivity d=3 (binaryBody), input='OR'
line 1:59 reportAttemptingFullContext d=3 (binaryBody), input='OR'
line 1:59 reportContextSensitivity d=3 (binaryBody), input='OR'
line 1:69 reportAttemptingFullContext d=3 (binaryBody), input='OR'
line 1:69 reportContextSensitivity d=3 (binaryBody), input='OR'
line 1:81 reportAttemptingFullContext d=3 (binaryBody), input='OR'
line 1:81 reportContextSensitivity d=3 (binaryBody), input='OR'
line 1:95 reportAttemptingFullContext d=3 (binaryBody), input='OR'
line 1:95 reportContextSensitivity d=3 (binaryBody), input='OR'
line 1:108 reportAttemptingFullContext d=3 (binaryBody), input='OR'
line 1:108 reportContextSensitivity d=3 (binaryBody), input='OR'
line 1:121 reportAttemptingFullContext d=3 (binaryBody), input='OR'
line 1:121 reportContextSensitivity d=3 (binaryBody), input='OR'
line 1:131 reportAttemptingFullContext d=3 (binaryBody), input='OR'
line 1:131 reportContextSensitivity d=3 (binaryBody), input='OR'
On Jan 2, 2019, at 1:49 PM, Andres Solenzal <asol...@gmail.com> wrote:
Hi all. I have the following issue but first I will throw some context. I have created a grammar for a custom DSL for my company using Javascript as the target language. On some queries the parsing happens really fast, but in some cases(large queries) it takes too long, a minute or more. So I have ditched most of the specificity of my grammar and handle the validations and extra stuff in the parsing dictionary. But debugging this grammar with large queries to check where the bottleneck is I have used the -diagnostics flag on grun and the parser complains with contextSensitivity and attemptingFullContext warnings. Those warnings are mostly related to an expression defined in the grammar that is like this one.binaryBody: expression (AND | OR | AND_NOT) expression (:(AND | OR | AND_NOT) expression)*?I can parse input in a way that "A" OR "B" OR "C" OR "D" will produce a flat subtree with all elements as leaves but warnings are there. And there is a warning for each instance of OR and OR "term" inside the expression.line 1:14205 reportContextSensitivity d=3 (binaryBody), input='OR'line 1:14229 reportAttemptingFullContext d=3 (binaryBody), input='OR "google.com"'My question is, is there a way to rewrite that expression that stops the parser complaints?
--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "antlr-discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/antlr-discussion/Avz8eumt4TU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to antlr-discussi...@googlegroups.com.