Lines Matching defs:look
90 === consume / look / peek
96 to a recognizer at look-ahead position specified by <tt>k</tt>. For
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
112 implemented by some method with a name like <tt>LA(k)</tt> and <tt>look</tt> is
115 un-Ruby-like. Thus, I chose <tt>peek</tt> and <tt>look</tt> to represent a
116 quick-look (peek) and a full-fledged look-ahead operation (look). If this causes
183 # :method: look( k = 1 )
186 abstract :look
294 Then, all <tt>peek</tt>, <tt>look</tt>, and <tt>consume</tt> operations only
349 #peek method returns the integer character value at look-ahead position
350 <tt>k</tt> and the #look method returns the character value as a +String+. They
411 def look( k = 1 ) # for 1.9
446 def look( k = 1 ) # for 1.8
492 # return the character at look-ahead distance +k+ as an integer. <tt>k = 1</tt> represents
517 # operator style look-ahead
518 alias >> look
520 # operator style look-behind
729 tokens will be filtered out by the #peek, #look, and #consume methods.
740 tokens.look # => 0 INT['35'] @ line 1 col 0 (0..1)
741 tokens.look(2) # => 2 MULT["*"] @ line 1 col 2 (3..3)
751 hidden_tokens.look # => 1 WS[' '] @ line 1 col 2 (1..1)
920 # return the type of the on-channel token at look-ahead distance +k+. <tt>k = 1</tt> represents
926 tk = look( k ) and return( tk.type )
930 # operates simillarly to #peek, but returns the full token object at look-ahead position +k+
932 def look( k = 1 )
937 alias >> look
943 # returns the index of the on-channel token at look-ahead position +k+ or nil if no other
969 # returns the index of the on-channel token at look-behind position +k+ or nil if no other
1019 # makes it possible to look ahead and behind the current token during iteration.
1026 while token = look and token.type != EOF
1072 tk = look( -1 ) and string << " #{ tk.inspect } <--"
1073 tk = look( 1 ) and string << " --> #{ tk.inspect }"