SCM Repository
[smlnj] Diff of /sml/trunk/src/cm/tools/yacctool.sml
Diff of /sml/trunk/src/cm/tools/yacctool.sml
Parent Directory
|
Revision Log
|
Patch
6 |
* Author: Matthias Blume (blume@kurims.kyoto-u.ac.jp) |
* Author: Matthias Blume (blume@kurims.kyoto-u.ac.jp) |
7 |
*) |
*) |
8 |
structure YaccTool = struct |
structure YaccTool = struct |
9 |
|
local |
10 |
|
val tool = "ML-Yacc" |
11 |
|
val kw_sigopts = "sigoptions" |
12 |
|
val kw_smlopts = "smloptions" |
13 |
|
val kwl = [kw_sigopts, kw_smlopts] |
14 |
|
(* This is a bit clumsy because we call parseOptions twice. |
15 |
|
* However, this is not really such a big deal in practice... *) |
16 |
|
fun get kw NONE = NONE |
17 |
|
| get kw (SOME opts) = |
18 |
|
#matches (Tools.parseOptions |
19 |
|
{ tool = tool, keywords = kwl, options = opts }) kw |
20 |
|
in |
21 |
val _ = Tools.registerStdShellCmdTool |
val _ = Tools.registerStdShellCmdTool |
22 |
{ tool = "ML-Yacc", |
{ tool = tool, |
23 |
class = "mlyacc", |
class = "mlyacc", |
24 |
suffixes = ["grm", "y"], |
suffixes = ["grm", "y"], |
25 |
cmdStdPath = "ml-yacc", |
cmdStdPath = "ml-yacc", |
26 |
template = NONE, |
template = NONE, |
27 |
extensionStyle = |
extensionStyle = |
28 |
Tools.EXTEND [("sig", SOME "sml", fn _ => NONE), |
Tools.EXTEND [("sig", SOME "sml", get kw_sigopts), |
29 |
("sml", SOME "sml", fn too => too)], |
("sml", SOME "sml", get kw_smlopts)], |
30 |
dflopts = [] } |
dflopts = [] } |
31 |
end |
end |
32 |
|
end |
|
Legend:
Removed from v.678 |
|
changed lines |
|
Added in v.679 |
|
|