14 |
|
|
15 |
---------------------------------------------------------------------- |
---------------------------------------------------------------------- |
16 |
Name: Matthias Blume (blume (at) tti - c (dot) org) |
Name: Matthias Blume (blume (at) tti - c (dot) org) |
17 |
|
Date: 2004/09/27 17:00:00 CDT |
18 |
|
Tag: blume-20040927-lazysml |
19 |
|
Description: |
20 |
|
|
21 |
|
Added a new tool class called "lazysml" to CM's tool chest. The only |
22 |
|
difference to "sml" is that compilation is done with Control.lazysml |
23 |
|
set to true. A source of class "lazysml" is automatically recognized |
24 |
|
by a file name suffix of ".lml". |
25 |
|
|
26 |
|
In addition to the above feature, the original class "sml" now also |
27 |
|
supports a tool argument "lazy" which has the same effect. As a |
28 |
|
result, the following three lines are equivalent: |
29 |
|
|
30 |
|
foo.sml : lazysml |
31 |
|
foo.sml : sml (lazy) |
32 |
|
foo.sml (lazy) |
33 |
|
|
34 |
|
The setting goes into effect both during parsing and during |
35 |
|
compilation. The original setting is restored right after parsing and |
36 |
|
after compilation, respectively. |
37 |
|
|
38 |
|
In addition to all the above, there is also a general mechanism to set |
39 |
|
ANY of the "controls" that are available at the command line via |
40 |
|
"-C..." on a per-sml-file basis. The same rules that apply for "lazy" |
41 |
|
apply as well. (In fact, "lazy" is implemented as a special case of |
42 |
|
the general mechanism.) |
43 |
|
|
44 |
|
The .cm file syntax uses a new keyword tool argument called "with". |
45 |
|
There are several ways of indicating the desired settings: |
46 |
|
|
47 |
|
foo.sml (with:parser.quotations=true) |
48 |
|
foo.sml (with:(name:parser.quotations value:true)) |
49 |
|
foo.sml (with:(name:name1 value:value1 name:name2 value:value2 ...)) |
50 |
|
foo.sml (with:(name1=value1 name2=value2 ...)) |
51 |
|
foo.sml (with:(name1=value1 name:name2 value:value2 name3=value3 ...)) |
52 |
|
|
53 |
|
etc. |
54 |
|
|
55 |
|
Another possible abbreviation is to leave out the =v or value:v part |
56 |
|
if the name refers to a boolean control (in which case the value is |
57 |
|
taken to be true). Thus, one could get lazy sml also by saying: |
58 |
|
|
59 |
|
foo.sml (with:parser.lazy-keyword=true) |
60 |
|
foo.sml (with:parser.lazy-keyword) |
61 |
|
foo.sml (with:(name:parser.lazy-keyword value:true)) |
62 |
|
foo.sml (with:(name:parser.lazy-keyword)) |
63 |
|
|
64 |
|
---------------------------------------------------------------------- |
65 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
66 |
Date: 2004/09/24 16:22:00 CDT |
Date: 2004/09/24 16:22:00 CDT |
67 |
Tag: blume-20040924-ppc-long-branch |
Tag: blume-20040924-ppc-long-branch |
68 |
Description: |
Description: |