I tried to ask this on stackoverflow but them immediately closed the question for "lack of details/clarity." (I had hoped that a simple example that leads to core dump would have been deemed worthy, but I will try to ask here.)
Greetings!
i think that just allows at most a pair of initializer in the initialiazerList
maybe
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/antlr-discussion/8088b0f7-e152-4fd4-a7a3-9d007688ecban%40googlegroups.com.
Greetings!
there is no direct recursion in the rules you cite, e.g. no rule mentions itself on the right hand side of the colon.
however there is circular mutual recursion between the initializerClause, initializerList, and bracedInitList rules.
my C++ is very rusty, but I believe these rules allow for the initialization of deeply nested structures. Like for a silly example {{{{{{{{{{0}}}}}}}}}} as an initial value.
So, in theory, it could be a problem. But, in practice, is probably not. I don't think a human would code a collection of struct that are soooooo deeply nested. But then maybe a code generation tool that produces C++ code might. But I doubt it....
Hope this helps...
-jbb
To view this discussion on the web visit https://groups.google.com/d/msgid/antlr-discussion/f8ea8a8a-ec64-4fc1-89e0-b4fa8f258eccn%40googlegroups.com.
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/AouKqFLP-8M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to antlr-discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/antlr-discussion/f8ea8a8a-ec64-4fc1-89e0-b4fa8f258eccn%40googlegroups.com.