C# 클래스 Antlr.Runtime.LegacyCommonTokenStream

상속: ITokenStream
파일 보기 프로젝트 열기: antlr/antlrcs

보호된 프로퍼티들

프로퍼티 타입 설명
channel int
channelOverrideMap int>.IDictionary
discardOffChannelTokens bool
discardSet List
lastMarker int
p int
tokens List

공개 메소드들

메소드 설명
Consume ( ) : void

* Move the input pointer to the next incoming token. The stream * must become active with LT(1) available. consume() simply * moves the input pointer so that LT(1) points at the next * input symbol. Consume at least one token. *

* Walk past any token not on the channel the parser is listening to. *

DiscardTokenType ( int ttype ) : void
FillBuffer ( ) : void

* Load all tokens from the token source and put in tokens. * This is done upon first LT request because you might want to * set some token type / channel overrides before filling buffer. *

Get ( int i ) : IToken

* Return absolute token i; ignore which channel the tokens are on; * that is, count all tokens not just on-channel tokens. *

Get ( int start, int count ) : List
GetTokens ( ) : IList
GetTokens ( int start, int stop ) : IList
GetTokens ( int start, int stop, BitSet types ) : IList

* Given a start and stop index, return a List of all tokens in * the token type BitSet. Return null if no tokens were found. This * method looks at both on and off channel tokens. *

GetTokens ( int start, int stop, IList types ) : IList
GetTokens ( int start, int stop, int ttype ) : IList
LA ( int i ) : int
LT ( int k ) : IToken

* Get the ith token from the current position 1..n where k=1 is the * first symbol of lookahead. *

LegacyCommonTokenStream ( ) : System.Collections.Generic
LegacyCommonTokenStream ( ITokenSource tokenSource ) : System.Collections.Generic
LegacyCommonTokenStream ( ITokenSource tokenSource, int channel ) : System.Collections.Generic
Mark ( ) : int
Release ( int marker ) : void
Reset ( ) : void
Rewind ( ) : void
Rewind ( int marker ) : void
Seek ( int index ) : void
SetDiscardOffChannelTokens ( bool discardOffChannelTokens ) : void
SetTokenSource ( ITokenSource tokenSource ) : void

Reset this token stream by setting its token source.

SetTokenTypeChannel ( int ttype, int channel ) : void

* A simple filter mechanism whereby you can tell this token stream * to force all tokens of type ttype to be on channel. For example, * when interpreting, we cannot exec actions so we need to tell * the stream to force all WS and NEWLINE to be a different, ignored * channel. *

ToString ( ) : string
ToString ( IToken start, IToken stop ) : string
ToString ( int start, int stop ) : string

보호된 메소드들

메소드 설명
LB ( int k ) : IToken

Look backwards k tokens on-channel tokens

SkipOffTokenChannels ( int i ) : int

Given a starting index, return the index of the first on-channel token.

SkipOffTokenChannelsReverse ( int i ) : int

메소드 상세

Consume() 공개 메소드

* Move the input pointer to the next incoming token. The stream * must become active with LT(1) available. consume() simply * moves the input pointer so that LT(1) points at the next * input symbol. Consume at least one token. *
* Walk past any token not on the channel the parser is listening to. *
public Consume ( ) : void
리턴 void

DiscardTokenType() 공개 메소드

public DiscardTokenType ( int ttype ) : void
ttype int
리턴 void

FillBuffer() 공개 메소드

* Load all tokens from the token source and put in tokens. * This is done upon first LT request because you might want to * set some token type / channel overrides before filling buffer. *
public FillBuffer ( ) : void
리턴 void

Get() 공개 메소드

* Return absolute token i; ignore which channel the tokens are on; * that is, count all tokens not just on-channel tokens. *
public Get ( int i ) : IToken
i int
리턴 IToken

Get() 공개 메소드

public Get ( int start, int count ) : List
start int
count int
리턴 List

GetTokens() 공개 메소드

public GetTokens ( ) : IList
리턴 IList

GetTokens() 공개 메소드

public GetTokens ( int start, int stop ) : IList
start int
stop int
리턴 IList

GetTokens() 공개 메소드

* Given a start and stop index, return a List of all tokens in * the token type BitSet. Return null if no tokens were found. This * method looks at both on and off channel tokens. *
public GetTokens ( int start, int stop, BitSet types ) : IList
start int
stop int
types BitSet
리턴 IList

