Token ::= SEQUENCE { userId ASN1OctetString, derAppSpec DERApplicationSpecific, derInteger DERInteger, creationDate DERGeneralizedTime} <pre> @author Dominique RIGHETTO 11 mars 07
70717273747576777879808182
public void setTokenStopIndex(int index) { } public String toString() { if ( payload instanceof Token ) { Token t = (Token)payload; if ( t.getType() == Token.EOF ) { return "<EOF>"; } return t.getText(); } return payload.toString(); }
868788899091929394959697
*/ public String toStringWithHiddenTokens() { StringBuffer buf = new StringBuffer(); if ( hiddenTokens!=null ) { for (int i = 0; i < hiddenTokens.size(); i++) { Token hidden = (Token) hiddenTokens.get(i); buf.append(hidden.getText()); } } String nodeText = this.toString(); if ( !nodeText.equals("<EOF>") ) buf.append(nodeText); return buf.toString();
107108109110111112113114115116117
} // Wildcard? if ( ttype == TreePatternLexer.DOT ) { ttype = tokenizer.nextToken(); Token wildcardPayload = new CommonToken(0, "."); TreeWizard.TreePattern node = new TreeWizard.WildcardTreePattern(wildcardPayload); if ( label!=null ) { node.label = label; }
195196197198199200201202203
Tree t = (Tree)create(fromToken); return t; } public Object create(int tokenType, String text) { Token fromToken = createToken(tokenType, text); Tree t = (Tree)create(fromToken); return t; }
5455565758596061626364
public void consume() { if ( initialStreamState ) { consumeInitialHiddenTokens(); } int a = input.index(); Token t = input.LT(1); input.consume(); int b = input.index(); dbg.consumeToken(t); if ( b>a+1 ) { // then we consumed more than one token; must be off channel tokens
5354555657585960
super(adaptor, elementDescription, elements); } /** Get next token from stream and make a node for it */ public Object nextNode() { Token t = (Token)_next(); return adaptor.create(t); }
225226227228229230231232233234
} */ public void process() throws IOException { CharStream input = new ANTLRFileStream(dispelFile); DISPEL lexer = new DISPEL(input); Token token; while ((token = lexer.nextToken()) != Token.EOF_TOKEN) { tp.process(token); } }
246247248249250251252253254255256
CharStream input; try { input = new ANTLRInputStream(is); DISPEL lexer = new DISPEL(input); Token token; while ((token = lexer.nextToken()).getType() != org.antlr.runtime3_3_0.Token.EOF) { tp.process(token);
49505152535455565758
client.listTenants(fakeToken); } private KeystoneAuthenticationToken buildFakeToken(String tokenCode) { Access auth = new Access(); Token tokenObject = new Token(); tokenObject.setId(tokenCode); auth.setToken(tokenObject); return new KeystoneAuthenticationToken(auth); }