aboutsummaryrefslogtreecommitdiffstats
path: root/include/progf
diff options
context:
space:
mode:
authorJeffrey H. Kingston <jeff@it.usyd.edu.au>2010-09-14 19:38:17 +0000
committerJeffrey H. Kingston <jeff@it.usyd.edu.au>2010-09-14 19:38:17 +0000
commit73d840b9f14b65166b92e6b43f930fd0ef7b8267 (patch)
treef4eb37a19d1b8d6e9c038b5f3e4c24fc8083bad7 /include/progf
parentd4b68bb27f42afb8338f35f9fda0c467ec5d8787 (diff)
downloadlout-73d840b9f14b65166b92e6b43f930fd0ef7b8267.tar.gz
Lout 3.19.
git-svn-id: http://svn.savannah.nongnu.org/svn/lout/trunk@7 9365b830-b601-4143-9ba8-b4a8e2c3339c
Diffstat (limited to 'include/progf')
-rw-r--r--include/progf34
1 files changed, 28 insertions, 6 deletions
diff --git a/include/progf b/include/progf
index 5ca3f81..ec864df 100644
--- a/include/progf
+++ b/include/progf
@@ -7,11 +7,11 @@
# Adapted from the original @CPrint package. #
# #
# This package uses a filtered body parameter to convert program source #
-# code into Lout source. The filter program is prog2lout, which is #
+# code into Lout source. The filter program is prg2lout, which is #
# distributed with Lout and should be compiled and installed wherever #
# Lout itself is. #
# #
-# This package is intended for use by prog2lout's stand-alone mode. #
+# This package is intended for use by prg2lout's stand-alone mode. #
# If you are adding a new language, a better place to start would be #
# files eiffelf and eiffel rather than progf. #
# #
@@ -66,7 +66,7 @@ def @ProgSetup
export
- "$>" @S @D @C @K @N @O @A @M
+ "$>" @S @D @C @K @N @O @A @ST @ED @M
def @Prog
named language { language } # language
@@ -124,12 +124,12 @@ def @ProgSetup
{
pipe @Case {
"" @Yield {
- "prog2lout -r -l" language -i{@FilterIn} -o{@FilterOut} -e{@FilterErr}
+ "prg2lout -r -l" language -i{@FilterIn} -o{@FilterOut} -e{@FilterErr}
-t{@InitTab} -T{@InitTabWidth}
}
else @Yield {
"cat" @FilterIn "|" pipe "|"
- "prog2lout -r -l" language -o{@FilterOut}
+ "prg2lout -r -l" language -o{@FilterOut}
-e{@FilterErr} -t{@InitTab} -T{@InitTabWidth}
}
}
@@ -220,7 +220,6 @@ def @ProgSetup
}
def @O # for formatting operators
- named symb {}
right x
{
operators @Test
@@ -240,6 +239,29 @@ def @ProgSetup
}
}
+ def @ST # for formatting asterisks
+ right x
+ {
+ operators @Test
+ iffixed { fixedoperators }
+ ifvarying { varyingoperators }
+ ifsymbol { symboloperators }
+ @Font "0.5w" @VShift x
+ }
+
+ def @ED # for formatting larger dots
+ right x
+ {
+ operators @Test
+ iffixed { fixedoperators }
+ ifvarying { varyingoperators }
+ ifsymbol { symboloperators }
+ @Font @BackEnd @Case {
+ PlainText @Yield x
+ else @Yield { "1.2f" @Font "+0.05f" @VShift @O x &"0.05f" }
+ }
+ }
+
macro "$>" { {} & }
def @M right x