|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--antlr.CharScanner | +--CpcLexer
Classe que incorpora l'analisis lèxica del compilador. La funció principal é
analitzar el fitxer d'entrada i proveir de tokens a la classe CpcParser, que es comunica amb el constructor:
CpcParser(antlr.TokenStream)
.
Field Summary | |
static antlr.collections.impl.BitSet |
_tokenSet_0
|
private static long[] |
_tokenSet_0_data_
|
static antlr.collections.impl.BitSet |
_tokenSet_1
|
private static long[] |
_tokenSet_1_data_
|
static antlr.collections.impl.BitSet |
_tokenSet_2
|
private static long[] |
_tokenSet_2_data_
|
static antlr.collections.impl.BitSet |
_tokenSet_3
|
private static long[] |
_tokenSet_3_data_
|
Fields inherited from class antlr.CharScanner |
_returnToken, caseSensitive, caseSensitiveLiterals, commitToPath, EOF_CHAR, hashString, inputState, literals, saveConsumedInput, text, tokenObjectClass, traceDepth |
Fields inherited from interface PseudocodiTokenTypes |
ACCIO, ALGORISME, ALTRAMENT, ATRIBUTS, ATRIBUTS_CLASSE, BOOLEA, CARACTER, CAS, CERT, CLASS_DEF, CLASS_TYPE, CLASSE, COMA, COMENTARI1, COMENTARI2, CONST, CONSTRUCTOR, CORXET_DRET, CORXET_ESQ, CREAR, DE, DESTRUCTOR, DESTRUIR, DIV, DOSPUNTS, ELEMENTAL_TYPE, ENTER, EOF, ESCRIURE, ESCRIURELN, ESPAIS_BLANC, EXPONENT, FALGORISME, FALS, FATRIBUTS, FATRIBUTS_CLASSE, FCAS, FCLASSE, FCONST, FCONSTRUCTOR, FDESTRUCTOR, FER, FFUNCIO, FIMPLEMENTACIO, FINS, FINTERFICIE, FMENTRE, FMETODE, FMETODE_CLASSE, FMETODES, FMETODES_CLASSE, FPER, FSI, FUNCIO, FVAR, HERETA, IDENTIFICADOR, IMPLEMENTACIO, INTERFICIE, JO, LITERAL_CADENA, LITERAL_CARACTER, LLAVORS, LLEGIR, MEMBRE_CLASSE, MENTRE, METODE, METODE_CLASSE, METODES, METODES_CLASSE, MOD, NULL, NULL_TREE_LOOKAHEAD, NUMERO, NUMERO_ENTER, NUMERO_REAL, OP_ASSIGNACIO, OP_CAS, OP_DIFERENT, OP_DIV, OP_I, OP_IGUAL, OP_MGRAN, OP_MGRAN_IGUAL, OP_MPETIT, OP_MPETIT_IGUAL, OP_MULT, OP_NO, OP_O, OP_RESTA, OP_SUMA, PAREN_DRET, PAREN_ESQ, PAS, PER, PRIVATE, PUBLIC, PUNT, PUNTCOMA, REAL, RES, RETORNA, SALT_LINIA, SI, SUPER, SUPER_CLASS, TAULA, VAR |
Constructor Summary | |
CpcLexer(antlr.InputBuffer ib)
|
|
CpcLexer(java.io.InputStream in)
|
|
CpcLexer(antlr.LexerSharedInputState state)
|
|
CpcLexer(java.io.Reader in)
|
Method Summary | |
void |
mCOMA(boolean _createToken)
|
void |
mCOMENTARI1(boolean _createToken)
Comentari d'una linia: aquest excepcionalment no s'ignora |
void |
mCOMENTARI2(boolean _createToken)
Comentari d'una o mes linies: es ignorat per l'anàlisi lèxica. |
void |
mCORXET_DRET(boolean _createToken)
|
void |
mCORXET_ESQ(boolean _createToken)
|
void |
mDOSPUNTS(boolean _createToken)
|
void |
mESPAIS_BLANC(boolean _createToken)
Espais en blanc i tabuladors: só ignorats per l'anàlisi lèxica. |
protected void |
mEXPONENT(boolean _createToken)
Subregla per els exponents dels números |
void |
mIDENTIFICADOR(boolean _createToken)
Regla que detecta un identificador. |
void |
mLITERAL_CADENA(boolean _createToken)
Regla per a detectar els literals de tipus cadena |
void |
mLITERAL_CARACTER(boolean _createToken)
Regla per a detectar els literals de tipus caràcter |
void |
mNUMERO(boolean _createToken)
Regla que engloba tant els números enters com els decimals |
void |
mOP_ASSIGNACIO(boolean _createToken)
|
void |
mOP_CAS(boolean _createToken)
|
void |
mOP_DIFERENT(boolean _createToken)
|
void |
mOP_DIV(boolean _createToken)
|
void |
mOP_IGUAL(boolean _createToken)
|
void |
mOP_MGRAN_IGUAL(boolean _createToken)
|
void |
mOP_MGRAN(boolean _createToken)
|
void |
mOP_MPETIT_IGUAL(boolean _createToken)
|
void |
mOP_MPETIT(boolean _createToken)
|
void |
mOP_MULT(boolean _createToken)
|
void |
mOP_RESTA(boolean _createToken)
|
void |
mOP_SUMA(boolean _createToken)
|
void |
mPAREN_DRET(boolean _createToken)
|
void |
mPAREN_ESQ(boolean _createToken)
|
void |
mPUNT(boolean _createToken)
|
void |
mPUNTCOMA(boolean _createToken)
|
void |
mSALT_LINIA(boolean _createToken)
|
antlr.Token |
nextToken()
|
Methods inherited from class antlr.CharScanner |
append, append, commit, consume, consumeUntil, consumeUntil, getCaseSensitive, getCaseSensitiveLiterals, getColumn, getCommitToPath, getFilename, getInputBuffer, getInputState, getLine, getText, getTokenObject, LA, makeToken, mark, match, match, match, matchNot, matchRange, newline, panic, panic, reportError, reportError, reportWarning, resetText, rewind, setCaseSensitive, setColumn, setCommitToPath, setFilename, setInputState, setLine, setText, setTokenObjectClass, tab, testLiteralsTable, testLiteralsTable, toLower, traceIn, traceIndent, traceOut, uponEOF |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final long[] _tokenSet_0_data_
public static final antlr.collections.impl.BitSet _tokenSet_0
private static final long[] _tokenSet_1_data_
public static final antlr.collections.impl.BitSet _tokenSet_1
private static final long[] _tokenSet_2_data_
public static final antlr.collections.impl.BitSet _tokenSet_2
private static final long[] _tokenSet_3_data_
public static final antlr.collections.impl.BitSet _tokenSet_3
Constructor Detail |
public CpcLexer(java.io.InputStream in)
public CpcLexer(java.io.Reader in)
public CpcLexer(antlr.InputBuffer ib)
public CpcLexer(antlr.LexerSharedInputState state)
Method Detail |
public antlr.Token nextToken() throws antlr.TokenStreamException
nextToken
in interface antlr.TokenStream
nextToken
in class antlr.CharScanner
antlr.TokenStreamException
public final void mIDENTIFICADOR(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mNUMERO(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mPUNT(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
protected final void mEXPONENT(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mLITERAL_CARACTER(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mLITERAL_CADENA(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mPAREN_ESQ(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mPAREN_DRET(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mCORXET_ESQ(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mCORXET_DRET(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mCOMA(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mPUNTCOMA(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mDOSPUNTS(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mSALT_LINIA(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mOP_SUMA(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mOP_RESTA(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mOP_MULT(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mOP_DIV(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mOP_IGUAL(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mOP_DIFERENT(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mOP_MPETIT(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mOP_MPETIT_IGUAL(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mOP_MGRAN_IGUAL(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mOP_MGRAN(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mOP_ASSIGNACIO(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mOP_CAS(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mESPAIS_BLANC(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mCOMENTARI1(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mCOMENTARI2(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |