You ask two related questions:
" ?" . , : " ?"
. JavaCC . , Token
. .
- JavaCC . JavaCC ,
.jj
. , JFlex. . - .
USER_TOKEN_MANAGER=true
. JavaCC Java- TokenManager
. , , . , , .
" ?"
.
- JFlex JavaCC. JavaCC , JFlex, , (..
Token
.) - . JavaCC
USER_TOKEN_MANAGER=true
, JFlex TokenManager
. - JFlex , JavaCC. , , , .
USER_TOKEN_MANAGER=true
. :
class FooLexer extends FooJLexLexer implements TokenManager { ...put constructors here... }
3 , , TokenManager
. , Token
.
2, , , .
TokenManager tm = new AdaptJFlexLexerToJavaCC( jflexLexer ) ;
FooParser p = new FooParser( tm ) ;
3 . , .
3 , JFlex, 1. JFlex JavaCC, , , , . , JFlex, JavaCC , - A / B
.
, , JavaCC , Token
.kind
. , FooConstants
.