Compiler/lexical analyzer: Difference between revisions

Line 11,476:
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 (whose "views" need tending), and from 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>(*------------------------------------------------------------------*)
1,448

edits