Guest User

Untitled

a guest
Mar 10th, 2018
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Oz 0.55 KB | None | 0 0
  1. declare
  2. fun {Tokenize StringToTokenize CurrentState}
  3.     case StringToTokenize
  4.     of nil then nil
  5.     [] H|T then
  6.         case CurrentState
  7.         of 'keyword' then
  8.             // do keyword stuff
  9.             {Tokenize T 'keyword'}
  10.         [] 'operator' then
  11.             // do operator stuff
  12.             {Tokenize T 'operator'}
  13.         [] 'atom' then
  14.             // do atom stuff
  15.             {Tokenize T 'atom'}
  16.         [] 'int' then
  17.             // do int stuff
  18.             {Tokenize T 'int'}
  19.         [] 'float' then
  20.             // do float stuff
  21.             {Tokenize T 'float'}
  22.         [] 'separator' then
  23.             // do separator stuff
  24.             {Tokenize T 'separator'}
  25.         end
  26.     end
  27. end
Add Comment
Please, Sign In to add comment