Guest User

Untitled

a guest
Mar 10th, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Oz 1.05 KB | None | 0 0
  1. declare
  2. fun {SimpleJack Source Temp FinalList CurrState}
  3.    case Source
  4.    of nil then FinalList
  5.    [] H|T then
  6.       case CurrState
  7.       of 0 then %not sure what we're dealing with...need to determine
  8.      local B in
  9.         {String.isInt H B}
  10.         if B then
  11.            {SimpleJack Source Temp FinalList 1}
  12.         else
  13.            {SimpleJack Source Temp FinalList 2}
  14.         end
  15.      end
  16.       [] 1 then %dealing with numbers
  17.      local B in
  18.         {String.isInt H B}
  19.         if B then
  20.            {SimpleJack T H|Temp FinalList 1}
  21.         else %state change. take the temp list, atomize it and add to Final List
  22.            {SimpleJack Source nil Temp.toAtom()|FinalList 2}
  23.         end
  24.      end
  25.       [] 2 then %dealing with letters
  26.      local B in
  27.         {String.isInt H B}
  28.         if B then %state change.
  29.            {SimpleJack Source nil Temp.toAtom()|FinalList 1}
  30.         else
  31.            {SimpleJack T H|Temp FinalList 2}
  32.         end
  33.      end
  34.       end
  35.    end
  36. end
  37.  
  38. local FinalListOfTokens in
  39.    FinalListOfTokens = {SimpleJack "abcd1234fdsa5438" nil nil 0}
  40.    {Browse FinalListOfTokens}
  41. end
Add Comment
Please, Sign In to add comment