Lines Matching refs:tt
43 recognizers, and then discusses the specific <tt>ANTLR3::Stream</tt> module.
92 <tt>stream.consume</tt> is used to advance a stream one unit. StringStreams are
95 <tt>stream.peek(k = 1)</tt> is used to quickly retrieve the object of interest
96 to a recognizer at look-ahead position specified by <tt>k</tt>. For
98 <tt>k</tt> characters ahead of the stream cursor. For <b>TokenStreams</b>, this
99 is the <i>integer token type of the token</i> <tt>k</tt> tokens ahead of the
102 <tt>stream.look(k = 1)</tt> is used to retrieve the full object of interest at
103 look-ahead position specified by <tt>k</tt>. While <tt>peek</tt> provides the
105 <tt>look</tt> provides the <i>full object of concern</i> in the stream. For
107 character</i> <tt>k</tt> characters ahead of the stream cursor. For
108 <b>TokenStreams</b>, this is the <i>full token structure</i> <tt>k</tt> tokens
111 <b>Note:</b> in most ANTLR runtime APIs for other languages, <tt>peek</tt> is
112 implemented by some method with a name like <tt>LA(k)</tt> and <tt>look</tt> is
113 implemented by some method with a name like <tt>LT(k)</tt>. When writing this
115 un-Ruby-like. Thus, I chose <tt>peek</tt> and <tt>look</tt> to represent a
122 <tt>marker = stream.mark</tt> causes the stream to record important information
124 return a memento, <tt>marker</tt>. The marker object is typically an integer key
127 Used in tandem with, <tt>stream.rewind(mark = last_marker)</tt>, the marker can
131 <tt>stream.release(marker = last_marker)</tt> can be used to release an existing
136 <tt>stream.seek(position)</tt> moves the stream cursor to an absolute position
137 within the stream, basically like typical ruby <tt>IO#seek</tt> style methods.
138 However, unlike <tt>IO#seek</tt>, ANTLR streams currently always use absolute
143 <tt>ANTLR3::Stream</tt> is an abstract-ish base mixin for all IO-like stream
178 # position specified by <tt>k</tt> (such as integer value of a character or an
185 # by <tt>k</tt> (such as a character string or a token structure)
231 It adds the ``abstract'' method, <tt>substring(start, stop)</tt>, which must be
232 implemented to return a slice of the input string from position <tt>start</tt>
233 to position <tt>stop</tt>. It also adds attribute accessor methods <tt>line</tt>
234 and <tt>column</tt>, which are expected to indicate the current line number and
237 == A Word About <tt>line</tt> and <tt>column</tt> attributes
239 Presumably, the concept of <tt>line</tt> and <tt>column</tt> attirbutes of text
250 *Note:* most ANTLR runtime APIs for other languages refer to <tt>column</tt>
251 with the more-precise, but lengthy name <tt>charPositionInLine</tt>. I prefered
294 Then, all <tt>peek</tt>, <tt>look</tt>, and <tt>consume</tt> operations only
295 yield tokens that have the same value for <tt>channel</tt>. The stream skips
317 # <tt>stream.mark</tt>
350 <tt>k</tt> and the #look method returns the character value as a +String+. They
381 # defaults to <tt>"(string)"</tt>
393 # [:file or :name] the (file) name to associate with the stream; default: <tt>'(string)'</tt>
426 # [:file or :name] the (file) name to associate with the stream; default: <tt>'(string)'</tt>
492 # return the character at look-ahead distance +k+ as an integer. <tt>k = 1</tt> represents
494 # value of +k+ returns previous characters consumed, where <tt>k = -1</tt> is the last
495 # character consumed. <tt>k = 0</tt> has undefined behavior and returns +nil+
507 # if <tt>k >= 0</tt>, return the next k characters
508 # if <tt>k < 0</tt>, return the previous <tt>|k|</tt> characters
634 # * the stream's location in <tt>index / line:column</tt> format
727 setting the token's <tt>index</tt> attribute to indicate the token's position
920 # return the type of the on-channel token at look-ahead distance +k+. <tt>k = 1</tt> represents
922 # value of +k+ returns previous on-channel tokens consumed, where <tt>k = -1</tt> is the last
923 # on-channel token consumed. <tt>k = 0</tt> has undefined behavior and returns +nil+
1038 # returns a slice of the token buffer from <tt>start..stop</tt>. The parameters
1039 # are converted to integers with their <tt>to_i</tt> methods, and thus tokens