Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- declare
- fun {SimpleJack Source Temp FinalList CurrState}
- case Source
- of nil then FinalList
- [] H|T then
- case CurrState
- of 0 then %not sure what we're dealing with...need to determine
- local B in
- {String.isInt H B}
- if B then
- {SimpleJack Source Temp FinalList 1}
- else
- {SimpleJack Source Temp FinalList 2}
- end
- end
- [] 1 then %dealing with numbers
- local B in
- {String.isInt H B}
- if B then
- {SimpleJack T H|Temp FinalList 1}
- else %state change. take the temp list, atomize it and add to Final List
- {SimpleJack Source nil Temp.toAtom()|FinalList 2}
- end
- end
- [] 2 then %dealing with letters
- local B in
- {String.isInt H B}
- if B then %state change.
- {SimpleJack Source nil Temp.toAtom()|FinalList 1}
- else
- {SimpleJack T H|Temp FinalList 2}
- end
- end
- end
- end
- end
- local FinalListOfTokens in
- FinalListOfTokens = {SimpleJack "abcd1234fdsa5438" nil nil 0}
- {Browse FinalListOfTokens}
- end
Add Comment
Please, Sign In to add comment