aboutsummaryrefslogtreecommitdiffstats
path: root/include/pasf
blob: 34ebd29a6af96b346e082ff83efee5253d8ba4e3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127

###############################################################################
#                                                                             #
#  Lout @Pas package for formatting Pascal programs (Version 2.0)             #
#                                                                             #
#  Version 1.0 by Jeffrey H. Kingston, June 1991.                             #
#  Version 2.0 by Jeffrey H. Kingston, 22 December 1992.                      #
#                                                                             #
#  See "Eq - a Lout package for typesetting mathematics" for user             #
#  information.                                                               #
#                                                                             #
#  Reference:   Jensen, K. and Wirth, N.  Pascal User Manual and Report.      #
#               Second Edition, Springer-Verlag, 1975.                        #
#                                                                             #
#  This program is free software; you can redistribute it and/or modify       #
#  it under the terms of the GNU General Public License as published by       #
#  the Free Software Foundation; either Version 3, or (at your option)        #
#  any later version.                                                         #
#                                                                             #
#  This program is distributed in the hope that it will be useful,            #
#  but WITHOUT ANY WARRANTY; without even the implied warranty of             #
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              #
#  GNU General Public License for more details.                               #
#                                                                             #
#  You should have received a copy of the GNU General Public License          #
#  along with this program; if not, write to the Free Software                #
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston MA 02111-1307 USA     #
#                                                                             #
#  As a special exception, when this file is read by Lout when processing     #
#  a Lout source document, you may use the result without restriction.        #
#                                                                             #
###############################################################################

export	"0" "1" "2" "3" "4" "5" "6" "7" "8" "9"
	"." "," ":" ";" "'" "`" "+" "-" "*" "/" "(" ")"
	"[" "]" "^" ".." "=" "<" ">" "<>" "<=" ">=" ":="

	and array begin case const div do downto else end
	file for forward function goto if in label mod nil not
	of or otherwise packed procedure program record repeat
	set then to type until var while with @Com

def @Pas
   body @Body
@Begin

    def @R right x { Base @Font x }
    def @B right x { Bold @Font x }
    def @S right x { { Symbol Base } @Font x }

    def "0"	{ @R "0"			}
    def "1"	{ @R "1"			}
    def "2"	{ @R "2"			}
    def "3"	{ @R "3"			}
    def "4"	{ @R "4"			}
    def "5"	{ @R "5"			}
    def "6"	{ @R "6"			}
    def "7"	{ @R "7"			}
    def "8"	{ @R "8"			}
    def "9"	{ @R "9"			}
    def "."	{ @R "."			}
    def ","	{ @R ","			}
    def ":"	{ @R ":"			}
    def ";"	{ @R ";"			}
    def "'"	{ @R "'"			}
    def "`"	{ @R "`"			}
    def "+"	{ @S "+"			}
    def "-"	{ @S "-"			}
    def "*"	{ @S @Char "asteriskmath"	}
    def "/"	{ @R @Char "fraction"		}
    def "("	{ @R "("			}
    def ")"	{ @R ")"			}
    def "["	{ @R "["			}
    def "]"	{ @R "]"			}
    def "^"	{ @S 0.8f @Font @Char "arrowup"	}
    def ".."	{ @R ".." &0.1f			}
    def "="	{ @S @Char "equal"		}
    def "<"	{ @S @Char "less"		}
    def ">"	{ @S @Char "greater"		}
    def "<>"	{ @S @Char "notequal"		}
    def "<="	{ @S @Char "lessequal"		}
    def ">="	{ @S @Char "greaterequal"	}
    def ":="	{ :{//0.03fo &0.1f =}		}

    def and		{ @B "and"		}
    def array		{ @B "array"		}
    def begin		{ @B "begin"		}
    def case		{ @B "case"		}
    def const		{ @B "const"		}
    def div		{ @B "div"		}
    def do		{ @B "do"		}
    def downto		{ @B "downto"		}
    def else		{ @B "else"		}
    def end		{ @B "end"		}
    def file		{ @B "file"		}
    def for		{ @B "for"		}
    def forward		{ @B "forward"		}
    def function	{ @B "function"		}
    def goto		{ @B "goto"		}
    def if		{ @B "if"		}
    def in		{ @B "in"		}
    def label		{ @B "label"		}
    def mod		{ @B "mod"		}
    def nil		{ @B "nil"		}
    def not		{ @B "not"		}
    def of		{ @B "of"		}
    def or		{ @B "or"		}
    def otherwise	{ @B "otherwise"	}
    def packed		{ @B "packed"		}
    def procedure	{ @B "procedure"	}
    def program		{ @B "program"		}
    def record		{ @B "record"		}
    def repeat		{ @B "repeat"		}
    def set		{ @B "set"		}
    def then		{ @B "then"		}
    def to		{ @B "to"		}
    def type		{ @B "type"		}
    def until		{ @B "until"		}
    def var		{ @B "var"		}
    def while		{ @B "while"		}
    def with		{ @B "with"		}

    def @Com right x	{ @R "{" x @R "}"	}

   Slope @Font lines @Break @Body

@End @Pas