Skip to content

Instantly share code, notes, and snippets.

@aarongough
Created July 13, 2010 22:22
Show Gist options
  • Save aarongough/474644 to your computer and use it in GitHub Desktop.
Save aarongough/474644 to your computer and use it in GitHub Desktop.
def run_lexer(data)
data = data.unpack("c*") if(data.is_a?(String))
eof = data.length
token_array = []
%% write init;
%% write exec;
puts token_array.inspect
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment