/external/antlr/antlr-3.4/gunit/src/main/antlr3/org/antlr/gunit/ |
H A D | gUnit.g | 156 | '->' output {if ( !$testsuite::isLexicalRule ) $out = new OutputTest($output.token);} 159 output returns [Token token] 164 $token = $STRING; 166 | ML_STRING {$token = $ML_STRING;} 167 | AST {$token = $AST;} 168 | ACTION {$token = $ACTION;}
|
/external/antlr/antlr-3.4/gunit/src/main/java/org/antlr/gunit/ |
H A D | OutputTest.java | 36 private final Token token; field in class:OutputTest 38 public OutputTest(Token token) { argument 39 this.token = token; 44 return token.getText(); 49 return token.getType(); 65 return token.getText();
|
/external/antlr/antlr-3.4/lib/ |
H A D | antlr-3.4-complete.jar | META-INF/ META-INF/MANIFEST.MF org/ org/antlr/ org/antlr/analysis/ org/antlr/codegen/ org/ ... |
/external/antlr/antlr-3.4/runtime/ActionScript/project/lib/ |
H A D | FlexAntTasks.jar | META-INF/ META-INF/MANIFEST.MF com/ com/adobe/ com/adobe/ac/ com/adobe/ac/ant/ ... |
/external/antlr/antlr-3.4/runtime/ActionScript/project/src/org/antlr/runtime/ |
H A D | BaseRecognizer.as | 54 * single token insertion or deletion error recovery. If 57 * To turn off single token insertion or deletion error 95 // a single token and hope for the best 106 // if current token is consistent with what could come after set 107 // then we know we're missing a token; error recovery is free to 108 // "insert" the missing token 122 /** Factor out what to do upon token mismatch so tree parsers can behave 124 * to get single token insertion and deletion. Use this to turn of 125 * single token insertion and deletion. Override mismatchRecover 144 * a token (afte [all...] |
H A D | CommonToken.as | 45 /** What token number is this from 0..n-1 tokens; < 0 implies invalid index */ 48 /** The char position into the input buffer where this token starts */ 51 /** The char position into the input buffer where this token stops */ 60 var token:CommonToken = new CommonToken(type); 61 token._input = input; 62 token._channel = channel; 63 token._start = start; 64 token._stop = stop; 65 return token; 69 var token [all...] |
H A D | Lexer.as | 53 state.token = null; 62 /** Return a token from this source; i.e., match a token on the char 67 state.token = null; 78 if ( state.token==null ) { 81 else if ( state.token==TokenConstants.SKIP_TOKEN ) { 84 return state.token; 99 /** Instruct the lexer to skip creating a token for current lexer rule 100 * and look for another token. nextToken() knows to keep looking when 101 * a lexer rule finishes with token se [all...] |
H A D | MissingTokenException.as | 17 if ( inserted!=null && token!=null ) { 18 return "MissingTokenException(inserted "+inserted+" at "+token.text+")"; 20 if ( token!=null ) { 21 return "MissingTokenException(at "+token.text+")";
|
H A D | RecognitionException.as | 40 * exceptions are built with the expected token type. 57 * state can change before the exception is reported so current token index 59 * perhaps print an entire line of input not just a single token, for example. 67 /** What is index of token/char were we looking at when the error occurred? */ 72 * For parsers. Even when it's a tree parser, token might be set. 74 public var token:Token; variable 94 * for most recent token with line/col info, but notify getErrorHeader() 106 this.token = TokenStream(input).LT(1); 107 this.line = token.line; 108 this.charPositionInLine = token [all...] |
H A D | RecognizerSharedState.as | 11 /** Track the set of token types that can follow any rule invocation. 19 * matched a token. Prevents generation of more than one error message 26 * but no token is consumed during recovery...another error is found, 28 * one token/tree node is consumed for two errors. 32 /** In lieu of a return value, this indicates that a rule or token 33 * has failed to match. Reset to false upon valid token match. 46 * the stop token index for each rule. ruleMemo[ruleIndex] is 48 * get back the stop token for associated rule or MEMO_RULE_FAILED. 59 /** The goal of all lexer rules/methods is to create a token object. 61 * create a single token 67 public var token:Token; variable [all...] |
H A D | TokenRewriteStream.as | 45 * screw up the token index values. That is, an insert operation at token 49 * the original token stream back without undoing anything. Since 167 public function removeToken(token:Token, programName:String = DEFAULT_PROGRAM_NAME):void { 168 removeTokenRange(token, token, programName); 244 // no operation at that index, just dump token 246 i++; // move to next token 257 // Scan any remaining operations after last token 311 * Return a map from token inde [all...] |
/external/antlr/antlr-3.4/runtime/ActionScript/project/src/org/antlr/runtime/tree/ |
H A D | BaseTreeAdaptor.as | 27 * if no token payload but you might have to set token type for diff 109 // If new Root is token, then create a Tree. 213 /** Tell me how to create a token for use with imaginary token nodes. 215 * token DECL, but you need to create it as a payload or whatever for 218 * If you care what the token payload objects' type is, you should 225 /** Tell me how to create a token for use with imaginary token nodes. 227 * token DEC [all...] |
H A D | CommonErrorNode.as | 21 // sometimes resync does not consume a token (when LT(1) is 23 // Also handle case where start is the first token and no token 74 return "<mismatched token: "+trappedException.token+", resync="+getText()+">"; 77 return "<unexpected: "+trappedException.token+
|
H A D | CommonTree.as | 39 /** A single token is the payload */ 42 /** What token indexes bracket all tokens associated with this node 68 public function get token():Token { 159 if ( token==null ) {
|
H A D | CommonTreeNodeStream.as | 66 * Load upon first need of the buffer so we can set token types 75 /** IF this tree (root) was created from a token stream, track it. */ 349 /** Used for testing, just return the token type stream */ 386 trace("toString: "+CommonTree(start).token+", "); 390 trace(CommonTree(stop).token); 393 // if we have the token stream, use that to dump text in order 398 // else use token range from start/stop nodes
|
H A D | TreeParser.as | 126 /** Tree parsers parse nodes they usually have a token object as 127 * payload. Set the exception token and do the default behavior. 132 e.token = adaptor.getToken(e.node); 133 if ( e.token==null ) { // could be an UP/DOWN node 134 e.token = new CommonToken(adaptor.getType(e.node),
|
/external/antlr/antlr-3.4/runtime/C/include/ |
H A D | antlr3commontoken.h | 2 * \brief Defines the interface for a common token. 4 * All token streams should provide their tokens using an instance 5 * of this common token. A custom pointer is provided, wher you may attach 6 * a further structure to enhance the common token if you feel the need 7 * to do so. The C runtime will assume that a token provides implementations 45 /** How many tokens to allocate at once in the token factory 49 /* Base token types, which all lexer/parser tokens come after in sequence. 52 /** Indicator of an invalid token 58 /** Imaginary token type to cause a traversal of child nodes in a tree parser 62 /** Imaginary token typ [all...] |
H A D | antlr3commontree.h | 54 /// Start token index that encases this tree 58 /// End token that encases this tree 62 /// A single token, this is the payload for the tree 64 pANTLR3_COMMON_TOKEN token; member in struct:ANTLR3_COMMON_TREE_struct 77 /// token. This can be used by duplication methods and so on 122 /// The next token to throw out from the pool, will cause a new pool allocation 127 /// Trick to initialize tokens and their API quickly, we set up this token when the 128 /// factory is created, then just copy the memory it uses into the new token. 153 pANTLR3_BASE_TREE (*newFromToken) (struct ANTLR3_ARBORETUM_struct * factory, pANTLR3_COMMON_TOKEN token);
|
H A D | antlr3debugeventlistener.h | 86 /// Used to serialize the values of any particular token we need to 136 /** An input token was consumed; matched by any kind of element. 137 * Trigger after the token was matched by things like match(), matchAny(). 141 /** An off-channel input token was consumed. 142 * Trigger after the token was matched by things like match(), matchAny(). 143 * (unless of course the hidden token is first stuff in the input stream). 150 * what token was seen at that depth. A remote debugger cannot look 151 * ahead into a file it doesn't have so LT events must pass the token 157 * the token stream's marker is sent in case you need it. 204 * data fields are transmitted. The token objec [all...] |
H A D | antlr3defs.h | 568 ANTLR3_API void antlr3SetTokenAPI (pANTLR3_COMMON_TOKEN token);
|
H A D | antlr3exception.h | 39 /** Indicates that the recognizer received a token 48 /** Indicates that the recognizer was expecting one token and found a 139 /** Indicates the index of the 'token' we were looking at when the 144 /** Indicates what the current token/tree was when the error occurred. Since not 145 * all input streams will be able to retrieve the nth token, we track it here 148 void * token; member in struct:ANTLR3_EXCEPTION_struct 150 /** Indicates the token we were expecting to see next when the error occurred
|
H A D | antlr3lexer.h | 12 * (which it will normally implement) and a token source interface (which it also 13 * implements. The Tokensource interface is called by a token consumer (such as 25 * - The lexer token source interface is then passed to some interface that 26 * knows how to use it, byte calling for a next token. 27 * - When a next token is called, let ze lexing begin. 101 * token source interface, which the lexer instance will provide to anything 123 /** Pointer to a function that emits the supplied token as the next token in 126 void (*emitNew) (struct ANTLR3_LEXER_struct * lexer, pANTLR3_COMMON_TOKEN token); 128 /** Pointer to a function that constructs a new token fro [all...] |
H A D | antlr3recognizersharedstate.h | 77 /** Track the set of token types that can follow any rule invocation. 84 * matched a token. Prevents generation of more than one error message 91 * but no token is consumed during recovery...another error is found, 93 * one token/tree node is consumed for two errors. 97 /** In lieu of a return value, this indicates that a rule or token 98 * has failed to match. Reset to false upon valid token match. 114 * Tracks the stop token index for each rule. ruleMemo[ruleIndex] is 116 * get back the stop token for associated rule or MEMO_RULE_FAILED. 122 /** Pointer to an array of token names 125 * at parser compile time - grammar token name 142 pANTLR3_COMMON_TOKEN token; member in struct:ANTLR3_RECOGNIZER_SHARED_STATE_struct [all...] |
/external/antlr/antlr-3.4/runtime/C/src/ |
H A D | antlr3baserecognizer.c | 229 // Free up any token factory we created (error recovery for instance) 260 /* Now update it to indicate this is a Mismatched token exception 347 ex->token = cts->tstream->_LT (cts->tstream, 1); /* Current input token */ 348 ex->line = ((pANTLR3_COMMON_TOKEN)(ex->token))->getLine (ex->token); 349 ex->charPositionInLine = ((pANTLR3_COMMON_TOKEN)(ex->token))->getCharPositionInLine (ex->token); 351 if (((pANTLR3_COMMON_TOKEN)(ex->token))->type == ANTLR3_TOKEN_EOF) 357 ex->streamName = ((pANTLR3_COMMON_TOKEN)(ex->token)) 2170 pANTLR3_COMMON_TOKEN token; local [all...] |
H A D | antlr3commontoken.c | 2 * Contains the default implementation of the common token used within 40 static pANTLR3_STRING getText (pANTLR3_COMMON_TOKEN token); 41 static void setText (pANTLR3_COMMON_TOKEN token, pANTLR3_STRING text); 42 static void setText8 (pANTLR3_COMMON_TOKEN token, pANTLR3_UINT8 text); 43 static ANTLR3_UINT32 getType (pANTLR3_COMMON_TOKEN token); 44 static void setType (pANTLR3_COMMON_TOKEN token, ANTLR3_UINT32 type); 45 static ANTLR3_UINT32 getLine (pANTLR3_COMMON_TOKEN token); 46 static void setLine (pANTLR3_COMMON_TOKEN token, ANTLR3_UINT32 line); 47 static ANTLR3_INT32 getCharPositionInLine (pANTLR3_COMMON_TOKEN token); 48 static void setCharPositionInLine (pANTLR3_COMMON_TOKEN token, ANTLR3_INT3 75 pANTLR3_COMMON_TOKEN token; local 193 pANTLR3_COMMON_TOKEN token; local 247 ANTLR3_UINT32 token; local 306 pANTLR3_COMMON_TOKEN token; local 326 antlr3SetTokenAPI(pANTLR3_COMMON_TOKEN token) argument 351 getText(pANTLR3_COMMON_TOKEN token) argument 415 setText8(pANTLR3_COMMON_TOKEN token, pANTLR3_UINT8 text) argument 451 setText(pANTLR3_COMMON_TOKEN token, pANTLR3_STRING text) argument 464 getType(pANTLR3_COMMON_TOKEN token) argument 469 setType(pANTLR3_COMMON_TOKEN token, ANTLR3_UINT32 type) argument 474 getLine(pANTLR3_COMMON_TOKEN token) argument 479 setLine(pANTLR3_COMMON_TOKEN token, ANTLR3_UINT32 line) argument 484 getCharPositionInLine(pANTLR3_COMMON_TOKEN token) argument 489 setCharPositionInLine(pANTLR3_COMMON_TOKEN token, ANTLR3_INT32 pos) argument 494 getChannel(pANTLR3_COMMON_TOKEN token) argument 499 setChannel(pANTLR3_COMMON_TOKEN token, ANTLR3_UINT32 channel) argument 504 getTokenIndex(pANTLR3_COMMON_TOKEN token) argument 509 setTokenIndex(pANTLR3_COMMON_TOKEN token, ANTLR3_MARKER index) argument 514 getStartIndex(pANTLR3_COMMON_TOKEN token) argument 519 setStartIndex(pANTLR3_COMMON_TOKEN token, ANTLR3_MARKER start) argument 524 getStopIndex(pANTLR3_COMMON_TOKEN token) argument 529 setStopIndex(pANTLR3_COMMON_TOKEN token, ANTLR3_MARKER stop) argument 534 toString(pANTLR3_COMMON_TOKEN token) argument [all...] |