Compiler/lexical analyzer: Difference between revisions

Content added Content deleted
Line 11,476: Line 11,476:
This is a close translation of the ATS. It may interest the reader to compare the two implementations.
This is a close translation of the ATS. It may interest the reader to compare the two implementations.


(Much of the extra complication in the ATS comes from arrays being a linear type, and values of linear type having to be local to any function using them. This limitation could have been worked around, and arrays more similar to OCaml arrays could have been used.)
(Much of the extra complication in the ATS comes from arrays being a linear type, and values of linear type having to be local to any function using them. This limitation could have been worked around, and arrays more similar to OCaml arrays could have been used, but at a cost in safety and efficiency.)


<lang OCaml>(*------------------------------------------------------------------*)
<lang OCaml>(*------------------------------------------------------------------*)
Line 12,043: Line 12,043:
22 26 Integer 32
22 26 Integer 32
23 1 End_of_input</pre>
23 1 End_of_input</pre>



=={{header|Ol}}==
=={{header|Ol}}==