if LA(1)==EOF before calling consume). Negative indexes are allowed. Overview Package Class Tree Deprecated Index Help Prev Class Next Class Frames No Frames All Classes Summary: Nested| Field| Constr| Method Detail: Field| Constr| Method org.eclipse.xtext.ui.editor.contentassist.antlr Class ObservableXtextTokenStream java.lang.Object org.antlr.runtime.CommonTokenStream org.eclipse.xtext.parser.antlr.XtextTokenStream The behavior of this method is unspecified if no call to an initializing method has occurred after this stream was constructed. weblink
All rights reserved. Initializing Methods: Some methods in this interface have unspecified behavior if no call to an initializing method has occurred after the stream was constructed. A seek to position i means that LA(1) will return the ith symbol. For more information and an example, see mark(). http://www.antlr.org/api/Java/org/antlr/v4/runtime/IntStream.html
LA(1) returns EOF This operation is guaranteed to not throw an exception if index lies within a marked region. index() will return the index of the first symbol appearing at or after the specified index. This method returns a non-null, non-empty string. When i==1, this method returns the value of the current symbol in the stream (which is the next symbol to be consumed).
IntStream rewind():void Rewind to the input position of the last marker. Implementation public function get index():int sizeproperty size:int[read-only] Only makes sense for streams that buffer everything up probably, but might be useful to display the entire stream or for testing. Skip navigation links Overview Package Class Use Tree Deprecated Index Help PrevClass NextClass Frames NoFrames AllClasses Summary: Nested| Field| Constr| Method Detail: Field| Constr| Method Copyright © 1992–2016 ANTLR. int mark() A mark provides a guarantee that seek() operations will be valid over a "marked range" extending from the index where mark() was called to the current index().
release voidrelease(intmarker) This method releases a marked range created by a call to mark(). This is different from rewind in its multi-directional requirement and in that its argument is strictly an input cursor (index). Upon error, do one token * insertion or deletion if possible. check over here Terms Privacy Security Status Help You can't perform that action at this time.
IntStream Property detail indexproperty index:int[read-only] Return the current input symbol index 0..n where n indicates the last symbol has been read. The return value is unspecified if i<0 and fewer than -i calls to consume() have occurred from the beginning of the stream before calling this method. These examples are extracted from open source projects. This will have the same behavior as rewind() except it releases resources without the backward seek.
Throws: IllegalArgumentException - if index is less than 0 UnsupportedOperationException - if the stream does not support seeking to http://download.eclipse.org/modeling/tmf/xtext/javadoc/2.6/org/eclipse/xtext/ui/editor/contentassist/antlr/ObservableXtextTokenStream.html This allows the use of streaming input sources by specifying the minimum buffering requirements to support arbitrary lookahead during prediction. After this method returns without throwing an exception, then at least one of the following will be true. Overview Package Class Use Tree Deprecated Index Help PREV CLASS NEXT CLASS FRAMES NO FRAMES All Classes SUMMARY:NESTED|FIELD|CONSTR|METHOD DETAIL:FIELD|CONSTR|METHOD com.soebes.subversion.sapm Class ANTLRNoCaseStringStream java.lang.Object org.antlr.runtime.ANTLRStringStream com.soebes.subversion.sapm.ANTLRNoCaseStringStream All Implemented Interfaces:
The Lexer track line/col info as well as input index so its markers are not pure input indexes. LA(-i) where i is before first token should yield -1, invalid char / EOF. int index() Return the index into the stream of the input symbol referred to by LA(1). See Also: mark() index intindex() Return the index into the stream of the input symbol referred to by LA(1).
If the specified index lies past the end of the stream, the operation behaves as though index was the index of the EOF symbol. Reload to refresh your session. Specifying the call to LA(1) allows for lazily initialized streams. check over here Used currently only after a cyclic DFA and just before starting a sem/syn predicate to get the input position back to the start of the decision.
Parameters marker:int rewind()method public function rewind():void Rewind to the input position of the last marker. int size() Returns the total number of symbols in the stream, including a single EOF symbol. You can vote up the examples you like and your votes will be used in our system to product more good examples. + Save this class to your library Example 1
Returns int release()method public function release(marker:int):void You may want to commit to a backtrack but don't want to force the stream to keep bookkeeping objects around for a marker that is
Public Properties PropertyDefinedby index : int[read-only] Return the current input symbol index 0..n where n indicates the last symbol has been read. Since marked regions are used during performance-critical sections of prediction, the specific behavior of invalid usage is unspecified (i.e. LA(-1) is previous token (token just matched). this content This method has the following effects: Forward movement: The value of index() before calling this method is less than the value of index() after calling this method.
Ordered lookahead: The value of LA(1) before calling this method becomes the value of LA(-1) after calling this method. IntStream mark():int Tell the stream to start buffering if it hasn't already. LA(i) refers to a symbol consumed within a marked region that has not yet been released. All Rights Reserved.
a mark is not released, or a mark is released twice, or marks are not released in reverse order from which they were created). Overview Package Class Use Tree Deprecated Index Help PREV CLASS NEXT CLASS FRAMES NO FRAMES All Classes SUMMARY:NESTED|FIELD|CONSTR|METHOD DETAIL:FIELD|CONSTR|METHOD org.databene.jdbacl.sql.parser Class ANTLRNoCaseFileStream java.lang.Object org.antlr.runtime.ANTLRStringStream org.antlr.runtime.ANTLRFileStream org.databene.jdbacl.sql.parser.ANTLRNoCaseFileStream All Implemented Method Summary All MethodsInstance MethodsAbstract Methods Modifier and Type Method and Description void consume() Consumes the current symbol in the stream. String
Note that calling this method does not guarantee that index() is incremented by exactly 1, as that would preclude the ability to implement filtering streams (e.g. The behavior of this method is unspecified if no call to an initializing method has occurred after this stream was constructed. Assume the state the stream was in when this marker was created.