Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def tok!
- loop do
- @line = @port.gets if @line == ''
- return EOF_OBJECT if @line.nil?
- m_data = TOKEN_REGEXP.match @line
- token, @line = m_data[1, 2] if m_data
- return token unless token.nil? or token == '' or token[0] == TOKENS[:sl_comment]
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement