MAJOR=8 MINOR=3 DEVNAME=sda3 DEVTYPE=partition DISKSEQ=2 PARTN=3 PARTNAME=primary 5ˆl–Ãa¾””†»â‚Àµq—ÔÅ£�þBÐY¶B‰ÑP�Ï ƒl"oÁÀ¿%D \module %D [ file=verb-eif, %D version=2000.08.23, %D title=\CONTEXT\ Verbatim Macros, %D subtitle=Pretty Eiffel Verbatim, %D author={Berend de Boer \& Hans Hagen}, %D date=\currentdate, %D copyright={Berend de Boer \& Hans Hagen}] %C %C This module is part of the \CONTEXT\ macro||package and is %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. % This module will be cleaned up a bit in the process of more % flexible verbatim options. \writestatus{loading}{ConTeXt Verbatim Macros / Pretty EIFFEL Verbatim} %D \startbuffer %D \startEIFFEL %D class TEST %D %D creation %D make %D %D feature -- creation %D %D make is %D do %D print ("hello world") %D end %D %D end %D \stopEIFFEL %D \stopbuffer %D %D %D If a variable in a comment is quoted with `..', it is typeset %D as a variable (common Eiffel convention for pretty typesetters): %D %D \startbuffer %D \startEIFFEL %D class TEST %D %D feature %D %D say (something: STRING) is %D -- say `something' to stdout %D do %D print (something) %D end %D %D end -- class TEST %D \stopEIFFEL %D \stopbuffer %D %D %D Recommended, OOSC2 style setting is: %D %D \setuptyping %D [EIFFEL] %D [margin=1em,palet=,color=blue,style=\it,icommand=\bf,ccommand=\tf] %D %D We borrow most of the macros from the \PERL\ driver. \ifdefined\setupprettyPLtype \else \loadmarkfile{verb-pl} \fi \unprotect %D \EIFFEL\ has only the one line comment sequence \type{--}. \gdef\EIFsetspecials% {\PLsetspecials \setpretty`\#=32 \setpretty`\{=33 \setpretty`\}=33 \setpretty`\[=33 \setpretty`\]=33 \setpretty`\(=33 \setpretty`\)=33 \setpretty`\;=33 \setpretty`\:=33 \setpretty`\!=33 \setpretty`\?=33 \setpretty`\==33 \setpretty`\~=33 \setpretty`\<=33 \setpretty`\>=33 \setpretty`\-=33 \setpretty`\+=33 \setpretty`\/=33 \setpretty`\*=33 \setpretty`\^=33 \setpretty`\%=41 \setpretty`\-=45 \setpretty`\`=81 \setpretty`\'=82 } \gdef\EIFsethandlers% {\PLsethandlers \installprettyhandler 33 \EIFtypesymbol \installprettyhandler 45 \EIFtypefourfive \installprettyhandler 81 \EIFtypeeightone \installprettyhandler 82 \EIFtypeeighttwo \installprettyhandler 90 \EIFtypenine } \gdef\EIFsetcontrols% {\PLsetcontrols \def\flushrestofverbatimline% {\endPLtypesix \inPLcommentfalse \verbatimfont \PLverbosefalse \PLverboseskipped=0}} \gdef\EIFsetvariables {\PLsetvariables} \gdef\setupprettyEIFtype% {\def\prettyidentifier{EIF}% \let\PLidentifiers=\EIFidentifiers \let\PLvariables=\EIFvariables \EIFsetvariables \EIFsetcontrols \EIFsethandlers \EIFsetspecials \PLsetdiagnostics} % symbols should appear in roman \gdef\EIFtypesymbol#1% {\endPLtypesix \ifinPLcomment \getpretty{#1}% \else {\prettynaturalfont\/% \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty}% \fi} % recognize comments \gdef\EIFtypefourfive% {\handlenextnextpretty\doEIFtypefourfive\PLtypefourtwo} \gdef\doEIFtypefourfive#1#2% {\endPLtypesix \getprettydata{#2}% \ifnum\prettytype=45 \let\next=\dodoEIFtypefourfive \else \let\next=\PLtypefourtwo \fi \next{#1}#2} \gdef\dodoEIFtypefourfive% #1% {\endPLtypesix \handlenextnextpretty\dododoEIFtypefourfive\dodododoPLtypefourfive} \gdef\dododoEIFtypefourfive% {\ifnewpretty\expandafter\handlenewpretty\fi\dodododoEIFtypefourfive} \gdef\dodododoEIFtypefourfive#1#2% {\ifinPLcomment \getpretties{#1}{#2}% \else \ifinPLdouble \getpretties{#1}{#2}% \else \global\inPLcommenttrue \PLverbosecorrection \def\next{\beginofpretty[\!!prettyone]\getpretties{#1}{#2}\endofpretty\prettynaturalfont}% \expandafter\next \fi \fi} % recognize `name' in comments and format them like variables \gdef\EIFtypeeightone#1% {\endPLtypesix \ifinPLcomment \ve