/* iGASM example */ /* Tokenizes strings of expressions with binary operators */ UNIVERSES Operator = {"+","-","*","/","(",")"}; /* available operators */ FUNCTIONS tape : List; /* resulting list of lexems */ str : String; /* auxiliary string */ instr : String; /* input string */ counter : Number; /* string index */ INITIAL tape := emptyList; str := ""; counter := 0; instr := readln("Enter an expression"); FINAL counter = undef; RULES if counter