Is there recursion in ANTLR in the sense that there is a call stack? Example:
parenset
:   LPAREN
    parenset*
    RPAREN
;
LPAREN: '(';
RPAREN: ')';
Should just verify that there are as many left parenthesis as there right. However in ANTLRWorks 1.4.3, in the interpreter when I type in '(((开发者_运维问答)))', I get

Where are my other right parens?! Am I doing something incorrect? Thanks!
Don't use ANTLRWorks' interpreter: it is notoriously buggy.
If I use the debugger in ANTLRWorks (not the same as the interpreter!) with the grammar:
grammar T;
parenset
  :  LPAREN parenset* RPAREN
  ;
LPAREN : '(';
RPAREN : ')';
and provide the input ((())) I get the following parse-tree:

So, to answer your question:
Where are my other right parens?! Am I doing something incorrect?
No, you're not doing anything wrong: ANTLRWorks' interpreter is messing things up for you. Whenever your grammar contains predicates or recursive rule-invocations, better use the debugger or write your own test class.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论