diff options
author | Jeffrey H. Kingston <jeff@it.usyd.edu.au> | 2010-09-14 20:39:50 +0000 |
---|---|---|
committer | Jeffrey H. Kingston <jeff@it.usyd.edu.au> | 2010-09-14 20:39:50 +0000 |
commit | e4836c62b245d618866b6523ec2c892aeb7a76be (patch) | |
tree | 5b5269fb7affb3b20ba8fe0224705bbde98c1614 /include/rslf | |
parent | 128e9a1532ce7fa38ddc16de06d213530dc5ce15 (diff) | |
download | lout-e4836c62b245d618866b6523ec2c892aeb7a76be.tar.gz |
Lout 3.32.
git-svn-id: http://svn.savannah.nongnu.org/svn/lout/trunk@33 9365b830-b601-4143-9ba8-b4a8e2c3339c
Diffstat (limited to 'include/rslf')
-rw-r--r-- | include/rslf | 67 |
1 files changed, 46 insertions, 21 deletions
diff --git a/include/rslf b/include/rslf index 0680138..a708e3b 100644 --- a/include/rslf +++ b/include/rslf @@ -18,6 +18,7 @@ export @RSL def @RSLSetup named pipe { } # pipe through this first named numbered { No } # want lines numbered? + named blanknumbered { Yes } # blank lines numbered? named style named @OrIfPlain left x right y { @BackEnd @Case { PlainText @Yield y else @Yield x } } @@ -27,6 +28,7 @@ def @RSLSetup named fixedfont { Courier }# font family named fixedsize { -1.0p } # font size named fixedline { 1.0vx } # line-space + named fixedblanklinescale { 1.0 } # blank-line scale named fixedspace { lout } # spacing mode named fixedtabin { 8 } # tab interval named fixedtabout { 8s } # tab width @@ -51,6 +53,7 @@ def @RSLSetup named varyingfont { } # font family named varyingsize { 1.0f } # font size named varyingline { 1.0vx } # line-space + named varyingblanklinescale { 1.0 } # blank-line scale named varyingspace { lout } # spacing mode named varyingtabin { 8 } # tab interval named varyingtabout { 3f } # tab width @@ -75,6 +78,7 @@ def @RSLSetup named symbolfont { } # font family named symbolsize { 1.0f } # font size named symbolline { 1.0vx } # line-space + named symbolblanklinescale { 1.0 } # blank-line scale named symbolspace { lout } # spacing mode named symboltabin { 8 } # tab interval named symboltabout { 3f } # tab width @@ -103,22 +107,24 @@ def @RSLSetup @FA @A @PartialFn @Map @PartialMap @IntChoice @ExtChoice @InfList @Interlock "$>" def @RSL - named style { style } # style - named numbered { numbered } # want numbered lines? - named pipe { pipe } # pipe through this first - named font { dft } # font family - named size { dft } # font size - named line { dft } # line-space - named space { dft } # spacing mode - named tabin { dft } # tab interval - named tabout { dft } # tab width - named identifiers { dft } # ident. font - named keywords { dft } # keyword font - named operators { dft } # operator font - named numbers { dft } # number font - named strings { dft } # string font - named comments { dft } # comment font - named linenumbers { dft } # line numbers font + named style { style } # style + named numbered { numbered } # want numbered lines? + named blanknumbered { blanknumbered } # numbered blank lines? + named pipe { pipe } # pipe through this first + named font { dft } # font family + named size { dft } # font size + named line { dft } # line-space + named blanklinescale { dft } # blank-line scale + named space { dft } # spacing mode + named tabin { dft } # tab interval + named tabout { dft } # tab width + named identifiers { dft } # ident. font + named keywords { dft } # keyword font + named operators { dft } # operator font + named numbers { dft } # number font + named strings { dft } # string font + named comments { dft } # comment font + named linenumbers { dft } # line numbers font body @Body # filtered, see below @Begin @@ -181,16 +187,26 @@ def @RSLSetup } } + def wantblanknumbered + { + blanknumbered @Case { + { No no } @Yield "-M" + { NoPrint noprint } @Yield "-N" + { Yes yes } @Yield "" + } + } + pipe @Case { "" @Yield { - "prg2lout -r -lRSL" wantnumbered -i{@FilterIn} - -o{@FilterOut} -e{@FilterErr} + "prg2lout -r -lRSL" wantblanknumbered wantnumbered + -i{@FilterIn} -o{@FilterOut} -e{@FilterErr} -t{@InitTab} -T{@InitTabWidth} } else @Yield { "cat" @FilterIn "|" pipe "|" - "prg2lout -r -lRSL" wantnumbered -o{@FilterOut} - -e{@FilterErr} -t{@InitTab} -T{@InitTabWidth} + "prg2lout -r -lRSL" wantblanknumbered wantnumbered + -o{@FilterOut} -e{@FilterErr} + -t{@InitTab} -T{@InitTabWidth} } } } @@ -223,6 +239,15 @@ def @RSLSetup } + def @InitBLS + { + blanklinescale @Test + iffixed { fixedblanklinescale } + ifvarying { varyingblanklinescale } + ifsymbol { symbolblanklinescale } + } + + def @InitSpace { space @Test @@ -454,7 +479,7 @@ def @RSLSetup { @InitFontFamily Base @InitSize } @Font @InitSpace @Space - { @InitLine lines nohyphen } @Break @Body + { @InitLine lines nohyphen "blanklinescale" @InitBLS } @Break @Body @End @RSL |