/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 | 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...] |
/external/antlr/antlr-3.4/runtime/C/include/ |
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 | 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 | 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...] |
H A D | antlr3commontree.c | 61 static pANTLR3_BASE_TREE newFromToken (pANTLR3_ARBORETUM factory, pANTLR3_COMMON_TOKEN token); 108 // Factory space is good, we now want to initialize our cheating token 188 // We have our token pointer now, so we can initialize it to the predefined model. 226 ((pANTLR3_COMMON_TREE)(newTree->super))->token = tree->token; 233 newFromToken(pANTLR3_ARBORETUM factory, pANTLR3_COMMON_TOKEN token) argument 246 ((pANTLR3_COMMON_TREE)(newTree->super))->token = token; 323 tree->token = NULL; // No token a 353 antlr3CommonTreeNewFromToken(pANTLR3_COMMON_TOKEN token) argument 448 pANTLR3_COMMON_TOKEN token; local 470 pANTLR3_COMMON_TOKEN token; local [all...] |
H A D | antlr3commontreenodestream.c | 247 stream->UP.token = inStream->UP.token; 248 inStream->UP.token->strFactory = stream->stringFactory; 249 stream->DOWN.token = inStream->DOWN.token; 250 inStream->DOWN.token->strFactory = stream->stringFactory; 251 stream->EOF_NODE.token = inStream->EOF_NODE.token; 252 inStream->EOF_NODE.token->strFactory = stream->stringFactory; 253 stream->INVALID_NODE.token 273 pANTLR3_COMMON_TOKEN token; local 893 pANTLR3_COMMON_TOKEN token; local 907 pANTLR3_COMMON_TOKEN token; local [all...] |
H A D | antlr3debughandlers.c | 83 static void createNodeTok (pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE node, pANTLR3_COMMON_TOKEN token); 412 // Given a token, create a stringified version of it, in the supplied 435 // Now we serialize the elements of the token.Note that the debugger only 448 // Now send the text that the token represents. 466 pANTLR3_COMMON_TOKEN token; local 501 // Type of the current token (which may be imaginary) 505 // See if we have an actual token or just an imaginary 507 token = delboy->adaptor->getToken(delboy->adaptor, node); 510 if (token != NULL) 512 // Real token 1003 createNodeTok(pANTLR3_DEBUG_EVENT_LISTENER delboy, pANTLR3_BASE_TREE node, pANTLR3_COMMON_TOKEN token) argument [all...] |
H A D | antlr3lexer.c | 5 * An ANTLR3 lexer implements a base recongizer, a token source and 47 static void emitNew (pANTLR3_LEXER lexer, pANTLR3_COMMON_TOKEN token); 103 /* Now install the token source interface 147 /* Initialise the eof token 160 // Initialize the skip token. 181 lexer->rec->state->token = NULL; 191 // a token factory that needs a reset. Do that here 201 /// Returns the next available token from the current input stream. 204 /// Points to the implementation of a token source. The lexer is 208 /// The next token i 636 emitNew(pANTLR3_LEXER lexer, pANTLR3_COMMON_TOKEN token) argument 644 pANTLR3_COMMON_TOKEN token; local [all...] |
H A D | antlr3treeparser.c | 117 /* Now update it to indicate this is a Mismatched token exception 185 // Default implementation is for parser and assumes a token stream as supplied by the runtime. 200 // Default implementation is for parser and assumes a token stream as supplied by the runtime. 211 pANTLR3_COMMON_TOKEN token; local 237 // Find the newly dupicated token 239 token = node->getToken(node); 241 // Create the token text that shows it has been inserted 243 token->setText8 (token, (pANTLR3_UINT8)"<missing "); 244 text = token [all...] |
/external/antlr/antlr-3.4/runtime/CSharp2/Sources/Antlr3.Runtime.Tests/ |
H A D | RewriteRuleXxxxStreamFixture.cs | 54 "test token without any real context")); 69 "test token without any real context")); 83 "test token without any real context")); 194 IToken token1 = CreateToken(1, "test token without any real context"); 204 "The returned token should be equal to the given token (1)."); 214 "The returned token should be equal to the given token (2)."); 224 "The returned token should be equal to the given token ( 373 CreateTree(IToken token) argument [all...] |
/external/antlr/antlr-3.4/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Debug/ |
H A D | BlankDebugEventListener.cs | 71 public virtual void ConsumeToken(IToken token) { argument 73 public virtual void ConsumeHiddenToken(IToken token) { argument 118 public virtual void CreateNode(object node, IToken token) { argument
|
H A D | DebugEventHub.cs | 128 public virtual void ConsumeToken(IToken token) { argument 131 listener.ConsumeToken(token); 135 public virtual void ConsumeHiddenToken(IToken token) { argument 138 listener.ConsumeHiddenToken(token); 269 public virtual void CreateNode(object node, IToken token) { argument 272 listener.CreateNode(node, token);
|
H A D | DebugEventRepeater.cs | 80 public virtual void ConsumeToken(IToken token) { argument 81 _listener.ConsumeToken(token); 83 public virtual void ConsumeHiddenToken(IToken token) { argument 84 _listener.ConsumeHiddenToken(token); 146 public virtual void CreateNode(object node, IToken token) { argument 147 _listener.CreateNode(node, token);
|
H A D | DebugEventSocketProxy.cs | 278 IToken token = adaptor.GetToken(t); 281 if (token != null) { 282 line = token.Line; 283 pos = token.CharPositionInLine; 330 public override void CreateNode(object node, IToken token) { argument 332 int tokenIndex = token.TokenIndex; 378 // escape \n and \r all text for token appears to exist on one line
|
H A D | IDebugEventListener.cs | 95 * An input token was consumed; matched by any kind of element. 96 * Trigger after the token was matched by things like match(), matchAny(). 102 * An off-channel input token was consumed. 103 * Trigger after the token was matched by things like match(), matchAny(). 104 * (unless of course the hidden token is first stuff in the input stream). 113 * what token was seen at that depth. A remote debugger cannot look 114 * ahead into a file it doesn't have so LT events must pass the token 122 * the token stream's marker is sent in case you need it. 181 * data fields are transmitted. The token object or whatever that 323 /** <summary>Announce a new node built from token element 341 CreateNode(object node, IToken token) argument [all...] |
H A D | ParseTreeBuilder.cs | 38 * This parser listener tracks rule entry/exit and token matches 100 public override void ConsumeToken(IToken token) { argument 104 ParseTree elementNode = Create(token); 110 public override void ConsumeHiddenToken(IToken token) { argument 113 hiddenTokens.Add(token);
|
H A D | Profiler.cs | 193 int depth = lastTokenIndex - d.startIndex - numHidden + 1; // +1 counts consuming start token as 1 199 " lookahead " + d.k + " max token " + lastRealTokenTouchedInDecision); 205 public override void ConsumeToken(IToken token) { argument 207 Console.WriteLine("consume token " + token); 215 lastRealTokenTouchedInDecision.TokenIndex < token.TokenIndex) { 216 lastRealTokenTouchedInDecision = token; 220 int thisRefIndex = token.TokenIndex; 222 int depth = thisRefIndex - d.startIndex - numHidden + 1; // +1 counts consuming start token as 1 239 public override void ConsumeHiddenToken(IToken token) { argument [all...] |
H A D | TraceDebugEventListener.cs | 95 public override void CreateNode(object node, IToken token) { argument 98 int tokenIndex = token.TokenIndex;
|
/external/antlr/antlr-3.4/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Tree/ |
H A D | CommonTree.cs | 47 /** <summary>A single token is the payload</summary> */ 49 public IToken token; field in class:Antlr.Runtime.Tree.CommonTree 52 * What token indexes bracket all tokens associated with this node 73 this.token = node.token; 79 this.token = t; 85 if (token == null || token.CharPositionInLine == -1) { 91 return token.CharPositionInLine; 107 return token [all...] |