GetTokens() 공개 메소드

public GetTokens ( int start, int stop, IList types ) : IList
start int
stop int
types IList
리턴 IList

GetTokens() 공개 메소드

public GetTokens ( int start, int stop, int ttype ) : IList
start int
stop int
ttype int
리턴 IList

LA() 공개 메소드

public LA ( int i ) : int
i int
리턴 int

LB() 보호된 메소드

Look backwards k tokens on-channel tokens
protected LB ( int k ) : IToken
k int
리턴 IToken

LT() 공개 메소드

* Get the ith token from the current position 1..n where k=1 is the * first symbol of lookahead. *
public LT ( int k ) : IToken
k int
리턴 IToken

LegacyCommonTokenStream() 공개 메소드

public LegacyCommonTokenStream ( ) : System.Collections.Generic
리턴 System.Collections.Generic

LegacyCommonTokenStream() 공개 메소드

public LegacyCommonTokenStream ( ITokenSource tokenSource ) : System.Collections.Generic
tokenSource ITokenSource
리턴 System.Collections.Generic

LegacyCommonTokenStream() 공개 메소드

public LegacyCommonTokenStream ( ITokenSource tokenSource, int channel ) : System.Collections.Generic
tokenSource ITokenSource
channel int
리턴 System.Collections.Generic

Mark() 공개 메소드

public Mark ( ) : int
리턴 int

Release() 공개 메소드

public Release ( int marker ) : void
marker int
리턴 void

Reset() 공개 메소드

public Reset ( ) : void
리턴 void

Rewind() 공개 메소드

public Rewind ( ) : void
리턴 void

Rewind() 공개 메소드

public Rewind ( int marker ) : void
marker int
리턴 void

Seek() 공개 메소드

public Seek ( int index ) : void
index int
리턴 void

SetDiscardOffChannelTokens() 공개 메소드

public SetDiscardOffChannelTokens ( bool discardOffChannelTokens ) : void
discardOffChannelTokens bool
리턴 void

SetTokenSource() 공개 메소드

Reset this token stream by setting its token source.
public SetTokenSource ( ITokenSource tokenSource ) : void
tokenSource ITokenSource
리턴 void

SetTokenTypeChannel() 공개 메소드

* A simple filter mechanism whereby you can tell this token stream * to force all tokens of type ttype to be on channel. For example, * when interpreting, we cannot exec actions so we need to tell * the stream to force all WS and NEWLINE to be a different, ignored * channel. *
public SetTokenTypeChannel ( int ttype, int channel ) : void
ttype int
channel int
리턴 void

SkipOffTokenChannels() 보호된 메소드

Given a starting index, return the index of the first on-channel token.
protected SkipOffTokenChannels ( int i ) : int
i int
리턴 int

SkipOffTokenChannelsReverse() 보호된 메소드

protected SkipOffTokenChannelsReverse ( int i ) : int
i int
리턴 int

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

ToString() 공개 메소드

public ToString ( IToken start, IToken stop ) : string
start IToken
stop IToken
리턴 string

ToString() 공개 메소드

public ToString ( int start, int stop ) : string
start int
stop int
리턴 string

프로퍼티 상세

channel 보호되어 있는 프로퍼티

Skip tokens on any channel but this one; this is how we skip whitespace...
protected int channel
리턴 int

channelOverrideMap 보호되어 있는 프로퍼티

Map from token type to channel to override some Tokens' channel numbers
protected IDictionary channelOverrideMap
리턴 int>.IDictionary

discardOffChannelTokens 보호되어 있는 프로퍼티

By default, track all incoming tokens
protected bool discardOffChannelTokens
리턴 bool

discardSet 보호되어 있는 프로퍼티

Set of token types; discard any tokens with this type
protected List discardSet
리턴 List

lastMarker 보호되어 있는 프로퍼티

Track the last mark() call result value for use in rewind().
protected int lastMarker
리턴 int

p 보호되어 있는 프로퍼티

* The index into the tokens list of the current token (next token * to consume). p==-1 indicates that the tokens list is empty *
protected int p
리턴 int

tokens 보호되어 있는 프로퍼티

* Record every single token pulled from the source so we can reproduce * chunks of it later. *
protected List tokens
리턴 List