Compiler/lexical analyzer: Difference between revisions

m
Line 3,353:
elseif isdigit(c)
integerstring = match(r"^\d+", line[startcol:end]).match
pastnumposition = startcol + length(integerstring)
if (pastnumposition <= length(line)) && isletter(line[pastnumposition])
throw("Tokenizer error line $startline: " * errors[8])
end
i = parse(Int, integerstring)
push!(tokens, Tokenized(startline, startcol, "Integer", i))
Line 3,455 ⟶ 3,459:
23 1 End_of_input
</pre>
 
 
=={{header|Go}}==
4,108

edits