18 |
structure S = GenericVC.Source |
structure S = GenericVC.Source |
19 |
structure EM = GenericVC.ErrorMsg |
structure EM = GenericVC.ErrorMsg |
20 |
structure SM = GenericVC.SourceMap |
structure SM = GenericVC.SourceMap |
|
structure P = GenericVC.Control.Print |
|
21 |
|
|
22 |
structure CMLrVals = CMLrValsFun (structure Token = LrParser.Token) |
structure CMLrVals = CMLrValsFun (structure Token = LrParser.Token) |
23 |
structure CMLex = CMLexFun (structure Tokens = CMLrVals.Tokens) |
structure CMLex = CMLexFun (structure Tokens = CMLrVals.Tokens) |
29 |
fun parse param group = let |
fun parse param group = let |
30 |
|
|
31 |
val groupreg = GroupReg.new () |
val groupreg = GroupReg.new () |
32 |
val ginfo = { param = param, groupreg = groupreg } |
val errcons = EM.defaultConsumer () |
33 |
|
val ginfo = { param = param, groupreg = groupreg, errcons = errcons } |
34 |
|
|
35 |
(* The "group cache" -- we store "group options"; having |
(* The "group cache" -- we store "group options"; having |
36 |
* NONE registered for a group means that a previous attempt |
* NONE registered for a group means that a previous attempt |
83 |
val filename = AbsPath.name group |
val filename = AbsPath.name group |
84 |
val _ = Say.vsay (concat ["[scanning ", filename, "]\n"]) |
val _ = Say.vsay (concat ["[scanning ", filename, "]\n"]) |
85 |
val stream = TextIO.openIn filename |
val stream = TextIO.openIn filename |
|
val errcons = { linewidth = !P.linewidth, |
|
|
flush = P.flush, |
|
|
consumer = P.say } |
|
86 |
val source = S.newSource (filename, 1, stream, false, errcons) |
val source = S.newSource (filename, 1, stream, false, errcons) |
87 |
val sourceMap = #sourceMap source |
val sourceMap = #sourceMap source |
88 |
val _ = GroupReg.register groupreg (group, source) |
val _ = GroupReg.register groupreg (group, source) |