Advertisement
Guest User

Untitled

a guest
Feb 11th, 2012
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.27 KB | None | 0 0
  1. def tok!
  2.   loop do
  3.     @line = @port.gets if @line == ''
  4.  
  5.     return EOF_OBJECT if @line.nil?
  6.  
  7.     m_data = TOKEN_REGEXP.match @line
  8.     token, @line = m_data[1, 2] if m_data
  9.  
  10.     return token unless token.nil? or token == '' or token[0] == TOKENS[:sl_comment]
  11.   end
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement