├── AUTHORS ├── CHANGES ├── CHANGES.R3 ├── CHANGES.R4 ├── CHANGES.R5 ├── CHANGES.R6 ├── CHANGES.R7 ├── CHANGES.R8 ├── COPYING ├── INSTALL ├── MANIFEST ├── README ├── README.PC ├── README.VMS ├── aclocal.m4 ├── ansi.c ├── api.c ├── api.h ├── basic.c ├── bind.c ├── blist.c ├── blist.h ├── borland.c ├── btree.c ├── btree.h ├── buffer.c ├── buglist ├── builtflt.c ├── charsets.c ├── chgdfunc.h ├── cmdtbl ├── config.guess ├── config.sub ├── config_h.in ├── configure ├── configure.in ├── csrch.c ├── curses.c ├── descrip.mms ├── df-install.in ├── dirstuff.h ├── display.c ├── djhandl.c ├── doc ├── Vileserv.doc ├── Vileserv.html ├── config.doc ├── config.html ├── dir.doc ├── dir.html ├── filters.doc ├── filters.html ├── macros.doc ├── macros.html ├── make-hlp.pl ├── make-hlp.sh ├── make-toc.pl ├── make-toc.sh ├── makefile ├── menus.doc ├── menus.html ├── modes.doc ├── modes.html ├── oleauto.doc ├── oleauto.html ├── perl.doc ├── perl.html ├── vile-hlp.html ├── vile-man.html ├── vile-toc.html ├── visvile.doc └── visvile.html ├── dumbterm.c ├── edef.h ├── eightbit.c ├── encrypt.c ├── estruct.h ├── eval.c ├── exec.c ├── externs.c ├── fences.c ├── file.c ├── filec.c ├── fileio.c ├── filters ├── ada-filt.l ├── ada.key ├── ant.key ├── as-filt.l ├── as.key ├── as386.key ├── asm-filt.l ├── asm.key ├── atr2ansi.c ├── atr2html.c ├── atr2text.c ├── au3-filt.l ├── au3.key ├── awk-filt.l ├── awk.key ├── bas-filt.l ├── bash.key ├── basic.key ├── bat-filt.l ├── bat.key ├── bnf-filt.l ├── bnf.key ├── c-filt.c ├── c-filt.flx ├── c.key ├── cfg-filt.l ├── conffilt.l ├── cpp.key ├── cs.key ├── csh.key ├── css-filt.l ├── css.key ├── cweb.key ├── cwebfilt.l ├── dcl-filt.l ├── dcl.key ├── def-filt.l ├── def.key ├── delphi.key ├── diff.key ├── difffilt.l ├── docbook.key ├── ecl-filt.l ├── ecl.key ├── ecrypt.c ├── erl-filt.l ├── erl.key ├── esql.key ├── esqlfilt.l ├── est-filt.l ├── est.key ├── fdl-filt.l ├── fdl.key ├── filterio.c ├── filters.c ├── filters.h ├── filters.rc ├── flt_defs.h ├── fltstack.h ├── genmake.c ├── genmake.mak ├── genmake.sh ├── go.key ├── hs-filt.l ├── hs.key ├── html.key ├── htmlfilt.l ├── imake.key ├── imakeflt.l ├── infofilt.l ├── ini-filt.l ├── ini.key ├── iss-filt.l ├── iss.key ├── java.key ├── js.key ├── json.key ├── jsonfilt.l ├── key-filt.c ├── ksh.key ├── latex.key ├── latexflt.l ├── lex-filt.l ├── lex.key ├── lisp.key ├── lispfilt.l ├── lua-filt.l ├── lua.key ├── m4-filt.c ├── m4.key ├── mail.key ├── mailcap.key ├── mailfilt.l ├── make.key ├── makefile.2nd ├── makefile.djg ├── makefile.emx ├── makefile.icc ├── makefile.in ├── makefile.wnt ├── makefilt.l ├── makelist.sh ├── manfilt.c ├── mc-filt.l ├── mcrl.key ├── mcrlfilt.l ├── md-filt.l ├── md.key ├── midl.key ├── midlfilt.l ├── mk-0th.awk ├── mk-0th.bat ├── mk-1st.awk ├── mk-1st.bat ├── mk-2nd.awk ├── mk-2nd.bat ├── mk-key.awk ├── mms-filt.l ├── mvn.key ├── nmake.key ├── nmakeflt.l ├── noclass.sh ├── nr-filt.l ├── nr.key ├── nsis.key ├── objc.key ├── pas-filt.l ├── pas.key ├── pc.key ├── perl.key ├── php-filt.l ├── php.key ├── pl-filt.c ├── pot-filt.l ├── pot.key ├── prolog.key ├── ps-filt.l ├── ps.key ├── ps1-filt.l ├── ps1.key ├── py-filt.l ├── py.key ├── raku.key ├── rakufilt.c ├── rb.key ├── rc-filt.l ├── rc.key ├── rcs-filt.l ├── rcs.key ├── rexx.key ├── rexxfilt.l ├── rpm-filt.l ├── rpm.key ├── rtf-filt.l ├── rtf.key ├── ruby.key ├── rubyfilt.c ├── rust.key ├── rustfilt.l ├── sccs.key ├── sccsfilt.l ├── scheme.key ├── scm-filt.l ├── sed-filt.c ├── sh-filt.l ├── sh.key ├── sml-filt.l ├── sml.key ├── spell.rc ├── spellflt.l ├── sql-filt.l ├── sql.key ├── syntax.key ├── tags.key ├── tagsfilt.c ├── tbl-filt.l ├── tbl.key ├── tc-filt.l ├── tc.key ├── tcl-filt.l ├── tcl.key ├── tex.key ├── texi.key ├── texifilt.l ├── ti-filt.l ├── ti.key ├── tpu-filt.l ├── tpu.key ├── ts.key ├── txt-filt.l ├── unfilter.c ├── unfilter.h ├── vb.key ├── vb6.key ├── vbs.key ├── vcproj.key ├── vcxproj.key ├── vile.key ├── vilefilt.l ├── vim.key ├── vl-filt.l ├── vlog.key ├── wbt-filt.l ├── wbt.key ├── xml-filt.l ├── xml.key ├── xq-filt.l ├── xq.key ├── xres.key ├── xresfilt.l ├── xs-filt.l ├── xs.key ├── xsl.key ├── yacc.key ├── yaccfilt.l ├── yaml.key ├── yamlfilt.l └── zsh.key ├── finderr.c ├── glob.c ├── globals.c ├── gnreight.h ├── gppconio.c ├── history.c ├── icons ├── pumpkin.ico ├── pumpkin.xbm ├── pumpkin.xcf ├── pumpkin.xpm ├── pumpkin_48x48.png ├── pumpkin_48x48.svg ├── pumpkin_48x48.xcf ├── sink.ico ├── sink.xbm ├── sink.xcf ├── sink.xpm ├── sink_48x48.png ├── sink_48x48.svg ├── sink_48x48.xcf ├── vile-mini.ico ├── vile-mini.svg ├── vile-mini_16x16.xpm ├── vile-mini_32x32.xpm ├── vile-mini_48x48.xpm ├── vile.ico ├── vile.xbm ├── vile.xcf ├── vile.xpm ├── vile_48x48.png ├── vile_48x48.svg └── vile_48x48.xcf ├── input.c ├── insert.c ├── install-sh ├── isearch.c ├── itbuff.c ├── lckfiles.c ├── line.c ├── macros ├── UXVile.ad ├── XVile.ad ├── color-ls.rc ├── complete.rc ├── dates.rc ├── digraphs.rc ├── gnugpg.rc ├── loaderrs.rc ├── lxvile ├── lxvile-fonts ├── lxvile.desktop ├── manpage.rc ├── modes.rc ├── palettes.rc ├── pictmode.rc ├── search.rc ├── shifts.rc ├── showeach.rc ├── uxvile ├── uxvile.desktop ├── vile-libdir-path ├── vile-pager ├── vile-to-html ├── vileinit.rc ├── vilemenu.rc ├── vileperl.rc ├── which.rc └── xvile.desktop ├── main.c ├── makeargv.c ├── makeargv.h ├── makefile.blc ├── makefile.djg ├── makefile.icc ├── makefile.in ├── makefile.wnt ├── makeflag.wnt ├── map.c ├── menu.c ├── mkprlenv.wnt ├── mktbls.c ├── modes.c ├── modetbl ├── msgs.c ├── npopen.c ├── ntconio.c ├── ntwinio.c ├── nullterm.c ├── oneliner.c ├── opers.c ├── os2keys.h ├── os2pipe.c ├── os2vio.c ├── package ├── convile.nsi ├── debian │ ├── changelog │ ├── control │ ├── copyright │ ├── overrides │ │ └── vile │ ├── rules │ ├── source │ │ └── format │ ├── vile-common.README.Debian │ ├── vile-common.docs │ ├── vile-common.examples │ ├── vile-common.files │ ├── vile-filters.files │ ├── vile-filters.links │ ├── vile.files │ ├── vile.links │ ├── vile.menu │ ├── vile.mini.xpm │ ├── vile.postinst │ ├── vile.prerm │ ├── xvile.files │ ├── xvile.links │ └── xvile.menu ├── freebsd │ ├── vile │ │ ├── Makefile │ │ ├── distinfo │ │ ├── pkg-descr │ │ └── pkg-plist │ └── xvile │ │ ├── Makefile │ │ ├── distinfo │ │ ├── pkg-descr │ │ └── pkg-plist ├── minvile.nsi ├── openbsd │ ├── Makefile │ ├── distinfo │ ├── patches │ │ └── patch-crypt │ └── pkg │ │ ├── DESCR │ │ └── PLIST ├── pkgsrc │ ├── vile │ │ ├── ALTERNATIVES │ │ ├── DESCR │ │ ├── Makefile │ │ ├── PLIST │ │ ├── distinfo │ │ └── options.mk │ └── xvile │ │ ├── DESCR │ │ ├── Makefile │ │ └── PLIST ├── vile.spec ├── winvile-wide.iss ├── winvile.iss ├── winvile.nsi ├── winvile64-wide.iss └── winvile64.iss ├── patchlev.h ├── path.c ├── perl.xs ├── perl ├── Breadcrumbs.pm ├── CaptHook.pm ├── Glob2re.pm ├── Help.pm ├── Vile.pm ├── Vile │ ├── Exporter.pm │ └── Manual.pm ├── Vileserv.pm ├── Visit.pm ├── capture.pm ├── dict.pm ├── directory.pm ├── dirlist.pm ├── gdb.pm ├── hgrep.pm ├── lock.pm ├── man.pm ├── mime.pl ├── plugins.pl ├── search.pm ├── shell.pm ├── spell.pm ├── vileget └── winops.pm ├── plink.sh ├── plugin.c ├── plugin.h ├── plugins ├── Makefile ├── test.c └── test.rc ├── proto.h ├── pscreen.h ├── ptypemap ├── random.c ├── regexp.c ├── region.c ├── revlist ├── search.c ├── select.c ├── spawn.c ├── statevar.c ├── tags.c ├── tbuff.c ├── tcap.c ├── tcap.h ├── termio.c ├── test_io.c ├── trace.c ├── trace.h ├── ucrypt.c ├── undo.c ├── version.c ├── version.sh ├── vile.1 ├── vile.hlp ├── vile.wmconfig ├── visvile ├── commands.cpp ├── commands.h ├── dsaddin.cpp ├── dsaddin.h ├── oleauto.cpp ├── oleauto.h ├── readme.txt ├── resource.h ├── stdafx.cpp ├── stdafx.h ├── tbarlrge.bmp ├── tbarmedm.bmp ├── visvile.cpp ├── visvile.def ├── visvile.dsm ├── visvile.dsp ├── visvile.dsw ├── visvile.h ├── visvile.odl ├── visvile.rc └── visvile.rc2 ├── vl_alloc.h ├── vl_crypt.h ├── vl_ctype.c ├── vl_ctype.h ├── vl_regex.h ├── vl_stdio.h ├── vms2unix.c ├── vmsbuild.com ├── vmspipe.c ├── vmsvt.c ├── w32cbrd.c ├── w32cmd.c ├── w32info.rc ├── w32misc.c ├── w32ole.cpp ├── w32ole.h ├── w32ole.rc ├── w32oo.cpp ├── w32pipe.c ├── w32reg.c ├── w32reg.h ├── w32vile.h ├── watch.c ├── wcwidth.c ├── wcwidth.h ├── window.c ├── winvile.h ├── winvile.odl ├── winvile.rc ├── word.c ├── wordmov.c ├── wvwrap.cpp ├── x11.c ├── x11menu.c ├── x11plain.c ├── x11vile.h ├── xftplain.c ├── xshell.sh ├── xterm.c ├── xtermkeys.h └── xvile.wmconfig /AUTHORS: -------------------------------------------------------------------------------- 1 | -- $Id: AUTHORS,v 1.5 2013/05/26 10:53:01 tom Exp $ 2 | -- vile:txtmode 3 | -- This file is used by a script that collects contributor information from the 4 | -- "CHANGES*" files and/or checkin comments and resolves nicknames vs 5 | -- fullnames. For a complete list of authors, see the "CHANGES*" files, using 6 | -- this key for abbreviated names. 7 | bod Brendan O'Dea 8 | cmorgan Clark O Morgan 9 | garyj Gary Jennejohn 10 | jrs J Richard Sladkey 11 | kev Kevin Buettner 12 | pgf Paul G Fox 13 | tom Thomas E Dickey 14 | -------------------------------------------------------------------------------- /blist.h: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id: blist.h,v 1.4 2007/08/13 22:59:08 tom Exp $ 3 | * 4 | * Interface for blist.c 5 | */ 6 | 7 | #ifndef BLIST_H 8 | #define BLIST_H 1 9 | 10 | typedef struct BLIST { 11 | const void *theList; 12 | unsigned itemSize; 13 | int itemCount; 14 | } BLIST; 15 | 16 | #define init_blist(list) { list, sizeof(list[0]), -1 } 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | extern int blist_count (BLIST *data); 23 | extern int blist_match (BLIST *data, const char *name); 24 | extern int blist_pmatch (BLIST *data, const char *name, int len); 25 | extern void blist_reset (BLIST *data, const void *list); 26 | extern void blist_summary (void); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /* BLIST_H */ 33 | -------------------------------------------------------------------------------- /btree.h: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id: btree.h,v 1.6 2010/05/18 22:59:38 tom Exp $ 3 | * 4 | * Interface for btree.c 5 | */ 6 | #ifndef BTREE_H 7 | #define BTREE_H 1 8 | 9 | #ifndef BI_DATA 10 | #define BI_DATA struct _bi_data 11 | BI_DATA { 12 | char *bi_key; /* the key */ 13 | void *data; /* ...associated data */ 14 | }; 15 | #endif 16 | 17 | #define BI_NODE struct _bi_node 18 | BI_NODE { 19 | BI_NODE *links[2]; 20 | int balance; /* holds 0, -1, +1 */ 21 | BI_DATA value; 22 | }; 23 | 24 | #define BI_TREE struct _bi_tree 25 | BI_TREE { 26 | BI_NODE*(*allocat) (BI_DATA *a); 27 | void (*dealloc) (BI_NODE *a); 28 | void (*display) (BI_NODE *a, int level); 29 | void (*exchang) (BI_NODE *a, BI_NODE *b); 30 | int depth; 31 | int count; 32 | BI_NODE head; /* root data, on end to ease initialization */ 33 | }; 34 | 35 | #define BI_KEY(p) (p)->value.bi_key 36 | #define BI_LEFT(p) (p)->links[0] 37 | #define BI_RIGHT(p) (p)->links[1] 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | extern int btree_delete(BI_TREE *tree, const char *data); 44 | extern int btree_freeup(BI_TREE *tree); 45 | extern BI_DATA *btree_insert(BI_TREE *tree, BI_DATA *data); 46 | extern const char **btree_parray(BI_TREE *tree, char *name, size_t len); 47 | extern BI_NODE *btree_pmatch(BI_NODE *n, const int mode, const char *name); 48 | extern void btree_printf(BI_TREE *tree); 49 | extern BI_DATA *btree_search(BI_TREE *tree, const char *data); 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | #endif /* BTREE_H */ 56 | -------------------------------------------------------------------------------- /chgdfunc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Prototypes for functions in the mode-tables (must be declared before the 3 | * point at which proto.h is included). 4 | * 5 | * $Id: chgdfunc.h,v 1.25 2025/01/26 11:43:46 tom Exp $ 6 | */ 7 | extern int chgd_autobuf (CHGD_ARGS); 8 | extern int chgd_buffer (CHGD_ARGS); 9 | extern int chgd_charset (CHGD_ARGS); 10 | extern int chgd_disabled (CHGD_ARGS); 11 | extern int chgd_dos_mode (CHGD_ARGS); 12 | extern int chgd_fences (CHGD_ARGS); 13 | extern int chgd_hilite (CHGD_ARGS); 14 | extern int chgd_major (CHGD_ARGS); 15 | extern int chgd_mouse (CHGD_ARGS); 16 | extern int chgd_percent (CHGD_ARGS); 17 | extern int chgd_rs (CHGD_ARGS); 18 | extern int chgd_status (CHGD_ARGS); 19 | extern int chgd_undoable (CHGD_ARGS); 20 | extern int chgd_uniqbuf (CHGD_ARGS); 21 | extern int chgd_win_mode (CHGD_ARGS); 22 | extern int chgd_window (CHGD_ARGS); 23 | extern int chgd_working (CHGD_ARGS); 24 | extern int chgd_xterm (CHGD_ARGS); 25 | extern int chgd_xtermkeys(CHGD_ARGS); 26 | 27 | #if OPT_COLOR 28 | extern int chgd_color (CHGD_ARGS); 29 | #endif 30 | 31 | #if OPT_COLOR_SCHEMES 32 | extern int chgd_scheme (CHGD_ARGS); 33 | #endif 34 | 35 | #if OPT_CURTOKENS 36 | extern int chgd_curtokens(CHGD_ARGS); 37 | #endif 38 | 39 | #if OPT_FINDPATH 40 | extern int chgd_find_cfg(CHGD_ARGS); 41 | #endif 42 | 43 | #if OPT_MAJORMODE 44 | extern int chgd_mm_order (CHGD_ARGS); 45 | extern int chgd_filter (CHGD_ARGS); 46 | #endif 47 | 48 | #if OPT_MULTIBYTE 49 | extern int chgd_byteorder(CHGD_ARGS); 50 | extern int chgd_fileencode(CHGD_ARGS); 51 | #endif 52 | 53 | #if OPT_TITLE 54 | extern int chgd_swaptitle(CHGD_ARGS); 55 | #endif 56 | 57 | #if SYS_WINNT && defined(VILE_OLE) 58 | extern int chgd_redir_keys(CHGD_ARGS); 59 | #endif 60 | 61 | #if SYS_WINNT 62 | extern int chgd_icursor(CHGD_ARGS); 63 | extern int chgd_popupmenu(CHGD_ARGS); 64 | extern int chgd_rcntfiles(CHGD_ARGS); 65 | extern int chgd_rcntfldrs(CHGD_ARGS); 66 | #endif 67 | -------------------------------------------------------------------------------- /config_h.in: -------------------------------------------------------------------------------- 1 | /* 2 | * config_h.in is a template file used by configure to produce config.h. 3 | * config_h is then transformed (by config.status) into the header file 4 | * config.h. 5 | * $Id: config_h.in,v 1.3 1994/07/11 22:56:20 tom Exp $ 6 | */ 7 | 8 | @DEFS@ 9 | -------------------------------------------------------------------------------- /doc/Vileserv.doc: -------------------------------------------------------------------------------- 1 | Vile Server and Session Perl Extension version 9.8 2 | -------------------------------------- ----------- 3 | 4 | Vile Server and Session Perl Extension 5 | 6 | This Perl extension to vile gives you the ability to send edit requests to 7 | a running Vile (sort of like gnuserv does for Emacs). Vile is lightweight 8 | enough to run several at a time, but when using a file manager (like 9 | TkDesk) it is convenient to click on files and "add" them to a current 10 | Vile session. 11 | 12 | Attached are two files, Vileserv.pm and vileget. Vileserv.pm is for 13 | loading into a perl-enabled Vile session, and vileget is a utility for 14 | sending requests to the editor. You can use pod2man to get the man pages: 15 | 16 | pod2man Vileserv.pm > vileserv.man 17 | pod2man vileget > vileget.man 18 | 19 | 20 | Credits 21 | ------- 22 | Vileserv was written by J Chris Coppick in 1998. 23 | 24 | -- (generated by make-hlp.pl from Vileserv.html(1.9)) 25 | -- vile:txtmode fillcol=78 26 | -- $Id: Vileserv.doc,v 1.10 2019/04/13 17:18:55 tom Exp $ 27 | -------------------------------------------------------------------------------- /doc/Vileserv.html: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 10 | 11 | Vile Server and Session Perl Extension 12 | 14 | 15 | 17 | 19 | 20 | 21 | 22 |
23 | 24 |

http://invisible-island.net/vile/vile-toc

27 |
28 | 29 |

Vile 30 | Server and Session Perl Extension

31 | 32 |

This Perl extension to vile gives you the ability to send edit 33 | requests to a running Vile (sort of like gnuserv does for Emacs). 34 | Vile is lightweight enough to run several at a time, but when 35 | using a file manager (like TkDesk) it is convenient to click on 36 | files and "add" them to a current Vile session.

37 | 38 |

Attached are two files, Vileserv.pm and vileget. Vileserv.pm 39 | is for loading into a perl-enabled Vile session, and vileget is a 40 | utility for sending requests to the editor. You can use pod2man 41 | to get the man pages:

42 |
43 |         pod2man Vileserv.pm > vileserv.man
44 |         pod2man vileget > vileget.man
45 | 
46 | 47 |

Credits

49 | 50 |

Vileserv was written by J Chris Coppick in 1998.

51 | 52 | 53 | -------------------------------------------------------------------------------- /doc/make-hlp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $Id: make-hlp.sh,v 1.1 2009/11/13 00:12:54 tom Exp $ 3 | rm -f vile.hlp 4 | perl make-hlp.pl vile-hlp.html >vile.hlp 5 | -------------------------------------------------------------------------------- /doc/make-toc.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # $Id: make-toc.pl,v 1.9 2021/12/02 00:27:24 tom Exp $ 3 | 4 | use strict; 5 | use warnings; 6 | 7 | use HTML::Toc; 8 | use HTML::TocGenerator; 9 | 10 | use POSIX qw(strftime); 11 | our $now_string = strftime "%a %b %e %H:%M:%S %Y %Z", localtime; 12 | 13 | print < 15 | 21 | EOF 22 | ; 23 | print < 25 | 26 | 27 | VI Like Emacs — Table of Contents 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 |
36 | http://invisible-island.net/vile/
38 |
39 | EOF 40 | ; 41 | 42 | my $toc = HTML::Toc->new(); 43 | my $tocGenerator = HTML::TocGenerator->new(); 44 | 45 | $toc->setOptions({'doLinkToFile' => 1}); 46 | $toc->setOptions({'doLinkToId' => 1}); 47 | $tocGenerator->generateFromFile($toc, \@ARGV); 48 | print $toc->format(); 49 | 50 | print < 53 | EOF 54 | ; 55 | -------------------------------------------------------------------------------- /doc/make-toc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $Id: make-toc.sh,v 1.3 2013/12/27 20:43:40 tom Exp $ 3 | rm -f vile-toc.html 4 | perl make-toc.pl "$@" | sed -e 's,-toc",",g' >vile-toc.html 5 | -------------------------------------------------------------------------------- /doc/makefile: -------------------------------------------------------------------------------- 1 | # $Id: makefile,v 1.24 2022/12/23 00:55:56 tom Exp $ 2 | # construct ".doc" and ".hlp" files from the ".html" files 3 | 4 | # NOTE: the perl script uses the version from the running copy of vile rather 5 | # than the source, to apply the version number to .doc files. 6 | 7 | # list the html files in the order needed for table of contents 8 | SOURCES = \ 9 | vile-man.html \ 10 | vile-hlp.html \ 11 | config.html \ 12 | macros.html \ 13 | modes.html \ 14 | filters.html \ 15 | menus.html \ 16 | perl.html \ 17 | dir.html \ 18 | Vileserv.html \ 19 | oleauto.html \ 20 | visvile.html 21 | 22 | TARGETS = \ 23 | ../vile.hlp \ 24 | vile-man.html \ 25 | vile-toc.html \ 26 | Vileserv.doc \ 27 | config.doc \ 28 | dir.doc \ 29 | filters.doc \ 30 | macros.doc \ 31 | menus.doc \ 32 | modes.doc \ 33 | oleauto.doc \ 34 | perl.doc \ 35 | visvile.doc 36 | 37 | .SUFFIXES: .html .doc .hlp 38 | 39 | .html.doc : 40 | rm -f $@ 41 | perl make-hlp.pl $< >$@ 42 | 43 | .html.hlp : 44 | rm -f $@ 45 | perl make-hlp.pl $< >$@ 46 | 47 | all: $(TARGETS) 48 | clean: 49 | mostlyclean: 50 | realclean: 51 | distclean: 52 | : 53 | maintainer-clean: 54 | rm -f $(TARGETS) 55 | 56 | vile-toc.html : $(SOURCES) 57 | sh make-toc.sh $(SOURCES) 58 | 59 | vile-man.html : ../vile.1 60 | rm -f $@ 61 | MAN2HTML_OPTS=-toc ../man2html.tmp ../vile 1 man | sed -e 's,\.\./vile,vile', >$@ 62 | 63 | ../vile.hlp : vile-hlp.html 64 | rm -f $@ 65 | perl make-hlp.pl vile-hlp.html >$@ 66 | -------------------------------------------------------------------------------- /externs.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This is just a place holder -- a place in which to pull in edef.h alone 3 | * 4 | * $Id: externs.c,v 1.13 2011/04/07 00:55:07 tom Exp $ 5 | * 6 | */ 7 | 8 | #include "estruct.h" /* function declarations */ 9 | 10 | #include "edef.h" 11 | 12 | #define real_CMDFUNCS 13 | #include "nefunc.h" /* function declarations */ 14 | #include "nebind.h" /* default key bindings */ 15 | #define real_NAMETBL 16 | #include "nename.h" /* name table */ 17 | 18 | DECL_EXTERN_CONST(int nametbl_size) = TABLESIZE(nametbl); 19 | DECL_EXTERN_CONST(int glbstbl_size) = TABLESIZE(glbstbl); 20 | -------------------------------------------------------------------------------- /filters/ada-filt.l: -------------------------------------------------------------------------------- 1 | %pointer 2 | 3 | %{ 4 | 5 | /* 6 | * $Id: ada-filt.l,v 1.22 2013/12/02 01:32:54 tom Exp $ 7 | * 8 | * Filter to add vile "attribution" sequences to selected bits of Ada 9 | * input text. 10 | */ 11 | 12 | #include 13 | 14 | DefineFilter(ada); 15 | 16 | static char *Comment_attr; 17 | static char *Ident2_attr; 18 | static char *Number_attr; 19 | static char *String_attr; 20 | 21 | %} 22 | 23 | INTEGER [-+]?([[:digit:]]+) 24 | REAL [-+]?([[:digit:]]*\.[[:digit:]]+)([eE][+-]?[[:digit:]]+)? 25 | IDENT [[:alpha:]_][[:alnum:]_]* 26 | 27 | QUOTECHAR \'([^']|(''))\' 28 | STRING \"([^"]|(""))*\" 29 | 30 | NUMBER {INTEGER}|{REAL} 31 | 32 | ATTRIBUTE \'{IDENT} 33 | 34 | %% 35 | 36 | {IDENT} { WriteToken(get_keyword_attr(yytext)); } 37 | "<<"{IDENT}">>" { WriteToken(Ident2_attr); } 38 | {QUOTECHAR} | 39 | {STRING} { WriteToken(String_attr); } 40 | {NUMBER} { WriteToken(Number_attr); } 41 | "--"[^\r\n]* { WriteToken(Comment_attr); } 42 | {ATTRIBUTE} { 43 | set_symbol_table("ada_attribute"); 44 | WriteToken(get_keyword_attr(yytext + 1)); 45 | set_symbol_table(default_table); 46 | } 47 | 48 | %% 49 | 50 | static void 51 | init_filter(int before GCC_UNUSED) 52 | { 53 | (void) before; 54 | } 55 | 56 | static void 57 | do_filter(FILE *inputs) 58 | { 59 | InitLEX(inputs); 60 | 61 | Comment_attr = class_attr(NAME_COMMENT); 62 | Ident2_attr = class_attr(NAME_IDENT2); 63 | Number_attr = class_attr(NAME_NUMBER); 64 | String_attr = class_attr(NAME_LITERAL); 65 | 66 | RunLEX(); 67 | } 68 | 69 | #if NO_LEAKS 70 | static void 71 | free_filter(void) 72 | { 73 | USE_LEXFREE; 74 | } 75 | #endif 76 | -------------------------------------------------------------------------------- /filters/ada.key: -------------------------------------------------------------------------------- 1 | : $Id: ada.key,v 1.2 2011/04/10 23:14:07 tom Exp $ 2 | abort 3 | abs 4 | all 5 | and 6 | begin 7 | body 8 | case 9 | declare 10 | do 11 | else 12 | elsif 13 | end 14 | entry 15 | exception 16 | exit 17 | for 18 | function 19 | generic 20 | if 21 | in 22 | is 23 | loop 24 | mod 25 | new 26 | not 27 | null 28 | or 29 | others 30 | out 31 | package 32 | pragma 33 | procedure 34 | protected 35 | rem 36 | renames 37 | reverse 38 | select 39 | separate 40 | task 41 | then 42 | until 43 | use 44 | when 45 | while 46 | with 47 | xor 48 | : 49 | accept:Ident2 50 | delay:Ident2 51 | goto:Ident2 52 | raise:Ident2 53 | requeue:Ident2 54 | return:Ident2 55 | terminate:Ident2 56 | : 57 | abstract:Type 58 | access:Type 59 | aliased:Type 60 | array:Type 61 | at:Type 62 | constant:Type 63 | delta:Type 64 | digits:Type 65 | limited:Type 66 | of:Type 67 | private:Type 68 | range:Type 69 | record:Type 70 | subtype:Type 71 | tagged:Type 72 | type:Type 73 | : 74 | : predefined attributes 75 | .table ada_attribute 76 | .default Type 77 | access 78 | address 79 | adjacent 80 | aft 81 | alignment 82 | base 83 | bit_order 84 | body_version 85 | callable 86 | caller 87 | ceiling 88 | class 89 | component_size 90 | compose 91 | constrained 92 | copy_sign 93 | count 94 | definite 95 | delta 96 | denorm 97 | digits 98 | exponent 99 | external_tag 100 | first 101 | first_bit 102 | floor 103 | fore 104 | fraction 105 | identity 106 | image 107 | input 108 | last 109 | last_bit 110 | leading_bit 111 | leading_part 112 | length 113 | machine 114 | machine_emax 115 | machine_emin 116 | machine_mantissa 117 | machine_overflows 118 | machine_radix 119 | machine_rounds 120 | max 121 | max_size 122 | min 123 | model 124 | modulus 125 | output 126 | partition_id 127 | pos 128 | position 129 | pred 130 | range 131 | read 132 | remainder 133 | round 134 | rounding 135 | safe_first 136 | safe_last 137 | scale 138 | scaling 139 | signed_zeros 140 | size 141 | small 142 | storage_pool 143 | storage_size 144 | succ 145 | tag 146 | terminated 147 | truncation 148 | unbiased_rounding 149 | unchecked_access 150 | val 151 | valid 152 | value 153 | version 154 | wide_image 155 | wide_value 156 | wide_width 157 | width 158 | write 159 | -------------------------------------------------------------------------------- /filters/as.key: -------------------------------------------------------------------------------- 1 | : $Id: as.key,v 1.3 2009/05/15 23:56:03 tom Exp $ 2 | .meta ! 3 | : 4 | !default Keyword 5 | .align 6 | .ascii 7 | .asciz 8 | .byte 9 | .def 10 | .desc 11 | .dim 12 | .double 13 | .eject 14 | .end 15 | .endef 16 | .endfunc 17 | .endm 18 | .equ 19 | .equiv 20 | .err:Action 21 | .exitm:Action 22 | .extern 23 | .fail:Action 24 | .file 25 | .fill 26 | .float 27 | .func 28 | .global 29 | .globl 30 | .hidden 31 | .hword 32 | .ident 33 | .int 34 | .internal 35 | .irp 36 | .irpc 37 | .lcomm 38 | .line 39 | .linkonce 40 | .list 41 | .ln 42 | .long 43 | .macro 44 | .mri 45 | .nolist 46 | .octa 47 | .org 48 | .p2align 49 | .p2alignl 50 | .p2alignw 51 | .popsection 52 | .previous 53 | .print 54 | .protected 55 | .psize 56 | .purgem 57 | .pushsection 58 | .quad 59 | .rept 60 | .sbttl 61 | .scl 62 | .section 63 | .set 64 | .short 65 | .single 66 | .size 67 | .skip 68 | .sleb128 69 | .space 70 | .stabd 71 | .stabn 72 | .stabs 73 | .string 74 | .struct 75 | .subsection 76 | .symver 77 | .tag 78 | .text 79 | .title 80 | .type 81 | .uleb128 82 | .val 83 | .version 84 | .vtable_entry 85 | .weak 86 | .word 87 | !default Preproc 88 | .incbin 89 | .include 90 | .ifdef 91 | .ifnotdef 92 | .ifndef 93 | .ifnes 94 | .ifne 95 | .ifnc 96 | .iflt 97 | .ifle 98 | .ifgt 99 | .ifge 100 | .ifeqs 101 | .ifeq 102 | .ifc 103 | .if 104 | .elseif 105 | .else 106 | .endif 107 | .macro 108 | .endm 109 | : GNU-specific 110 | .att_syntax 111 | .intel_syntax 112 | !meta . 113 | .merge as386 114 | -------------------------------------------------------------------------------- /filters/atr2ansi.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Convert attributed text to ANSI-style escape sequences, allowing color. 3 | * 4 | * $Id: atr2ansi.c,v 1.5 2007/05/05 15:23:03 tom Exp $ 5 | */ 6 | #include 7 | 8 | #define CSI "\033[" 9 | 10 | static int last_attrib; 11 | 12 | void 13 | begin_unfilter(FILE *dst GCC_UNUSED) 14 | { 15 | (void) dst; 16 | 17 | last_attrib = 0; 18 | } 19 | 20 | void 21 | markup_unfilter(FILE *dst, int attrib) 22 | { 23 | if (attrib != 0) { 24 | vl_fputs(CSI "0", dst); 25 | if (attrib & ATR_BOLD) 26 | vl_fputs(";1", dst); 27 | if (attrib & (ATR_UNDERLINE | ATR_ITALIC)) 28 | vl_fputs(";4", dst); 29 | if (attrib & ATR_REVERSE) 30 | vl_fputs(";7", dst); 31 | if (attrib & ATR_COLOR) { 32 | vl_fputs(";3", dst); 33 | vl_putc('0' + (attrib & 7), dst); 34 | } 35 | vl_putc('m', dst); 36 | } else if (last_attrib != 0) { 37 | vl_fputs(CSI "0m", dst); 38 | } 39 | last_attrib = attrib; 40 | } 41 | 42 | void 43 | write_unfilter(FILE *dst, int ch, int attrib GCC_UNUSED) 44 | { 45 | (void) attrib; 46 | 47 | vl_putc(ch, dst); 48 | } 49 | 50 | void 51 | end_unfilter(FILE *dst GCC_UNUSED) 52 | { 53 | (void) dst; 54 | 55 | markup_unfilter(dst, 0); 56 | } 57 | -------------------------------------------------------------------------------- /filters/atr2text.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Convert attributed text to something like nroff output. 3 | * 4 | * $Id: atr2text.c,v 1.5 2007/05/05 15:14:56 tom Exp $ 5 | */ 6 | #include 7 | 8 | void 9 | begin_unfilter(FILE *dst GCC_UNUSED) 10 | { 11 | (void) dst; 12 | } 13 | 14 | void 15 | markup_unfilter(FILE *dst GCC_UNUSED, int attrib GCC_UNUSED) 16 | { 17 | (void) dst; 18 | (void) attrib; 19 | } 20 | 21 | void 22 | write_unfilter(FILE *dst, int ch, int attrib) 23 | { 24 | if (isprint(ch)) { 25 | if (attrib & ATR_BOLD) { 26 | vl_putc(ch, dst); 27 | vl_putc('\b', dst); 28 | } else if (attrib & (ATR_UNDERLINE | ATR_ITALIC)) { 29 | vl_putc('_', dst); 30 | vl_putc('\b', dst); 31 | } 32 | } 33 | vl_putc(ch, dst); 34 | } 35 | 36 | void 37 | end_unfilter(FILE *dst GCC_UNUSED) 38 | { 39 | (void) dst; 40 | } 41 | -------------------------------------------------------------------------------- /filters/awk.key: -------------------------------------------------------------------------------- 1 | : $Id: awk.key,v 1.2 1998/12/28 21:38:03 tom Exp $ 2 | : Identifiers 3 | : AWK 4 | BEGIN 5 | END 6 | atan2 7 | break 8 | close 9 | continue 10 | cos 11 | delete 12 | do 13 | else 14 | exit 15 | exp 16 | for 17 | function 18 | getline 19 | gsub 20 | if 21 | in 22 | index 23 | int 24 | length 25 | log 26 | match 27 | next 28 | print 29 | printf 30 | rand 31 | return 32 | sin 33 | split 34 | sprintf 35 | sqrt 36 | srand 37 | sub 38 | substr 39 | system 40 | while 41 | : GAWK extensions 42 | fflush 43 | gensub 44 | nextfile 45 | strftime 46 | systime 47 | tolower 48 | toupper 49 | : MAWK extensions 50 | : Variables 51 | : AWK 52 | ARGC 53 | ARGV 54 | FILENAME 55 | FNR 56 | FS 57 | NF 58 | NR 59 | OFMT 60 | OFS 61 | ORS 62 | RLENGTH 63 | RS 64 | RSTART 65 | SUBSEP 66 | : GAWK 67 | ARGIND 68 | CONVFMT 69 | ENVIRON 70 | ERRNO 71 | FIELDWIDTHS 72 | IGNORECASE 73 | RLENGTH 74 | RT 75 | -------------------------------------------------------------------------------- /filters/bash.key: -------------------------------------------------------------------------------- 1 | : $Id: bash.key,v 1.2 2012/07/11 19:21:35 tom Exp $ 2 | : bash keywords 3 | bind 4 | builtin 5 | caller 6 | compgen 7 | complete 8 | declare 9 | dirs 10 | disown 11 | enable 12 | function 13 | help 14 | history 15 | let 16 | local 17 | logout 18 | popd 19 | pushd 20 | select 21 | shopt 22 | source 23 | suspend 24 | time 25 | type 26 | typeset 27 | wait 28 | .merge sh 29 | -------------------------------------------------------------------------------- /filters/bat.key: -------------------------------------------------------------------------------- 1 | : $Id: bat.key,v 1.5 2009/05/21 22:32:03 tom Exp $ 2 | : DOS 3 | rem:Comment 4 | append 5 | assign 6 | attrib 7 | backup 8 | break 9 | call 10 | cd 11 | chcp 12 | chdir 13 | chkdsk 14 | cls 15 | command 16 | comp 17 | copy 18 | ctty 19 | date 20 | del 21 | dir 22 | diskcomp 23 | diskcopy 24 | do 25 | echo 26 | erase 27 | errorlevel 28 | exe2bin 29 | exist 30 | exit 31 | fastopen 32 | fc 33 | fdisk 34 | find 35 | for 36 | format 37 | goto 38 | graftabl 39 | graphics 40 | if 41 | in 42 | join 43 | keyb 44 | label 45 | lh 46 | loadhigh 47 | md 48 | mem 49 | mkdir 50 | mode 51 | more 52 | move 53 | nlsfunc 54 | not 55 | off 56 | path 57 | pause 58 | print 59 | prn 60 | prompt 61 | rd 62 | recover 63 | ren 64 | rename 65 | replace 66 | restore 67 | rmdir 68 | select 69 | set 70 | share 71 | shift 72 | sort 73 | subst 74 | sys 75 | time 76 | tree 77 | type 78 | ver 79 | verify 80 | vol 81 | xcopy 82 | : W95 83 | : NT 84 | assoc 85 | at 86 | color 87 | endlocal 88 | ftype 89 | popd 90 | pushd 91 | setlocal 92 | -------------------------------------------------------------------------------- /filters/bnf-filt.l: -------------------------------------------------------------------------------- 1 | %pointer 2 | 3 | %{ 4 | 5 | /* 6 | * $Id: bnf-filt.l,v 1.16 2013/12/02 01:32:54 tom Exp $ 7 | * 8 | * Filter to add vile "attribution" sequences to selected bits of BNF syntax. 9 | */ 10 | 11 | #include 12 | 13 | DefineFilter(bnf); 14 | 15 | static char *Action_attr; 16 | static char *Comment_attr; 17 | static char *Number_attr; 18 | static char *String_attr; 19 | 20 | %} 21 | 22 | IDENT [@$%&]*[[:alpha:]_][[:alnum:]_-]* 23 | 24 | NUMBER [-+]?([[:digit:]]+|("0"[xX][[:xdigit:]]+)) 25 | 26 | ESCAPE = 27 | BSTRING \'(=.|[^'=])*\' 28 | 29 | %% 30 | 31 | {IDENT} { WriteToken(get_keyword_attr(yytext)); } 32 | "::=" | 33 | [<>\[\]{}?|;+*/-] { WriteToken(Action_attr); } 34 | 35 | "!"[^\r\n]* { WriteToken(Comment_attr); } 36 | 37 | {NUMBER} { WriteToken(Number_attr); } 38 | {BSTRING} { WriteToken(String_attr); } 39 | 40 | %% 41 | 42 | static void 43 | init_filter(int before GCC_UNUSED) 44 | { 45 | (void) before; 46 | } 47 | 48 | static void 49 | do_filter(FILE *inputs) 50 | { 51 | InitLEX(inputs); 52 | Action_attr = class_attr(NAME_ACTION); 53 | Comment_attr = class_attr(NAME_COMMENT); 54 | Number_attr = class_attr(NAME_NUMBER); 55 | String_attr = class_attr(NAME_LITERAL); 56 | 57 | RunLEX(); 58 | } 59 | 60 | #if NO_LEAKS 61 | static void 62 | free_filter(void) 63 | { 64 | USE_LEXFREE; 65 | } 66 | #endif 67 | -------------------------------------------------------------------------------- /filters/bnf.key: -------------------------------------------------------------------------------- 1 | : $Id: bnf.key,v 1.1 2005/08/30 01:18:42 tom Exp $ 2 | -------------------------------------------------------------------------------- /filters/c-filt.flx: -------------------------------------------------------------------------------- 1 | %x COMMENT 2 | 3 | %{ 4 | /* Filter to add vile "attribution" sequences to selected bits of C/C++ */ 5 | /* input text. */ 6 | 7 | /* You gotta use flex for this beast - hence the COMMENT start state */ 8 | /* written by Alistair G. Crooks (agc@uts.amdahl.com) */ 9 | 10 | #include 11 | 12 | 13 | #define BOLD "B" 14 | #define ULINE "U" 15 | #define ITALIC "I" 16 | #define COLOR1 "C1" 17 | #define COLOR2 "C2" 18 | #define COLOR3 "C3" 19 | #define COLOR4 "C4" 20 | 21 | /* customize here, using the above set of defines... */ 22 | 23 | char keyword_attr[] = BOLD; 24 | char preproc_attr[] = BOLD; 25 | char comment_attr[] = ULINE; 26 | 27 | /* ...end customization */ 28 | 29 | #define CTL_A '\001' 30 | 31 | int 32 | #ifdef __STDC__ 33 | main(int argc, char **argv) 34 | #else 35 | main(argc, argv) 36 | int argc; 37 | char **argv; 38 | #endif 39 | { 40 | extern FILE *yyin; 41 | 42 | if (argc == 1) { 43 | yyin = stdin; 44 | } else if ((yyin = fopen(argv[1], "r")) == (FILE *) NULL) { 45 | (void) fprintf(stderr, "can't open %s\n", argv[1]); 46 | exit(1); 47 | } 48 | while (yylex() > 0) { 49 | } 50 | exit(0); 51 | } 52 | 53 | %} 54 | 55 | %% 56 | 57 | #[ \t]*if | 58 | #[ \t]*if(n)?def | 59 | #[ \t]*else | 60 | #[ \t]*endif | 61 | #[ \t]*define | 62 | #[ \t]*error | 63 | #[ \t]*include | 64 | #[ \t]*undef { printf("%c%i%s:%s", CTL_A, yyleng, preproc_attr, yytext); } 65 | 66 | break | 67 | case | 68 | continue | 69 | default | 70 | do | 71 | else | 72 | extern | 73 | for | 74 | goto | 75 | if | 76 | return | 77 | sizeof | 78 | static | 79 | struct | 80 | switch | 81 | typedef | 82 | union | 83 | while { printf("%c%i%s:%s", CTL_A, yyleng, keyword_attr, yytext); } 84 | 85 | 86 | "/*" { printf("%c2%s:/*", CTL_A, comment_attr); BEGIN(COMMENT); } 87 | [^*]* { printf("%c%i%s:%s", CTL_A, yyleng, comment_attr, yytext); } 88 | "*"+[^*/]* { printf("%c%i%s:%s", CTL_A, yyleng, comment_attr, yytext); } 89 | "*"+"/" { printf("%c%i%s:%s", CTL_A, yyleng, comment_attr, yytext); BEGIN(0); } 90 | 91 | "//".*$ { printf("%c%i%s:%s", CTL_A, yyleng, comment_attr, yytext); } 92 | 93 | [a-zA-Z_][a-zA-Z_0-9]* | 94 | \"(\\\.|[^\"])*\" { printf("%s", yytext); } 95 | 96 | 97 | -------------------------------------------------------------------------------- /filters/cfg-filt.l: -------------------------------------------------------------------------------- 1 | %pointer 2 | 3 | %{ 4 | 5 | /* 6 | * $Id: cfg-filt.l,v 1.20 2013/12/02 01:32:54 tom Exp $ 7 | * 8 | * Filter to add vile "attribution" sequences to an ordinary Lynx config-file 9 | */ 10 | 11 | #include 12 | 13 | DefineFilter(cfg); 14 | 15 | static char *Comment_attr; 16 | static char *Ident2_attr; 17 | static char *Keyword_attr; 18 | static char *Number_attr; 19 | static char *String_attr; 20 | 21 | static int 22 | mixedcase(const char *name) 23 | { 24 | if (!strcmp(name, "A") || !strcmp(name, "I")) 25 | return 1; 26 | while (*name) { 27 | int ch = (*name++ & 0xff); 28 | if (isalpha(ch) && islower(ch)) 29 | return 1; 30 | } 31 | return 0; 32 | } 33 | 34 | %} 35 | 36 | COMMENT ^[ \t]*#[^\r\n]*\n 37 | 38 | KEYWORD ([[:alpha:]_][[:alnum:]_.]*|[[:upper:]][+/&][[:upper:]]) 39 | 40 | SIGN [-+] 41 | DECIMAL [[:digit:]_]+ 42 | OCTAL 0[0-7_]+ 43 | HEXADECIMAL 0x[[:xdigit:]_]+ 44 | REAL [-+]?([[:digit:]_]*\.[[:digit:]][[:digit:]_]*)([eE][+-]?[[:digit:]_]+)? 45 | NUMBER {SIGN}?({DECIMAL}|{OCTAL}|{HEXADECIMAL}|{REAL}) 46 | 47 | NAME [[:alnum:]_.-]+ 48 | ADDRESS ({NAME}|\.)+ 49 | EMAIL {NAME}@{ADDRESS} 50 | 51 | URL [[:alpha:]]+"://"[[:alnum:]#%&+\,.\/?;@_=~-]+ 52 | 53 | %% 54 | 55 | ^\.[^\r\n]*$ { WriteToken(String_attr); } 56 | 57 | {KEYWORD} { WriteToken(mixedcase(yytext) ? "" : Keyword_attr); } 58 | 59 | {COMMENT} { WriteToken(Comment_attr); } 60 | 61 | {NUMBER} { WriteToken(Number_attr); } 62 | 63 | {EMAIL} { WriteToken(Ident2_attr); } 64 | {URL} { WriteToken(Ident2_attr); } 65 | 66 | . { ECHO; } 67 | 68 | %% 69 | 70 | static void 71 | init_filter(int before GCC_UNUSED) 72 | { 73 | (void) before; 74 | } 75 | 76 | static void 77 | do_filter(FILE *inputs) 78 | { 79 | InitLEX(inputs); 80 | 81 | Comment_attr = class_attr(NAME_COMMENT); 82 | Ident2_attr = class_attr(NAME_IDENT2); 83 | Keyword_attr = class_attr(NAME_KEYWORD); 84 | Number_attr = class_attr(NAME_NUMBER); 85 | String_attr = class_attr(NAME_LITERAL); 86 | 87 | RunLEX(); 88 | } 89 | 90 | #if NO_LEAKS 91 | static void 92 | free_filter(void) 93 | { 94 | USE_LEXFREE; 95 | } 96 | #endif 97 | -------------------------------------------------------------------------------- /filters/cpp.key: -------------------------------------------------------------------------------- 1 | : $Id: cpp.key,v 1.10 2014/01/14 21:04:29 tom Exp $ 2 | : http://en.cppreference.com/w/cpp/keyword 3 | : http://www.bezem.de/pdf/ReservedWordsInC.pdf 4 | alignas 5 | alignof 6 | and 7 | and_eq 8 | asm 9 | bitand 10 | bitor 11 | bool:Type 12 | catch 13 | char16_t 14 | char32_t 15 | class 16 | compl 17 | const_cast 18 | constexpr 19 | decltype 20 | delete 21 | dynamic_cast 22 | explicit 23 | export 24 | false 25 | final 26 | friend 27 | mutable 28 | namespace 29 | new 30 | noexcept 31 | not 32 | not_eq 33 | nullptr:Number 34 | operator 35 | or 36 | or_eq 37 | override 38 | private 39 | protected 40 | public 41 | reinterpret_cast 42 | static_assert 43 | static_cast 44 | template 45 | this 46 | thread_local 47 | throw 48 | true 49 | try 50 | typeid 51 | typename 52 | using 53 | virtual 54 | wchar_t 55 | xor 56 | xor_eq 57 | .merge c 58 | : nonstandard 59 | .table cpre 60 | import 61 | using 62 | .default 63 | -------------------------------------------------------------------------------- /filters/cs.key: -------------------------------------------------------------------------------- 1 | : $Id: cs.key,v 1.2 2008/11/16 22:01:28 tom Exp $ 2 | : C# 3 | : see "C# Language Specification", October 2002 4 | : produced by ECMA TC39/TG2 5 | 6 | abstract 7 | as 8 | base 9 | break 10 | case 11 | catch 12 | checked 13 | class 14 | const 15 | continue 16 | default 17 | delegate 18 | do 19 | else 20 | event 21 | explicit 22 | extern 23 | finally 24 | for 25 | foreach 26 | goto 27 | if 28 | implicit 29 | in 30 | interface 31 | internal 32 | is 33 | lock 34 | namespace 35 | new 36 | operator 37 | out 38 | override 39 | params 40 | private 41 | protected 42 | public 43 | readonly 44 | ref 45 | return 46 | sealed 47 | sizeof 48 | stackalloc 49 | static 50 | string 51 | struct 52 | switch 53 | this 54 | throw 55 | true 56 | try 57 | typeof 58 | uint 59 | ulong 60 | unchecked 61 | unsafe 62 | ushort 63 | using 64 | virtual 65 | void 66 | volatile 67 | while 68 | 69 | : value types 70 | .default Type 71 | bool 72 | byte 73 | char 74 | decimal 75 | double 76 | enum 77 | fixed 78 | float 79 | int 80 | long 81 | object 82 | sbyte 83 | short 84 | string 85 | uint 86 | ulong 87 | ushort 88 | var 89 | void 90 | 91 | .default Number 92 | false 93 | null 94 | true 95 | 96 | : preprocessing 97 | .table cpre 98 | define 99 | elif 100 | else 101 | endif 102 | endregion 103 | error 104 | if 105 | line 106 | pragma 107 | region 108 | undef 109 | warning 110 | .default 111 | -------------------------------------------------------------------------------- /filters/csh.key: -------------------------------------------------------------------------------- 1 | : $Id: csh.key,v 1.1 1999/03/27 15:59:23 tom Exp $ 2 | : csh keywords 3 | alias 4 | bg 5 | break 6 | breaksw 7 | case 8 | cd 9 | chdir 10 | command 11 | continue 12 | default 13 | dirs 14 | echo 15 | end 16 | endif 17 | endsw 18 | eval 19 | exec 20 | exit 21 | fg 22 | foreach 23 | glob 24 | goto 25 | hashstat 26 | history 27 | if 28 | jobs 29 | kill 30 | limit 31 | login 32 | logout 33 | nice 34 | nohup 35 | notify 36 | onintr 37 | popd 38 | pushd 39 | rehash 40 | repeat 41 | set 42 | setenv 43 | shift 44 | source 45 | stop 46 | suspend 47 | switch 48 | then 49 | time 50 | umask 51 | unalias 52 | unhash 53 | unlimit 54 | unset 55 | unsetenv 56 | wait 57 | while 58 | : tcsh keywords 59 | alloc 60 | bindkey 61 | builtins 62 | bye 63 | complete 64 | echotc 65 | else 66 | filetest 67 | foreach 68 | getspath 69 | getxvers 70 | hup 71 | inlib 72 | log 73 | migrate 74 | newgrp 75 | printenv 76 | rootnode 77 | sched 78 | setpath 79 | setspath 80 | settc 81 | setty 82 | setxvers 83 | telltc 84 | uncomplete 85 | universe 86 | unlimit 87 | unset 88 | unsetenv 89 | warp 90 | watchlog 91 | where 92 | which 93 | -------------------------------------------------------------------------------- /filters/cweb.key: -------------------------------------------------------------------------------- 1 | : $Id: cweb.key,v 1.3 2009/05/16 00:44:11 tom Exp $ 2 | : make C and C++ tables accessed as "c" table. 3 | .merge cpp 4 | -------------------------------------------------------------------------------- /filters/dcl.key: -------------------------------------------------------------------------------- 1 | : $Id: dcl.key,v 1.5 2004/05/15 11:42:40 tom Exp $ 2 | : VAX DCL allows all of the command verbs to be abbreviated; in fact they are 3 | : not really distinct past the first four characters. 4 | : 5 | : common command-verbs 6 | acco*unting 7 | acs 8 | advi*se 9 | allo*cate 10 | ana*lyze 11 | app*end 12 | ass*ign 13 | atta*ch 14 | auth*orize 15 | auto*gen 16 | back*up 17 | batc*h 18 | call 19 | canc*el 20 | clos*e 21 | conn*ect 22 | cont*inue 23 | conv*ert 24 | copy 25 | cre*ate 26 | deal*locate 27 | deas*sign 28 | debu*g 29 | deck 30 | def*ine 31 | del*ete 32 | dep*osit 33 | diff*erences 34 | dire*ctory 35 | disa*ble 36 | disc*onnect 37 | disk*quota 38 | dism*ount 39 | dsr 40 | dtm 41 | dump 42 | edit 43 | else 44 | elv 45 | enab*le 46 | endi*f 47 | ends*ubroutine 48 | eod 49 | eoj 50 | exa*mine 51 | exit 52 | fdl 53 | gosu*b 54 | goto 55 | help 56 | if 57 | init*ialize 58 | inq*uire 59 | inst*all 60 | lib*rary 61 | lice*nse 62 | link 63 | lo*gout 64 | loca*le 65 | lse*dit 66 | merg*e 67 | mess*age 68 | mms 69 | modi*fy 70 | mon*itor 71 | mou*nt 72 | on 73 | open 74 | pasc*al 75 | pass*word 76 | patc*h 77 | phon*e 78 | pipe 79 | pr*int 80 | pur*ge 81 | quit 82 | read 83 | reco*ver 84 | redu*ce 85 | remo*ve 86 | ren*ame 87 | repl*ace 88 | repl*y 89 | req*uest 90 | ret*urn 91 | rexe*c 92 | rsh 93 | run 94 | sea*rch 95 | send 96 | set 97 | seta*cl 98 | show 99 | sort 100 | spaw*n 101 | sta*rt 102 | stop 103 | subm*it 104 | subr*outine 105 | supe*rvise 106 | syn*chronize 107 | sysg*en 108 | sysm*an 109 | then 110 | type 111 | unlo*ck 112 | verb 113 | view 114 | wait 115 | wr*ite 116 | : 117 | : lexical functions 118 | .default Ident2 119 | f$co*ntext 120 | f$cs*id 121 | f$cv*si 122 | f$cv*time 123 | f$cv*ui 124 | f$de*vice 125 | f$di*rectory 126 | f$ed*it 127 | f$el*ement 128 | f$en*vironment 129 | f$ex*tract 130 | f$fa*o 131 | f$fi*le_attributes 132 | f$ge*tdvi 133 | f$ge*tjpi 134 | f$ge*tqui 135 | f$ge*tsyi 136 | f$id*entifier 137 | f$in*teger 138 | f$le*ngth 139 | f$lo*cate 140 | f$me*ssage 141 | f$mo*de 142 | f$pa*rse 143 | f$pi*d 144 | f$pr*ivilege 145 | f$pr*ocess 146 | f$se*arch 147 | f$se*tprv 148 | f$st*ring 149 | f$ti*me 150 | f$tr*nlnm 151 | f$ty*pe 152 | f$us*er 153 | f$ve*rify 154 | -------------------------------------------------------------------------------- /filters/def-filt.l: -------------------------------------------------------------------------------- 1 | %pointer 2 | 3 | %{ 4 | 5 | /* 6 | * $Id: def-filt.l,v 1.16 2013/12/02 01:32:54 tom Exp $ 7 | * 8 | * Filter to add vile "attribution" sequences to selected bits of M$ linker-definition 9 | * input text. 10 | */ 11 | 12 | #include 13 | 14 | DefineFilter(def); 15 | 16 | static char *Comment_attr; 17 | static char *Number_attr; 18 | static char *String_attr; 19 | 20 | %} 21 | 22 | INTEGER ([[:digit:]]+)|(0x[[:xdigit:]]+) 23 | IDENT [!$]?[[:alpha:]][[:alnum:]_]*[%&!#$]? 24 | 25 | SSTRING \'([^']|(''))*\' 26 | DSTRING \"([^"]|(""))*\" 27 | STRING {SSTRING}|{DSTRING} 28 | 29 | NUMBER {INTEGER} 30 | 31 | %% 32 | 33 | {IDENT} { WriteToken(get_keyword_attr(yytext)); } 34 | {STRING} { WriteToken(String_attr); } 35 | {NUMBER} { WriteToken(Number_attr); } 36 | ";"[^\r\n]* { WriteToken(Comment_attr); } 37 | 38 | %% 39 | 40 | static void 41 | init_filter(int before GCC_UNUSED) 42 | { 43 | (void) before; 44 | } 45 | 46 | static void 47 | do_filter(FILE *inputs) 48 | { 49 | InitLEX(inputs); 50 | 51 | Comment_attr = class_attr(NAME_COMMENT); 52 | Number_attr = class_attr(NAME_NUMBER); 53 | String_attr = class_attr(NAME_LITERAL); 54 | 55 | RunLEX(); 56 | } 57 | 58 | #if NO_LEAKS 59 | static void 60 | free_filter(void) 61 | { 62 | USE_LEXFREE; 63 | } 64 | #endif 65 | -------------------------------------------------------------------------------- /filters/def.key: -------------------------------------------------------------------------------- 1 | : $Id: def.key,v 1.1 2001/03/21 00:41:48 tom Exp $ 2 | code 3 | data 4 | description 5 | discardable 6 | dos 7 | exetype 8 | exports 9 | fixed 10 | heapsize 11 | imports 12 | library 13 | loadoncall 14 | moveable 15 | preload 16 | private 17 | residentname 18 | segments 19 | single 20 | stub 21 | windows 22 | -------------------------------------------------------------------------------- /filters/delphi.key: -------------------------------------------------------------------------------- 1 | : $Id: delphi.key,v 1.2 2011/06/12 14:31:26 tom Exp $ 2 | .default Keyword 3 | : reserved words (a superset of pascal) 4 | and 5 | array 6 | as 7 | begin 8 | case 9 | class 10 | const 11 | constructor 12 | destructor 13 | dispinterface 14 | do 15 | downto 16 | else 17 | end 18 | except 19 | exports 20 | file 21 | final 22 | finalization 23 | finally 24 | for 25 | function 26 | goto 27 | if 28 | implementation 29 | in 30 | inherited 31 | initialization 32 | inline 33 | interface 34 | is 35 | label 36 | library 37 | not 38 | object 39 | of 40 | on 41 | or 42 | out 43 | packed 44 | procedure 45 | program 46 | property 47 | raise 48 | record 49 | repeat 50 | resourcestring 51 | sealed 52 | set 53 | static 54 | then 55 | threadvar 56 | to 57 | try 58 | type 59 | unit 60 | unsafe 61 | until 62 | uses 63 | var 64 | while 65 | with 66 | xor 67 | : directives 68 | .default Keyword2 69 | absolute 70 | abstract 71 | asm 72 | assembler 73 | automated 74 | cdecl 75 | contains 76 | default 77 | deprecated 78 | dispid 79 | dynamic 80 | export 81 | external 82 | far 83 | forward 84 | implements 85 | index 86 | inline 87 | library 88 | local 89 | message 90 | name 91 | near 92 | nodefault 93 | overload 94 | override 95 | package 96 | pascal 97 | platform 98 | private 99 | protected 100 | public 101 | published 102 | read 103 | readonly 104 | register 105 | reintroduce 106 | requires 107 | resident 108 | safecall 109 | stdcall 110 | stored 111 | varargs 112 | virtual 113 | write 114 | writeonly 115 | : 116 | .default Type 117 | string 118 | real48 119 | single 120 | double 121 | extended 122 | comp 123 | currency 124 | : 125 | .default Ident2 126 | pos 127 | shl 128 | shr 129 | : 130 | .default 131 | .include pas 132 | -------------------------------------------------------------------------------- /filters/diff.key: -------------------------------------------------------------------------------- 1 | : $Id: diff.key,v 1.1 1999/04/16 23:51:10 tom Exp $ 2 | .class Insert 3 | .class Delete 4 | .class Header 5 | .class Marker 6 | .class Modify 7 | Delete:C1 8 | Insert:C2 9 | Header:C6 10 | Marker:BC6 11 | Modify:C3 12 | -------------------------------------------------------------------------------- /filters/difffilt.l: -------------------------------------------------------------------------------- 1 | %pointer 2 | %s HEADER sDELETE INSERT MODIFY 3 | 4 | %{ 5 | 6 | /* 7 | * $Id: difffilt.l,v 1.13 2013/12/02 01:32:54 tom Exp $ 8 | * 9 | * Filter to add vile "attribution" sequences to selected bits of diff output 10 | */ 11 | 12 | #include 13 | 14 | DefineFilter(diff); 15 | 16 | static char *Marker_attr; 17 | static char *Header_attr; 18 | static char *Insert_attr; 19 | static char *Delete_attr; 20 | static char *Modify_attr; 21 | 22 | %} 23 | 24 | BLANK [ \t] 25 | 26 | HEADER ^("***"|"+++"|"---"|@@|#|diff\>|Index:|Binary\>) 27 | INSERT ^[>+] 28 | DELETE ^[<-] 29 | MODIFY ^[|!] 30 | 31 | MARKED [^\n]*\n 32 | 33 | %% 34 | 35 | {HEADER} { WriteToken(Marker_attr); BEGIN(HEADER); } 36 |
{MARKED} { WriteToken(Header_attr); BEGIN(INITIAL); } 37 | 38 | {INSERT} { ECHO; BEGIN(INSERT); } 39 | {MARKED} { WriteToken(Insert_attr); BEGIN(INITIAL); } 40 | 41 | {DELETE} { ECHO; BEGIN(sDELETE); } 42 | {MARKED} { WriteToken(Delete_attr); BEGIN(INITIAL); } 43 | 44 | {MODIFY} { ECHO; BEGIN(MODIFY); } 45 | {MARKED} { WriteToken(Modify_attr); BEGIN(INITIAL); } 46 | 47 | %% 48 | 49 | static void 50 | init_filter(int before GCC_UNUSED) 51 | { 52 | (void) before; 53 | } 54 | 55 | static void 56 | do_filter(FILE *inputs) 57 | { 58 | InitLEX(inputs); 59 | 60 | Marker_attr = class_attr("Marker"); 61 | Header_attr = class_attr("Header"); 62 | Insert_attr = class_attr("Insert"); 63 | Delete_attr = class_attr("Delete"); 64 | Modify_attr = class_attr("Modify"); 65 | 66 | BEGIN(INITIAL); 67 | RunLEX(); 68 | } 69 | 70 | #if NO_LEAKS 71 | static void 72 | free_filter(void) 73 | { 74 | USE_LEXFREE; 75 | } 76 | #endif 77 | -------------------------------------------------------------------------------- /filters/ecl.key: -------------------------------------------------------------------------------- 1 | : $Id: ecl.key,v 1.2 2009/06/20 16:33:54 tom Exp $ 2 | .merge prolog 3 | -------------------------------------------------------------------------------- /filters/erl.key: -------------------------------------------------------------------------------- 1 | .class Braces:BC2 2 | : 3 | .default Keyword 4 | after 5 | and 6 | andalso 7 | band 8 | begin 9 | bnot 10 | bor 11 | bsl 12 | bsr 13 | bxor 14 | case 15 | catch 16 | cond 17 | div 18 | end 19 | fun 20 | if 21 | let 22 | not 23 | of 24 | or 25 | orelse 26 | query 27 | receive 28 | rem 29 | try 30 | when 31 | xor 32 | : 33 | .default Type 34 | : 35 | .default 36 | -------------------------------------------------------------------------------- /filters/est.key: -------------------------------------------------------------------------------- 1 | : $Id: est.key,v 1.1 2002/10/11 15:12:36 tom Exp $ 2 | : keywords for enscript syntax-descriptions 3 | BEGIN 4 | END 5 | div 6 | else 7 | for 8 | if 9 | local 10 | namerules 11 | return 12 | start 13 | startrules 14 | state 15 | sub 16 | while 17 | : 18 | extends 19 | -------------------------------------------------------------------------------- /filters/fdl.key: -------------------------------------------------------------------------------- 1 | : $Id: fdl.key,v 1.4 2001/08/21 20:55:06 tom Exp $ 2 | $all 3 | $array 4 | $else 5 | $elseif 6 | $endarray 7 | $endfield 8 | $endform 9 | $endgroup 10 | $endif 11 | $endpage 12 | $endscroll 13 | $endstate 14 | $endtext 15 | $except 16 | $exit 17 | $field 18 | $form 19 | $group 20 | $if 21 | $include 22 | $init 23 | $page 24 | $rem:Comment 25 | $sccs 26 | $scroll 27 | $state 28 | $text 29 | Ident2:BR 30 | -------------------------------------------------------------------------------- /filters/flt_defs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id: flt_defs.h,v 1.23 2025/01/26 15:00:32 tom Exp $ 3 | */ 4 | 5 | #ifndef FLT_DEFS_H 6 | #define FLT_DEFS_H 1 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | #ifndef _estruct_h 13 | 14 | #ifdef HAVE_CONFIG_H 15 | #include 16 | #else 17 | /* assume ANSI C */ 18 | # define HAVE_STDLIB_H 1 19 | # define HAVE_STRING_H 1 20 | #endif 21 | 22 | #ifndef OPT_FILTER 23 | #define OPT_FILTER 0 24 | #endif 25 | 26 | #ifndef OPT_LOCALE 27 | #define OPT_LOCALE 0 28 | #endif 29 | 30 | #define NonNull(s) ((s == NULL) ? "" : s) 31 | #define isEmpty(s) ((s) == NULL || *(s) == EOS) 32 | 33 | #define EOS '\0' 34 | 35 | /* If we are using built-in filters, we can use many definitions from estruct.h 36 | * that may resolve to functions in ../vile 37 | */ 38 | #include 39 | 40 | #endif /* _estruct_h */ 41 | 42 | #if OPT_LOCALE 43 | #include 44 | #endif 45 | 46 | #include 47 | 48 | #ifndef TRACE 49 | #define TRACE(params) /* nothing */ 50 | #endif 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | #endif /* FLT_DEFS_H */ 56 | -------------------------------------------------------------------------------- /filters/genmake.mak: -------------------------------------------------------------------------------- 1 | # $Id: genmake.mak,v 1.53 2022/01/25 01:29:41 tom Exp $ 2 | # This is a list of filter root names and whether .c or .l files define the 3 | # filter. Except for vile-crypt and vile-manfilt (which do not correspond to 4 | # majormodes), the filter names are constructed as vile-{root}-filt. 5 | 6 | c c-filt c 7 | key key-filt c 8 | m4 m4-filt c 9 | perl pl-filt c 10 | raku rakufilt c 11 | ruby rubyfilt c 12 | sed sed-filt c 13 | tags tagsfilt c 14 | 15 | ada ada-filt l 16 | as as-filt l 17 | asm asm-filt l 18 | au3 au3-filt l 19 | awk awk-filt l 20 | basic bas-filt l 21 | bat bat-filt l 22 | bnf bnf-filt l 23 | cfg cfg-filt l 24 | conf conffilt l 25 | css css-filt l 26 | cweb cwebfilt l 27 | dcl dcl-filt l 28 | def def-filt l 29 | diff difffilt l 30 | ecl ecl-filt l 31 | erl erl-filt l 32 | esql esqlfilt l 33 | est est-filt l 34 | fdl fdl-filt l 35 | hs hs-filt l 36 | html htmlfilt l flex 37 | imake imakeflt l 38 | info infofilt l 39 | ini ini-filt l 40 | iss iss-filt l 41 | json jsonfilt l 42 | latex latexflt l 43 | lex lex-filt l flex 44 | lisp lispfilt l 45 | lua lua-filt l 46 | mail mailfilt l 47 | mailcap mc-filt l 48 | make makefilt l 49 | mcrl mcrlfilt l 50 | md md-filt l 51 | midl midlfilt l 52 | mms mms-filt l 53 | nmake nmakeflt l 54 | nr nr-filt l 55 | pas pas-filt l 56 | php php-filt l 57 | pot pot-filt l 58 | ps ps-filt l 59 | ps1 ps1-filt l 60 | py py-filt l 61 | rc rc-filt l 62 | rcs rcs-filt l 63 | rexx rexxfilt l 64 | rpm rpm-filt l 65 | rtf rtf-filt l 66 | rust rustfilt l 67 | sccs sccsfilt l 68 | scheme scm-filt l 69 | sh sh-filt l 70 | sml sml-filt l 71 | spell spellflt l 72 | sql sql-filt l 73 | tbl tbl-filt l 74 | tc tc-filt l 75 | tcl tcl-filt l 76 | texi texifilt l 77 | ti ti-filt l 78 | tpu tpu-filt l 79 | txt txt-filt l 80 | vile vilefilt l 81 | vlog vl-filt l 82 | wbt wbt-filt l 83 | xml xml-filt l 84 | xq xq-filt l 85 | xres xresfilt l 86 | xs xs-filt l 87 | yacc yaccfilt l 88 | yaml yamlfilt l 89 | -------------------------------------------------------------------------------- /filters/go.key: -------------------------------------------------------------------------------- 1 | : $Id: go.key,v 1.2 2019/09/14 16:14:59 tom Exp $ 2 | : keywords for "go" 3 | bool 4 | break 5 | case 6 | chan 7 | const 8 | continue 9 | default 10 | defer 11 | else 12 | fallthrough 13 | for 14 | func 15 | go 16 | if 17 | import 18 | interface 19 | map 20 | package 21 | range 22 | return 23 | select 24 | string 25 | struct 26 | switch 27 | type 28 | var 29 | .default Ident2 30 | error 31 | goto 32 | .default Type 33 | byte 34 | complex128 35 | complex64 36 | float32 37 | float64 38 | int 39 | int16 40 | int32 41 | int64 42 | int8 43 | rune 44 | uint 45 | uint16 46 | uint32 47 | uint64 48 | uint8 49 | uintptr 50 | .default Ident 51 | append 52 | cap 53 | close 54 | complex 55 | copy 56 | delete 57 | imag 58 | len 59 | make 60 | new 61 | panic 62 | print 63 | println 64 | real 65 | recover 66 | .default Preproc 67 | false 68 | iota 69 | nil 70 | true 71 | -------------------------------------------------------------------------------- /filters/hs.key: -------------------------------------------------------------------------------- 1 | : $Id: hs.key,v 1.2 2008/09/28 15:07:41 tom Exp $ 2 | : Haskell keywords 3 | as 4 | case 5 | class 6 | data 7 | default 8 | deriving 9 | do 10 | else 11 | hiding 12 | if 13 | import 14 | in 15 | infix 16 | infixl 17 | infixr 18 | instance 19 | let 20 | module 21 | newtype 22 | of 23 | qualified 24 | then 25 | type 26 | where 27 | : 28 | .default Number 29 | True 30 | False 31 | : 32 | .default Type 33 | Addr 34 | Array 35 | Bool 36 | Char 37 | Double 38 | Float 39 | IO 40 | Int 41 | Integer 42 | String 43 | Void 44 | .default 45 | : 46 | Complex 47 | Either 48 | ExitCode 49 | IOError 50 | IOResult 51 | Maybe 52 | Ordering 53 | Ratio 54 | : 55 | Nothing:Number 56 | : 57 | ExitSuccess 58 | : 59 | GT 60 | LT 61 | EQ 62 | : 63 | undefined 64 | error 65 | trace 66 | : 67 | : Haskell is an academic ("toy") language. Most large systems fill in some 68 | : of the missing functionality using preprocessors. 69 | : 70 | : C preprocessor keywords (the first token after the '#'). 71 | .default Preproc 72 | .table cpre 73 | define 74 | elif 75 | else 76 | endif 77 | error 78 | if 79 | ifdef 80 | ifndef 81 | include 82 | line 83 | pragma 84 | undef 85 | .default 86 | -------------------------------------------------------------------------------- /filters/imake.key: -------------------------------------------------------------------------------- 1 | : $Id: imake.key,v 1.5 2009/05/17 19:32:53 tom Exp $ 2 | XCOMM:Comment 3 | .merge make 4 | .table premake 5 | define:Preproc 6 | elif:Preproc 7 | else:Preproc 8 | endif:Preproc 9 | error:Preproc 10 | if:Preproc 11 | ifdef:Preproc 12 | ifndef:Preproc 13 | include:Preproc 14 | line:Preproc 15 | pragma:Preproc 16 | undef:Preproc 17 | -------------------------------------------------------------------------------- /filters/ini-filt.l: -------------------------------------------------------------------------------- 1 | %pointer 2 | %x NORMAL VALUE COMMENT QUOTED 3 | 4 | %{ 5 | 6 | /* 7 | * $Id: ini-filt.l,v 1.20 2023/09/12 21:01:11 tom Exp $ 8 | * 9 | * Filter to add vile "attribution" sequences to selected bits of M$ ini-definition 10 | * input text. 11 | */ 12 | 13 | #include 14 | 15 | DefineFilter(ini); 16 | 17 | static char *Action_attr; 18 | static char *Comment_attr; 19 | static char *Ident2_attr; 20 | static char *Number_attr; 21 | static char *String_attr; 22 | 23 | static const char * 24 | my_keyword_attr(char *name) 25 | { 26 | const char *result = get_keyword_attr(name); 27 | if (isEmpty(result)) 28 | result = Ident2_attr; 29 | return result; 30 | } 31 | 32 | %} 33 | 34 | HEX [[:xdigit:]]+ 35 | GUID G"{"{HEX}("-"{HEX})+"}" 36 | 37 | INTEGER ([[:digit:]]+)|(0x[[:xdigit:]]+) 38 | IDENT [[:alpha:]][[:alnum:]_.-]*[%&!#$]? 39 | 40 | STRING \"([^"\r\n]|(""))*\" 41 | 42 | NUMBER {INTEGER}|{GUID} 43 | 44 | %% 45 | 46 | "["[^]]*"]" { WriteToken(Action_attr); } 47 | {IDENT} { WriteToken(my_keyword_attr(yytext)); } 48 | 49 | [=:] { ECHO; BEGIN(VALUE); } 50 | {STRING} { WriteToken(String_attr); } 51 | {NUMBER} { WriteToken(Number_attr); } 52 | [\r\n] { ECHO; BEGIN(NORMAL); } 53 | 54 | "//"[^\r\n]* { WriteToken(Comment_attr); } 55 | [#;][^\r\n]* { WriteToken(Comment_attr); } 56 | 57 | "/*" { BeginQuote(COMMENT, Comment_attr); } 58 | [^*]* { flt_bfr_append(yytext, yyleng); } 59 | "*"+[^*/]* { flt_bfr_append(yytext, yyleng); } 60 | "*"+"/" { FinishQuote(NORMAL); } 61 | 62 | %% 63 | 64 | static void 65 | init_filter(int before GCC_UNUSED) 66 | { 67 | (void) before; 68 | } 69 | 70 | static void 71 | do_filter(FILE *inputs) 72 | { 73 | InitLEX(inputs); 74 | 75 | Action_attr = class_attr(NAME_ACTION); 76 | Comment_attr = class_attr(NAME_COMMENT); 77 | Ident2_attr = class_attr(NAME_IDENT2); 78 | Number_attr = class_attr(NAME_NUMBER); 79 | String_attr = class_attr(NAME_LITERAL); 80 | 81 | BEGIN(NORMAL); 82 | RunLEX(); 83 | } 84 | 85 | #if NO_LEAKS 86 | static void 87 | free_filter(void) 88 | { 89 | USE_LEXFREE; 90 | } 91 | #endif 92 | -------------------------------------------------------------------------------- /filters/ini.key: -------------------------------------------------------------------------------- 1 | : $Id: ini.key,v 1.1 2005/05/10 22:45:09 tom Exp $ 2 | -------------------------------------------------------------------------------- /filters/java.key: -------------------------------------------------------------------------------- 1 | : $Id: java.key,v 1.3 2003/02/17 16:29:38 tom Exp $ 2 | abstract 3 | break 4 | byvalue 5 | case 6 | cast 7 | catch 8 | class 9 | continue 10 | default 11 | do 12 | else 13 | extends 14 | finally 15 | for 16 | future 17 | if 18 | implements 19 | import 20 | inner 21 | instanceof 22 | interface 23 | new 24 | outer 25 | package 26 | rest 27 | return 28 | super 29 | switch 30 | synchronized 31 | this 32 | throw 33 | throws 34 | transient 35 | try 36 | while 37 | : 38 | goto:Action 39 | native:Action 40 | : 41 | false:Ident2 42 | null:Ident2 43 | true:Ident2 44 | : 45 | String:Type 46 | boolean:Type 47 | byte:Type 48 | char:Type 49 | const:Type 50 | double:Type 51 | final:Type 52 | float:Type 53 | generic:Type 54 | int:Type 55 | long:Type 56 | private:Type 57 | protected:Type 58 | public:Type 59 | short:Type 60 | static:Type 61 | var:Type 62 | void:Type 63 | volatile:Type 64 | -------------------------------------------------------------------------------- /filters/js.key: -------------------------------------------------------------------------------- 1 | : $Id: js.key,v 1.5 2009/04/19 16:36:44 tom Exp $ 2 | : JavaScript/ECMAScript keywords 3 | break 4 | case 5 | catch 6 | continue 7 | default 8 | delete 9 | do 10 | else 11 | finally 12 | for 13 | function 14 | if 15 | in 16 | instanceof 17 | new 18 | return 19 | switch 20 | this 21 | throw 22 | try 23 | typeof 24 | var 25 | while 26 | with 27 | : literals 28 | void 29 | false 30 | true 31 | null 32 | : ECMA-262 "future" reserved words 33 | class 34 | debugger 35 | export 36 | extends 37 | goto 38 | implements 39 | import 40 | interface 41 | native 42 | package 43 | super 44 | synchronized 45 | throws 46 | transient 47 | .default Type 48 | abstract 49 | boolean 50 | byte 51 | char 52 | const 53 | double 54 | enum 55 | float 56 | final 57 | int 58 | long 59 | private 60 | protected 61 | public 62 | short 63 | static 64 | volatile 65 | .default 66 | : JScript extensions (also some of ECMAScript's "future" keywords) 67 | decimal 68 | enum 69 | get 70 | implements 71 | internal 72 | sbyte 73 | set 74 | uint 75 | ushort 76 | : 77 | assert 78 | ensure 79 | event 80 | invariant 81 | namespace 82 | require 83 | transient 84 | use 85 | -------------------------------------------------------------------------------- /filters/json.key: -------------------------------------------------------------------------------- 1 | : $Id: json.key,v 1.1 2013/05/24 20:44:16 tom Exp $ 2 | true 3 | false 4 | null 5 | -------------------------------------------------------------------------------- /filters/ksh.key: -------------------------------------------------------------------------------- 1 | : $Id: ksh.key,v 1.2 2012/07/11 19:24:07 tom Exp $ 2 | : ksh keywords 3 | builtin 4 | disown 5 | function 6 | getconf 7 | hist 8 | let 9 | limit 10 | login 11 | newgrp 12 | nohup 13 | print 14 | select 15 | sleep 16 | time 17 | typeset 18 | wait 19 | whence 20 | : predefined aliases 21 | autoload 22 | command 23 | float 24 | functions 25 | history 26 | integer 27 | nameref 28 | r 29 | redirect 30 | source 31 | stop 32 | suspend 33 | .merge sh 34 | -------------------------------------------------------------------------------- /filters/latex.key: -------------------------------------------------------------------------------- 1 | : $Id: latex.key,v 1.2 1999/03/08 11:51:52 tom Exp $ 2 | : 3 | : Relink identifiers as the same as keywords (since there are many keywords) 4 | .class Ident:Keyword 5 | : 6 | : Define new classes 7 | .class Section:Keyword 8 | .class Subsection:Keyword 9 | .class Math:Literal 10 | .class Math_c:Literal 11 | : 12 | \section:Section 13 | \subsection:Subsection 14 | -------------------------------------------------------------------------------- /filters/lex.key: -------------------------------------------------------------------------------- 1 | : $Id: lex.key,v 1.10 2009/05/15 23:56:44 tom Exp $ 2 | : LEX Macros 3 | BEGIN 4 | ECHO 5 | REJECT 6 | : 7 | : from flex's manpage 8 | YYSTATE 9 | YY_AT_BOL 10 | YY_BREAK 11 | YY_BUFFER_STATE:Type 12 | YY_END_OF_BUFFER_CHAR:Number 13 | YY_NUM_RULES:Number 14 | YY_DECL 15 | YY_INPUT 16 | YY_START 17 | YY_USER_ACTION 18 | YY_USER_INIT 19 | : 20 | input 21 | unput 22 | yyless 23 | yymore 24 | yyterminate 25 | yywrap 26 | : 27 | : special variables 28 | YY_CURRENT_BUFFER:Ident2 29 | yyin:Ident2 30 | yyleng:Ident2 31 | yyout:Ident2 32 | yytext:Ident2 33 | : 34 | : Display section-markers such as "%{" and "%%" as an action. 35 | : The filter will default to "Keyword" otherwise. 36 | .class LexSection:Action 37 | : 38 | : The filter colors state-names with "LexStates", which defaults to "Keyword". 39 | .class LexStates 40 | INITIAL:LexStates 41 | : 42 | .merge c 43 | : 44 | : Define a separate table for pattern names. It contains one class, which 45 | : is given the same name "LexPattern". 46 | .table LexPattern 47 | .class LexPattern:Ident2 48 | -------------------------------------------------------------------------------- /filters/lua-filt.l: -------------------------------------------------------------------------------- 1 | %pointer 2 | %x LONG_STR LONG_CMT 3 | 4 | %{ 5 | 6 | /* 7 | * $Id: lua-filt.l,v 1.15 2014/03/30 18:27:27 tom Exp $ 8 | * 9 | * Filter to add vile "attribution" sequences to selected bits of lua 10 | * input text. 11 | */ 12 | 13 | #include 14 | #include 15 | 16 | DefineFilter(lua); 17 | 18 | static char *Comment_attr; 19 | static char *Number_attr; 20 | static char *String_attr; 21 | 22 | static int long_str = 0; /* level for long-bracket */ 23 | 24 | %} 25 | 26 | INTEGER [-+]?([[:digit:]]+) 27 | REAL [-+]?([[:digit:]]*\.[[:digit:]]+)([eE][+-]?[[:digit:]]+)? 28 | IDENT [[:alpha:]_][[:alnum:]_]* 29 | 30 | SSTRING \'(\\.|[^'\\])*\' 31 | DSTRING \"(\\.|[^"\\])*\" 32 | STRINGS ({SSTRING}|{DSTRING}) 33 | 34 | NUMBER {INTEGER}|{REAL} 35 | 36 | LONG_L "["[=]*"[" 37 | LONG_R "]"[=]*"]" 38 | 39 | %% 40 | 41 | {IDENT} { WriteToken(get_keyword_attr(yytext)); } 42 | {STRINGS} { WriteToken(String_attr); } 43 | {NUMBER} { WriteToken(Number_attr); } 44 | 45 | "--"{LONG_L} { WriteToken(Comment_attr); push_state(LONG_CMT); long_str = yyleng - 2; } 46 | {LONG_R} { WriteToken(Comment_attr); if ((int) yyleng == long_str) pop_state(); } 47 | [^[]=]+ { WriteToken(Comment_attr); } 48 | . { WriteToken(Comment_attr); } 49 | 50 | "--"[^\r\n]* { WriteToken(Comment_attr); } 51 | 52 | {LONG_L} { WriteToken(String_attr); push_state(LONG_STR); long_str = yyleng; } 53 | {LONG_R} { WriteToken(String_attr); if ((int) yyleng == long_str) pop_state(); } 54 | [^[]=]+ { WriteToken(String_attr); } 55 | . { WriteToken(String_attr); } 56 | 57 | %% 58 | 59 | #include 60 | 61 | static void 62 | init_filter(int before GCC_UNUSED) 63 | { 64 | (void) before; 65 | } 66 | 67 | static void 68 | do_filter(FILE *inputs) 69 | { 70 | InitLEX(inputs); 71 | 72 | Comment_attr = class_attr(NAME_COMMENT); 73 | Number_attr = class_attr(NAME_NUMBER); 74 | String_attr = class_attr(NAME_LITERAL); 75 | 76 | begin_state(INITIAL); 77 | RunLEX(); 78 | end_state(); 79 | } 80 | 81 | #if NO_LEAKS 82 | static void 83 | free_filter(void) 84 | { 85 | USE_LEXFREE; 86 | } 87 | #endif 88 | -------------------------------------------------------------------------------- /filters/lua.key: -------------------------------------------------------------------------------- 1 | : $Id: lua.key,v 1.2 2006/04/02 15:16:50 tom Exp $ 2 | and 3 | break 4 | do 5 | else 6 | elseif 7 | end 8 | false:Number 9 | for 10 | function 11 | if 12 | in 13 | local 14 | nil:Number 15 | not 16 | or 17 | repeat 18 | return 19 | then 20 | true:Number 21 | until 22 | while 23 | -------------------------------------------------------------------------------- /filters/m4.key: -------------------------------------------------------------------------------- 1 | : $Id: m4.key,v 1.5 2008/08/11 15:19:29 tom Exp $ 2 | : fixme - class stuff isn't highlighting properly (below) 3 | : fixme - add autoconf keywords 4 | 5 | : m4 actually uses '`' and '\'' characters by default for quoting. However, I 6 | : use it mostly as part of autoconf, where the quoting is changed to square 7 | : brackets to make it simpler to use with Bourne shell scripts. Comment these 8 | : out, or customize as needed -- the filter does not do the library file 9 | : searches that are required to do this exactly right. 10 | .class LeftQuote:'[' 11 | .class RightQuote:']' 12 | 13 | : These are the keywords recognized by GNU m4. A few are actually only 14 | : recognized when they are followed by parameters in parentheses, but that's 15 | : too specialized. 16 | __file__:Preproc 17 | __gnu__:Preproc 18 | __line__:Preproc 19 | __os2__:Preproc 20 | __program__:Preproc 21 | __unix__:Preproc 22 | __windows__:Preproc 23 | argn 24 | array 25 | array_set 26 | builtin 27 | capitalize 28 | changecom 29 | changequote 30 | changeword 31 | cleardivert 32 | cond 33 | debugfile 34 | debugmode 35 | decr 36 | define 37 | defn 38 | divert 39 | divnum 40 | downcase 41 | dquote 42 | dquote_elt 43 | dumpdef 44 | dumpdef 45 | errprint 46 | esyscmd 47 | eval 48 | example 49 | exch 50 | fatal_error 51 | foreach 52 | foreachq 53 | forloop 54 | format 55 | ifdef 56 | ifelse 57 | include 58 | incr 59 | index 60 | indir 61 | join 62 | joinall 63 | len 64 | m4wrap 65 | maketemp 66 | mkstemp 67 | nargs 68 | os2:Preproc 69 | patsubst 70 | popdef 71 | pushdef 72 | quote 73 | regexp 74 | reverse 75 | shift 76 | sinclude 77 | substr 78 | syscmd 79 | traceoff 80 | traceon 81 | translit 82 | undefine 83 | undivert 84 | unix:Preproc 85 | upcase 86 | windows:Preproc 87 | -------------------------------------------------------------------------------- /filters/mail.key: -------------------------------------------------------------------------------- 1 | : $Id: mail.key,v 1.3 1999/12/29 15:07:39 pgf Exp $ 2 | : the filter will highlight the data for items listed as keywords 3 | from 4 | subject 5 | to 6 | cc 7 | reply-to 8 | date 9 | -------------------------------------------------------------------------------- /filters/mailcap.key: -------------------------------------------------------------------------------- 1 | : $Id: mailcap.key,v 1.3 2008/07/04 13:40:27 tom Exp $ 2 | : vile:keymode 3 | : 4 | : flags 5 | copiousoutput 6 | needsterminal 7 | : field names 8 | compose 9 | composetyped 10 | description 11 | edit 12 | nametemplate 13 | print 14 | test 15 | textualnewlines 16 | -------------------------------------------------------------------------------- /filters/mailfilt.l: -------------------------------------------------------------------------------- 1 | %pointer 2 | %s HEADER BODY 3 | 4 | %o 7000 5 | 6 | %{ 7 | 8 | /* 9 | * $Id: mailfilt.l,v 1.31 2013/12/02 01:32:53 tom Exp $ 10 | * 11 | * Filter to add vile "attribution" sequences to selected bits of mail 12 | */ 13 | 14 | #include 15 | 16 | DefineFilter(mail); 17 | 18 | static char *Action_attr; 19 | static char *Comment_attr; 20 | static char *Ident2_attr; 21 | static char *String_attr; 22 | 23 | static void write_label(char *text, int size); 24 | 25 | %} 26 | 27 | BLANK [ \t] 28 | 29 | LABEL ^[[:alpha:]]([[:alpha:]-]+): 30 | 31 | NAME [[:alnum:]_+.#-]+ 32 | ADDRESS ({NAME}|\.)+ 33 | EMAIL {NAME}@{ADDRESS} 34 | 35 | BEGIN_HEADER ^"From "{EMAIL} 36 | 37 | URL [[:alpha:]]+"://"[[:alnum:]#%&+\,.\/?;@_=~-]+ 38 | 39 | %% 40 | 41 |
{LABEL} { write_label(yytext, yyleng); } 42 |
^\n { ECHO; BEGIN(BODY); } 43 | 44 | {BEGIN_HEADER} { WriteToken(String_attr); BEGIN(HEADER); } 45 | 46 | {EMAIL} { WriteToken(Ident2_attr); } 47 | {URL} { WriteToken(Ident2_attr); } 48 | 49 | %% 50 | 51 | static void 52 | write_label(char *text, int size) 53 | { 54 | const char *lname = lowercase_of(text); 55 | char temp[1024]; 56 | char *buffer; 57 | 58 | if (size >= (int) sizeof(temp)) { 59 | buffer = strdup(lname); 60 | } else { 61 | buffer = temp; 62 | memcpy(temp, lname, (size_t) size); 63 | } 64 | buffer[--size] = '\0'; 65 | flt_puts(text, size, get_keyword_attr(buffer)); 66 | flt_putc(':'); 67 | 68 | if (buffer != temp) 69 | free(buffer); 70 | } 71 | 72 | static void 73 | init_filter(int before GCC_UNUSED) 74 | { 75 | (void) before; 76 | } 77 | 78 | static void 79 | do_filter(FILE *inputs) 80 | { 81 | InitLEX(inputs); 82 | 83 | Action_attr = class_attr(NAME_ACTION); 84 | Comment_attr = class_attr(NAME_COMMENT); 85 | Ident2_attr = class_attr(NAME_IDENT2); 86 | String_attr = class_attr(NAME_LITERAL); 87 | 88 | BEGIN(HEADER); 89 | RunLEX(); 90 | } 91 | 92 | #if NO_LEAKS 93 | static void 94 | free_filter(void) 95 | { 96 | USE_LEXFREE; 97 | } 98 | #endif 99 | -------------------------------------------------------------------------------- /filters/make.key: -------------------------------------------------------------------------------- 1 | : $Id: make.key,v 1.8 2002/07/05 00:46:04 tom Exp $ 2 | .meta # 3 | .DEFAULT 4 | .IGNORE 5 | .PRECIOUS 6 | .SILENT 7 | .SUFFIXES 8 | #default Preproc 9 | .include 10 | include 11 | : GNU make also defines these: 12 | #table premake 13 | #default Preproc 14 | define 15 | endef 16 | ifdef 17 | ifndef 18 | ifeq 19 | ifneq 20 | else 21 | endif 22 | -include 23 | sinclude 24 | override 25 | export 26 | unexport 27 | vpath 28 | : M$ nmake also defines these (as well as "!else if" and "!else ifdef", which 29 | : we cannot match in a lex-based filter): 30 | !cmdswitches 31 | !else 32 | !elseif 33 | !elseifdef 34 | !elseifndef 35 | !endif 36 | !error 37 | !if 38 | !ifdef 39 | !ifndef 40 | !include 41 | !message 42 | !undef 43 | : reset, in case we're included 44 | #default 45 | #meta . 46 | -------------------------------------------------------------------------------- /filters/makefile.djg: -------------------------------------------------------------------------------- 1 | # makefile header for vile utilities using DJGPP. 2 | # From the top-makefile.djg, do 3 | # make -f makefile.djg flt=y 4 | # 5 | # $Id: makefile.djg,v 1.6 2020/09/08 19:53:06 tom Exp $ 6 | 7 | CC = gcc 8 | LINK = gcc 9 | LEX = flex 10 | x = .exe 11 | o = .o 12 | 13 | AR = ar 14 | ARFLAGS = crv 15 | RANLIB = ranlib 16 | 17 | DEBUG = -g 18 | #OPTIM = 19 | 20 | #DEBUG = 21 | OPTIM = -O2 22 | 23 | CFLAGS= -Wall $(DEBUG) $(OPTIM) -I. -I.. 24 | 25 | LIB_PREFIX= 26 | LIBBUILTFLT=${LIB_PREFIX}vlflt.a 27 | -------------------------------------------------------------------------------- /filters/makefile.emx: -------------------------------------------------------------------------------- 1 | # 2 | # 'vile' filter utilities makefile for EMX using GNU make (OS/2) 3 | # $Id: makefile.emx,v 1.5 2001/12/26 20:49:13 tom Exp $ 4 | # 5 | 6 | # 7 | # Compiler flags: 8 | # 9 | CC = gcc 10 | 11 | # Debug options: 12 | DEBUG_FLAGS = -Wall 13 | 14 | # Production options: 15 | PROD_FLAGS = -O 16 | 17 | # 18 | CFLAGS = $(DEBUG_FLAGS) -I. -I.. -DHAVE_CONFIG_H 19 | 20 | # File extension for object files: 21 | O = .o 22 | 23 | # File extension for executable files: 24 | E = .exe 25 | 26 | TARGET = c-filt$E 27 | 28 | all: $(TARGET) 29 | 30 | clean: 31 | -del *$O 32 | -del *.bak 33 | 34 | clobber: clean 35 | -del *$E 36 | 37 | FILT_DEPS = c-filt$O filterio$O filters$O 38 | 39 | vile-c-filt$E : $(FILT_DEPS) 40 | $(CC) $(CFLAGS) -o $@ $(FILT_DEPS) 41 | -------------------------------------------------------------------------------- /filters/makefile.icc: -------------------------------------------------------------------------------- 1 | # 2 | # 'vile' filters makefile for IBM C Set ++ 2.x (OS/2) 3 | # $Id: makefile.icc,v 1.4 2000/02/28 10:45:21 tom Exp $ 4 | # 5 | 6 | # 7 | # Compiler flags: 8 | # 9 | CC = icc 10 | 11 | # Debug options: 12 | #DEBUG_FLAGS = /Ti+ /Wpor /Wext /Wuse /Wini /Wuni /Wgot 13 | #DEBUG_FLAGS = /Ti+ /Wpor /Wext /Wuse /Wini /Wgot 14 | 15 | # Production options: 16 | PROD_FLAGS = /O+ 17 | 18 | # 19 | CFLAGS = /Q /Wpro $(DEBUG_FLAGS) /I. 20 | 21 | # File extension for object files: 22 | O = .obj 23 | 24 | # File extension for executable files: 25 | E = .exe 26 | 27 | TARGET = c-filt$E 28 | 29 | all: $(TARGET) 30 | 31 | clean: 32 | -del *$O 33 | -del *.bak 34 | 35 | clobber: clean 36 | -del *$E 37 | 38 | FILT_DEPS = c-filt$O filterio$O filters$O 39 | 40 | vile-c-filt$E : $(FILT_DEPS) 41 | $(CC) $(CFLAGS) $(FILT_DEPS) /Fe$@ 42 | 43 | c-filt$O: c-filt.c 44 | -------------------------------------------------------------------------------- /filters/makefile.in: -------------------------------------------------------------------------------- 1 | # $Id: makefile.in,v 1.93 2024/01/21 19:05:14 tom Exp $ 2 | # 3 | 4 | #### Start of system configuration section. #### 5 | 6 | SHELL = @SHELL@ 7 | VPATH = @srcdir@ 8 | 9 | top_srcdir = @top_srcdir@ 10 | srcdir = @srcdir@ 11 | 12 | CC = @CC@ 13 | CPP = @CPP@ 14 | LINK = @LINK_PREFIX@ $(CC) $(CFLAGS) 15 | INSTALL = @INSTALL@ @INSTALL_OPT_O@ 16 | INSTALL_OPT_S = @INSTALL_OPT_S@ 17 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(INSTALL_OPT_S) 18 | INSTALL_DATA = @INSTALL_DATA@ 19 | 20 | EXTRA_CFLAGS = @EXTRA_CFLAGS@ 21 | CFLAGS = @CFLAGS@ $(EXTRA_CFLAGS) 22 | LDFLAGS = @LDFLAGS@ @EXTRA_LDFLAGS@ 23 | LIBS = @LIBS@ 24 | 25 | LINT = @LINT@ 26 | CTAGS = @CTAGS@ 27 | ETAGS = @ETAGS@ 28 | 29 | AR = @AR@ 30 | ARFLAGS = @ARFLAGS@ 31 | RANLIB = @RANLIB@ 32 | LEX = @LEX@ 33 | LEXLIB = @LEXLIB@ 34 | LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ 35 | 36 | SH_CFLAGS = @SH_CFLAGS@ 37 | SH_LDFLAGS = @SH_LDFLAGS@ 38 | 39 | x = @EXEEXT@ 40 | o = .@OBJEXT@ 41 | so = .so 42 | 43 | SCREEN = @SCREEN@ 44 | TARGET = @TARGET@$x 45 | 46 | prefix = @prefix@ 47 | exec_prefix = @exec_prefix@ 48 | datarootdir = @datarootdir@ 49 | 50 | bindir = @bindir@ 51 | libdir = @libdir@ 52 | 53 | filters_bindir = @filters_bindir@ 54 | datadir = @datadir@/vile 55 | 56 | #### End of system configuration section. #### 57 | 58 | RM = rm -f 59 | 60 | QUOTDEFS = -DVILE_STARTUP_PATH=\"@VILE_STARTUP_PATH@\" 61 | CPPFLAGS = -I. -I.. -I$(top_srcdir)/filters -I$(top_srcdir) -DHAVE_CONFIG_H @CPPFLAGS@ 62 | 63 | BINDIR = $(DESTDIR)$(bindir) 64 | LIBDIR = $(DESTDIR)$(libdir) 65 | DATADIR = $(DESTDIR)$(datadir) 66 | 67 | FILTERS_BINDIR = $(DESTDIR)$(filters_bindir) 68 | 69 | INSTALL_DIRS = $(FILTERS_BINDIR) $(DATADIR) 70 | 71 | LF_DEPS = filterio$o filters$o 72 | LF_ARGS = $(LF_DEPS) $(LEXLIB) 73 | 74 | CF_DEPS = filterio$o filters$o 75 | CF_ARGS = $(CF_DEPS) 76 | 77 | @MAKE_PHONY@.PHONY: all sources install uninstall clean distclean lint tags 78 | 79 | -------------------------------------------------------------------------------- /filters/makelist.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $Id: makelist.sh,v 1.6 2004/04/11 23:27:58 tom Exp $ 3 | # 4 | # Make a list of the names for the specified syntax filters, for the configure 5 | # script, etc. 6 | # 7 | # $1 is the path of genmake.mak 8 | # 9 | # $2 is the language key, i.e., "c", "l", or "lc" 10 | # 11 | # $3 is the nominal list, which may be "all", "none" or an explicit 12 | # comma-separated list of the names from the first column of genmak.mak 13 | 14 | all=`grep "^[^ #][^ ]* [ ]*[^ ]* [ ]*[$2]$" $1 2>/dev/null | sed -e 's/ .*//' |sort -u` 15 | list="$3" 16 | 17 | save_IFS="$IFS" 18 | IFS=",$IFS" 19 | 20 | key=none 21 | for j in $list 22 | do 23 | case $j in 24 | all) 25 | key=$j 26 | ;; 27 | none) 28 | key= 29 | ;; 30 | *) 31 | if test "$key" = none ; then 32 | key=$j 33 | elif test "$key" != all ; then 34 | key=some 35 | fi 36 | ;; 37 | esac 38 | done 39 | 40 | if test "$key" = all ; then 41 | key="$all" 42 | elif test "$key" = none ; then 43 | key= 44 | else 45 | key= 46 | for j in $list 47 | do 48 | if test "$j" != all ; then 49 | if test "$j" = none ; then 50 | key= 51 | else 52 | found=no 53 | for k in $all 54 | do 55 | if test "$k" = "$j" ; then 56 | found=yes 57 | break 58 | fi 59 | done 60 | if test "$found" = no ; then 61 | continue 62 | elif test -n "$key" ; then 63 | key="$key 64 | $j" 65 | else 66 | key="$j" 67 | fi 68 | fi 69 | fi 70 | done 71 | fi 72 | 73 | IFS="$save_IFS" 74 | 75 | # The result has no repeats, does not use the keywords "all" or "none", making 76 | # it possible to compare two lists. 77 | echo "$key" |sort -u | sed -e '/^$/d' 78 | -------------------------------------------------------------------------------- /filters/mcrl.key: -------------------------------------------------------------------------------- 1 | : mCRL(2) keyword file - by Paul van Tilburg 2 | : $Id: mcrl.key,v 1.1 2006/08/08 21:48:00 Paul.van.Tilburg Exp $ 3 | 4 | : Specification elements 5 | .default Keyword 6 | act 7 | cons 8 | eqn 9 | init 10 | map 11 | proc 12 | sort 13 | var 14 | : Expression elements 15 | div 16 | end 17 | mod 18 | whr 19 | 20 | : Operators 21 | .default Ident2 22 | allow 23 | block 24 | comm 25 | exists 26 | forall 27 | hide 28 | lambda 29 | rename 30 | sum 31 | 32 | : Actions 33 | .default Ident 34 | delta 35 | tau 36 | 37 | : Standard sorts 38 | .default Type 39 | struct 40 | Bag 41 | Bool 42 | Int 43 | List 44 | Nat 45 | Pos 46 | Set 47 | Time 48 | -------------------------------------------------------------------------------- /filters/mcrlfilt.l: -------------------------------------------------------------------------------- 1 | %pointer 2 | %s NORMAL 3 | 4 | %o 6000 5 | 6 | %{ 7 | 8 | /* 9 | * $Id: mcrlfilt.l,v 1.9 2025/01/26 11:08:22 tom Exp $ 10 | * 11 | * Filter to add vile "attribution" sequences to a mCRL(2) specification 12 | * or model, based on the text filter. 13 | * 14 | * By Paul van Tilburg and Bas Kloet . 15 | */ 16 | 17 | #include 18 | 19 | DefineFilter(mcrl); 20 | 21 | static char *Comment_attr; 22 | static char *Keyword_attr; 23 | static char *Number_attr; 24 | 25 | %} 26 | 27 | COMMENT %.*\n 28 | 29 | KEYWORD [[:alpha:]_][[:alnum:]_]* 30 | 31 | SIGN [-+] 32 | DECIMAL [[:digit:]_]+ 33 | REAL [-+]?([[:digit:]_]*\.[[:digit:]][[:digit:]_]*)([eE][+-]?[[:digit:]_]+)? 34 | NUMBER {SIGN}?({DECIMAL}|{REAL}) 35 | 36 | %% 37 | 38 | {KEYWORD} { WriteToken(get_keyword_attr(yytext)); } 39 | 40 | {COMMENT} { WriteToken(Comment_attr); } 41 | 42 | {NUMBER} { WriteToken(Number_attr); } 43 | 44 | %% 45 | 46 | static void 47 | init_filter(int before GCC_UNUSED) 48 | { 49 | (void) before; 50 | } 51 | 52 | static void 53 | do_filter(FILE *inputs) 54 | { 55 | InitLEX(inputs); 56 | 57 | Comment_attr = class_attr(NAME_COMMENT); 58 | Keyword_attr = class_attr(NAME_KEYWORD); 59 | Number_attr = class_attr(NAME_NUMBER); 60 | 61 | BEGIN(NORMAL); 62 | RunLEX(); 63 | flt_bfr_finish(); 64 | } 65 | 66 | #if NO_LEAKS 67 | static void 68 | free_filter(void) 69 | { 70 | USE_LEXFREE; 71 | } 72 | #endif 73 | -------------------------------------------------------------------------------- /filters/md.key: -------------------------------------------------------------------------------- 1 | : $Id: md.key,v 1.1 2022/01/25 00:56:54 tom Exp $ 2 | -------------------------------------------------------------------------------- /filters/midlfilt.l: -------------------------------------------------------------------------------- 1 | %pointer 2 | %x COMMENT CODE UUID 3 | 4 | %{ 5 | 6 | /* 7 | * $Id: midlfilt.l,v 1.11 2013/12/02 01:32:53 tom Exp $ 8 | * 9 | * Filter to add vile "attribution" sequences to MIDL / ODL files. 10 | * - T.Dickey 11 | */ 12 | 13 | #include 14 | 15 | DefineFilter(midl); 16 | 17 | static char *Comment_attr; 18 | static char *Error_attr; 19 | static char *Ident2_attr; 20 | static char *Number_attr; 21 | static char *String_attr; 22 | 23 | %} 24 | 25 | STRINGS \"(\\.|[^"\\]|\\\n)*\" 26 | 27 | IDENT [[:alpha:]][[:alnum:]_]* 28 | 29 | SIGN [-+] 30 | DECIMAL [[:digit:]_]+ 31 | REAL [-+]?([[:digit:]_]*\.[[:digit:]][[:digit:]_]*)([eE][+-]?[[:digit:]_]+)? 32 | NUMBER {SIGN}?({DECIMAL}|{REAL}) 33 | 34 | %% 35 | 36 | {IDENT} { WriteToken(get_keyword_attr(yytext)); } 37 | ";" { ECHO; } 38 | 39 | "/*" { WriteToken(Comment_attr); BEGIN(COMMENT); } 40 | [^*]* { WriteToken(Comment_attr); } 41 | "*"+[^*/]* { WriteToken(Comment_attr); } 42 | "*"+"/" { WriteToken(Comment_attr); BEGIN(CODE); } 43 | 44 | "//"[^\r\n]* { WriteToken(Comment_attr); } 45 | 46 | {STRINGS} { WriteToken(String_attr); } 47 | 48 | {NUMBER} { WriteToken(Number_attr); } 49 | 50 | "uuid(" { WriteToken(Ident2_attr); BEGIN(UUID); } 51 | [[:xdigit:]-]+ { WriteToken(Number_attr); } 52 | ")" { WriteToken(Ident2_attr); BEGIN(CODE); } 53 | [^)[:xdigit:][:space:]-]* { WriteToken(Error_attr); } 54 | 55 | %% 56 | 57 | static void 58 | init_filter(int before GCC_UNUSED) 59 | { 60 | (void) before; 61 | } 62 | 63 | static void 64 | do_filter(FILE *inputs) 65 | { 66 | InitLEX(inputs); 67 | 68 | Comment_attr = class_attr(NAME_COMMENT); 69 | Error_attr = class_attr(NAME_ERROR); 70 | Ident2_attr = class_attr(NAME_IDENT2); 71 | Number_attr = class_attr(NAME_NUMBER); 72 | String_attr = class_attr(NAME_LITERAL); 73 | 74 | BEGIN(CODE); 75 | RunLEX(); 76 | } 77 | 78 | #if NO_LEAKS 79 | static void 80 | free_filter(void) 81 | { 82 | USE_LEXFREE; 83 | } 84 | #endif 85 | -------------------------------------------------------------------------------- /filters/mk-0th.awk: -------------------------------------------------------------------------------- 1 | # $Id: mk-0th.awk,v 1.12 2025/01/26 14:41:58 tom Exp $ 2 | # Construct the header file "builtflt.h". 3 | BEGIN { 4 | print "/* Generated by filters/mk-0th.awk */" 5 | nAll = 0; 6 | nInt = 0; 7 | nExt = 0; 8 | first = 1; 9 | } 10 | !/^#/ { 11 | # command-line parameters aren't available until we're matching 12 | if (first == 1) { 13 | # printf "splitting lists\n"; 14 | numInt = split(static,listInt,/[, ]/) 15 | numExt = split(dynamic,listExt,/[, ]/) 16 | first = 0; 17 | } 18 | if ( NF >= 2 ) { 19 | for (i = 1; i <= numInt; i++) { 20 | if ( $1 == listInt[i] || listInt[i] == "all" ) { 21 | # printf "nameInt[%d] = %s\n", nInt, $1 22 | nameInt[nInt++] = $1; 23 | nameAll[nAll++] = $1; 24 | break; 25 | } 26 | } 27 | for (i = 1; i <= numExt; i++) { 28 | if ( $1 == listExt[i] || listExt[i] == "all" ) { 29 | # printf "nameExt[%d] = %s\n", nExt, $1 30 | nameAll[nAll++] = $1; 31 | nameExt[nExt++] = $1; 32 | break; 33 | } 34 | } 35 | } 36 | } 37 | END { 38 | if (nInt != 0 || nExt != 0) { 39 | print "#ifndef _builtflt_h" 40 | print "#define _builtflt_h 1" 41 | print "" 42 | print "#include " 43 | print "" 44 | if (nExt != 0) { 45 | printf "/* loadable filters: %d */\n", nExt 46 | for (i = 0; i < nExt; i++) { 47 | printf "LoadableFilter(%s);\n", nameExt[i] 48 | } 49 | } 50 | printf "/* built-in filters: %d */\n", nInt 51 | for (i = 0; i < nInt; i++) { 52 | printf "extern FILTER_DEF define_%s;\n", nameInt[i] 53 | } 54 | print "" 55 | printf "/* built-in or loadable filters: %d */\n", nAll 56 | print "static FILTER_DEF *builtflt[] = {" 57 | for (i = 0; i < nAll; i++) { 58 | printf "\t&define_%s,\n", nameAll[i] 59 | } 60 | print "\tNULL" 61 | print "};" 62 | print "#endif /* _builtflt_h */" 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /filters/mk-0th.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem $Id: mk-0th.bat,v 1.7 2000/08/20 21:42:06 tom Exp $ 3 | rem like mk-0th.awk, used to generate builtflt.h from genmake.mak 4 | genmake.exe -o%2 -n "#ifndef _builtflt_h" 5 | genmake.exe -o%2 -n "#define _builtflt_h 1" 6 | genmake.exe -o%2 -n "" 7 | genmake.exe -o%2 -n "#include \"filters.h\"" 8 | genmake.exe -o%2 -n "" 9 | genmake.exe -o%2 "extern FILTER_DEF define_%%i;" <%1 10 | genmake.exe -o%2 -n "" 11 | genmake.exe -o%2 -n "/* fill the array with 0's so we can get the proper size */" 12 | genmake.exe -o%2 -n "static FILTER_DEF *builtflt[] = {" 13 | genmake.exe -o%2 " 0," <%1 14 | genmake.exe -o%2 -n " 0" 15 | genmake.exe -o%2 -n "};" 16 | genmake.exe -o%2 -n "#undef INIT_c" 17 | genmake.exe -o%2 -n "#undef INIT_k" 18 | genmake.exe -o%2 -n "#define INIT_c(name) builtflt[j++] = ADDR(name)" 19 | genmake.exe -o%2 -n "#ifdef OPT_LEX_FILTER" 20 | genmake.exe -o%2 -n "#define INIT_l(name) builtflt[j++] = ADDR(name)" 21 | genmake.exe -o%2 -n "#else" 22 | genmake.exe -o%2 -n "#define INIT_l(name) /*nothing*/" 23 | genmake.exe -o%2 -n "#endif" 24 | genmake.exe -o%2 -n "/* Visual C++ will not initialize the array except via assignment */" 25 | genmake.exe -o%2 -n "void flt_array(void) { int j = 0;" 26 | genmake.exe -o%2 " INIT_%%k(define_%%i);" <%1 27 | genmake.exe -o%2 -n "}" 28 | genmake.exe -o%2 -n "" 29 | genmake.exe -o%2 -n "#endif /* _builtflt_h */" 30 | -------------------------------------------------------------------------------- /filters/mk-1st.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem $Id: mk-1st.bat,v 1.7 2000/08/20 19:00:48 tom Exp $ 3 | rem like mk-1st.awk, used to generate lists from genmake.mak 4 | 5 | genmake.exe -o%3 -n "# generated by %0.bat 6 | 7 | goto %2 8 | 9 | :extern 10 | genmake.exe -o%3 -n "ALL_C = %%b" 11 | genmake.exe -o%3 -c " vile-%%i-filt$x %%b" <%1 12 | genmake.exe -o%3 -n "" 13 | if "%LEX%" == "" goto done 14 | genmake.exe -o%3 -n "ALL_LEX = %%b" 15 | genmake.exe -o%3 -l " vile-%%i-filt$x %%b" <%1 16 | genmake.exe -o%3 -n "" 17 | goto done 18 | 19 | :intern 20 | genmake.exe -o%3 -n "OBJ_C = %%b" 21 | genmake.exe -o%3 -c " %%j$o %%b" <%1 22 | genmake.exe -o%3 -n "" 23 | genmake.exe -o%3 -n "OBJ_LEX = %%b" 24 | genmake.exe -o%3 -l " %%j$o %%b" <%1 25 | genmake.exe -o%3 -n "" 26 | goto done 27 | 28 | :done 29 | 30 | genmake.exe -o%3 -n "KEYS = %%b" 31 | FOR %%i in (*.key) do genmake.exe -o%3 -n " %%i %%b" 32 | genmake.exe -o%3 -n "" 33 | -------------------------------------------------------------------------------- /filters/mk-2nd.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem $Id: mk-2nd.bat,v 1.10 2014/02/01 00:35:46 tom Exp $ 3 | rem like mk-2nd.awk, used to generate rules from genmake.mak 4 | 5 | goto %2 6 | 7 | :cmpc 8 | genmake.exe -o%3 -n "%5$o :" 9 | genmake.exe -o%3 -n " $(cc) -Dfilter_def=define_%4 $(CFLAGS) -c %5.c -Fo$@" 10 | genmake.exe -o%3 -n "" 11 | goto done 12 | 13 | :cmpl 14 | rem The odd "LEX.%4_.c" happens to be what flex generates. 15 | genmake.exe -o%3 -n "%5$o :" 16 | genmake.exe -o%3 -n " $(LEX) -P%4_ %5.l" 17 | genmake.exe -o%3 -n " $(CC) -Dfilter_def=define_%4 $(CFLAGS) -c LEX.%4_.c -Fo$@" 18 | genmake.exe -o%3 -n " - erase LEX.%4_.c" 19 | genmake.exe -o%3 -n "" 20 | goto done 21 | 22 | :link_c 23 | genmake.exe -o%3 -n "vile-%4-filt$x : %5$o $(CF_DEPS) $(RC_DEPS)" 24 | genmake.exe -o%3 -n " $(link) -out:$@ %5$o $(CF_ARGS) $(RC_ARGS) $(CON_LDFLAGS)" 25 | genmake.exe -o%3 -n "" 26 | goto done 27 | 28 | :link_l 29 | genmake.exe -o%3 -n "vile-%4-filt$x : %5$o $(LF_DEPS) $(RC_DEPS)" 30 | genmake.exe -o%3 -n " $(link) -out:$@ %5$o $(LF_ARGS) $(RC_ARGS) $(CON_LDFLAGS)" 31 | genmake.exe -o%3 -n "" 32 | goto done 33 | 34 | :extern 35 | if exist %3 del %3 36 | genmake.exe -o%3 -n "# generated by %0" 37 | genmake.exe -o%3 -x%0 ". link_%%k %3 %%i %%j %%k" <%1 38 | goto done 39 | 40 | :intern 41 | if exist %3 del %3 42 | genmake.exe -o%3 -n "# generated by %0" 43 | rem library rule is in makefile.wnt, since we cannot echo redirection 44 | rem chars needed for "inline" (aka here-document). 45 | genmake.exe -o%3 -x%0 ". cmp%%k %3 %%i %%j %%k" <%1 46 | goto done 47 | 48 | :done 49 | -------------------------------------------------------------------------------- /filters/mk-key.awk: -------------------------------------------------------------------------------- 1 | # $Id: mk-key.awk,v 1.3 2020/05/16 08:39:19 tom Exp $ 2 | # 3 | # Generate makefile rules for vile's keywords files, i.e., to install/uninstall. 4 | # Basically we want to install all of the .key files as .keywords, but cannot 5 | # use awk to derive the list from the genmake.mak file because there is not a 6 | # one-one correspondence between filter programs and keyword files. Awk has 7 | # no feature for testing if the files actually exist - so we simply install 8 | # what we have. 9 | 10 | BEGIN { 11 | first = 1; 12 | count = 0; 13 | total = 0; 14 | } 15 | !/^#/ { 16 | if (first) { 17 | strip = from "/filters/"; 18 | first = 0; 19 | print "" 20 | print "# Rules generated by filters/mk-key.awk" 21 | } 22 | name = substr($1, length(strip) + 1, length($1) - length(strip)); 23 | src[count] = sprintf("$(srcdir)/%s", name); 24 | dst[count] = sprintf("$(DATADIR)/%swords", name); 25 | count++; 26 | } 27 | END { 28 | printf "INSTALL_TEXT ="; 29 | for (i = 0; i < count; i++) { 30 | printf " \\\n\t%s", dst[i]; 31 | } 32 | print "" 33 | print "" 34 | print "install install-keywords :: $(INSTALL_TEXT)" 35 | print "" 36 | print "uninstall uninstall-keywords ::" 37 | printf "\t-$(RM) $(INSTALL_TEXT)\n" 38 | print "" 39 | 40 | for (i = 0; i < count; i++) { 41 | printf "%s :\t", dst[i]; 42 | if ( length(dst[i]) < 22 ) 43 | printf "\t"; 44 | printf "%s ; ", src[i]; 45 | if ( length(src[i]) < 22 ) 46 | printf "\t"; 47 | printf "$(INSTALL_DATA) $? $@\n" 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /filters/nmake.key: -------------------------------------------------------------------------------- 1 | : $Id: nmake.key,v 1.3 2020/05/10 17:00:23 tom Exp $ 2 | .meta # 3 | .IGNORE 4 | .PRECIOUS 5 | .SILENT 6 | .SUFFIXES 7 | #table premake 8 | #default Preproc 9 | cmdswitches 10 | else 11 | elseif 12 | elseifdef 13 | elseifndef 14 | endif 15 | error 16 | if 17 | ifdef 18 | ifndef 19 | include 20 | message 21 | undef 22 | : operators should use parentheses 23 | defined 24 | exist 25 | : reset, in case we're included 26 | #default 27 | #meta . 28 | -------------------------------------------------------------------------------- /filters/noclass.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $Id: noclass.sh,v 1.7 2009/04/04 13:24:27 tom Exp $ 3 | # support older versions of flex/lex which do not support character classes 4 | # by expanding them into POSIX equivalents. 5 | # 6 | # Note: [:cntrl:] is omitted since it is hard to do portably, and is rarely 7 | # used in lexical scanners. 8 | # 9 | # $1 is the lex/flex program to run 10 | # $2+ are the parameters 11 | LEX=$1 12 | OPT= 13 | SRC= 14 | shift 15 | while test $# != 0 16 | do 17 | case $1 in 18 | *.l) 19 | SRC="$SRC $1" 20 | ;; 21 | *) 22 | OPT="$OPT $1" 23 | ;; 24 | esac 25 | shift 26 | done 27 | tmp=noclass$$.l 28 | if test -n "$SRC" ; then 29 | blank=' \\t' 30 | lower='abcdefghijklmnopqrstuvwxyz' 31 | upper='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 32 | digit='0123456789' 33 | punct='~!@#\$%\^\\\&*()_+\`{}|:\"<>?\\\[\\\]\\;'\'',.\/\-' 34 | sed \ 35 | -e '/^%pointer/d' \ 36 | -e 's/\[:alpha:\]/'${lower}${upper}'/g' \ 37 | -e 's/\[:upper:\]/'${upper}'/g' \ 38 | -e 's/\[:lower:\]/'${lower}'/g' \ 39 | -e 's/\[:alnum:\]/'${lower}${upper}${digit}'/g' \ 40 | -e 's/\[:xdigit:\]/abcdefABCDEF'${digit}'/g' \ 41 | -e 's/\[:blank:\]/'"${blank}"'/g' \ 42 | -e 's/\[:space:\]/'"${blank}"'\\r\\n\\f/g' \ 43 | -e 's/\[:digit:\]/'${digit}'/g' \ 44 | -e 's/\[:punct:\]/'"${punct}"'/g' \ 45 | -e 's/\[:graph:\]/'"${lower}${upper}${digit}${punct}"'/g' \ 46 | -e 's/\[:print:\]/'"${lower}${upper}${digit}${blank}${punct}"'/g' \ 47 | $SRC >$tmp 48 | $LEX $OPT $tmp 49 | code=$? 50 | rm -f $tmp 51 | #diff -c $SRC $tmp >&2 52 | #echo $tmp >&2 53 | exit $code 54 | else 55 | echo '? no source found' >&2 56 | exit 1 57 | fi 58 | -------------------------------------------------------------------------------- /filters/nr.key: -------------------------------------------------------------------------------- 1 | : $Id: nr.key,v 1.1 1998/12/26 01:26:20 tom Exp $ 2 | -------------------------------------------------------------------------------- /filters/objc.key: -------------------------------------------------------------------------------- 1 | : $Id: objc.key,v 1.4 2009/09/03 00:25:42 tom Exp $ 2 | : see http://objc.toodarkpark.net/summary.html 3 | : see http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/ObjC.pdf 4 | 5 | : statements 6 | self 7 | super 8 | _cmd 9 | : types 10 | id 11 | Class 12 | SEL 13 | IMP 14 | BOOL 15 | : type-modifiers 16 | in 17 | out 18 | inout 19 | oneway 20 | : constants defined in objc.h 21 | nil 22 | Nil 23 | NO 24 | YES 25 | : 26 | .default Action 27 | @ 28 | @catch 29 | @class 30 | @defs 31 | @encode 32 | @end 33 | @finally 34 | @implementation 35 | @interface 36 | @private 37 | @protected 38 | @protocol 39 | @public 40 | @selector 41 | @synchronized 42 | @throw 43 | @try 44 | : 45 | .table cpre 46 | .default Preproc 47 | import 48 | .default 49 | : 50 | .table 51 | .merge c 52 | -------------------------------------------------------------------------------- /filters/pas-filt.l: -------------------------------------------------------------------------------- 1 | %pointer 2 | %x NORMAL CMT_STANDARD CMT_TURBOC 3 | 4 | %{ 5 | 6 | /* 7 | * $Id: pas-filt.l,v 1.13 2018/10/27 11:15:37 tom Exp $ 8 | * 9 | * Filter to add vile "attribution" sequences to selected bits of Pascal 10 | * input text. A few TurboC and Delphi extensions are recognized: 11 | * #{UNSIGNED} 12 | * //COMMENT 13 | * {COMMENT} 14 | */ 15 | 16 | #define UNUSED_POP_STATE 17 | #include 18 | #include 19 | 20 | DefineFilter(pas); 21 | 22 | static char *Comment_attr; 23 | static char *Number_attr; 24 | static char *String_attr; 25 | 26 | %} 27 | 28 | HEXADECIMAL \$[[:xdigit:]_]+ 29 | UNSIGNED [[:digit:]]+ 30 | INTEGER [-+]?{UNSIGNED} 31 | REAL [-+]?(({UNSIGNED}?\.{UNSIGNED})|({UNSIGNED}(\.{UNSIGNED}?)?))([eE]{INTEGER})? 32 | IDENT [[:alpha:]_][[:alnum:]_]* 33 | 34 | CHARACTER "#"{UNSIGNED} 35 | STRING \'([^'\r\n]|(''))*\' 36 | 37 | NUMBER {HEXADECIMAL}|{INTEGER}|{REAL} 38 | 39 | %% 40 | 41 | {IDENT} { WriteToken(get_keyword_attr(yytext)); } 42 | {STRING} { WriteToken(String_attr); } 43 | {CHARACTER} | 44 | {NUMBER} { WriteToken(Number_attr); } 45 | 46 | "{" { BeginQuote(CMT_TURBOC, Comment_attr); } 47 | "}" { FinishQuote(NORMAL); } 48 | \n | 49 | . { flt_bfr_append(yytext, yyleng); } 50 | 51 | "(*" { BeginQuote(CMT_STANDARD, Comment_attr); } 52 | "*)" { FinishQuote(NORMAL); } 53 | \n | 54 | . { flt_bfr_append(yytext, yyleng); } 55 | 56 | "//"[^\r\n]* { WriteToken(Comment_attr); /* Delphi */ } 57 | 58 | . { ECHO; } 59 | 60 | %% 61 | 62 | #include 63 | 64 | static void 65 | init_filter(int before GCC_UNUSED) 66 | { 67 | (void) before; 68 | } 69 | 70 | static void 71 | do_filter(FILE *inputs) 72 | { 73 | InitLEX(inputs); 74 | 75 | Comment_attr = class_attr(NAME_COMMENT); 76 | Number_attr = class_attr(NAME_NUMBER); 77 | String_attr = class_attr(NAME_LITERAL); 78 | 79 | begin_state(NORMAL); 80 | RunLEX(); 81 | flt_bfr_error(); 82 | end_state(); 83 | } 84 | 85 | #if NO_LEAKS 86 | static void 87 | free_filter(void) 88 | { 89 | USE_LEXFREE; 90 | } 91 | #endif 92 | -------------------------------------------------------------------------------- /filters/pas.key: -------------------------------------------------------------------------------- 1 | : $Id: pas.key,v 1.5 2011/06/12 14:31:07 tom Exp $ 2 | : reserved identifiers 3 | :.default Ident 4 | goto:C2 5 | and 6 | begin 7 | case 8 | constructor 9 | do 10 | downto 11 | else 12 | end 13 | for 14 | forward 15 | function 16 | if 17 | in 18 | label 19 | not 20 | of 21 | or 22 | procedure 23 | program 24 | record 25 | repeat 26 | then 27 | to 28 | type 29 | unit 30 | until 31 | uses 32 | while 33 | with 34 | : 35 | : predefined identifiers 36 | .default Ident2 37 | abs 38 | arctan 39 | boolean 40 | char 41 | cos 42 | dispose 43 | div 44 | eof 45 | eoln 46 | exp 47 | false 48 | input 49 | integer 50 | ln 51 | maxint 52 | mod 53 | new 54 | odd 55 | ord 56 | output 57 | pack 58 | page 59 | pred 60 | read 61 | readln 62 | real 63 | reset 64 | rewrite 65 | round 66 | sin 67 | sqr 68 | sqrt 69 | succ 70 | text 71 | true 72 | trunc 73 | write 74 | writeln 75 | : 76 | .default Type 77 | array 78 | boolean 79 | byte 80 | char 81 | const 82 | file 83 | integer 84 | packed 85 | pointer 86 | real 87 | set 88 | var 89 | word 90 | : 91 | .default Number 92 | true 93 | false 94 | nil 95 | -------------------------------------------------------------------------------- /filters/pc.key: -------------------------------------------------------------------------------- 1 | : $Id: pc.key,v 1.1 2000/08/10 23:15:32 tom Exp $ 2 | af 3 | br 4 | cf 5 | df 6 | fc 7 | ff 8 | fo 9 | fs 10 | gf 11 | hl 12 | ic 13 | if 14 | lf 15 | lo 16 | lp 17 | mx 18 | nd 19 | nf 20 | of 21 | pc 22 | pl 23 | pw 24 | px 25 | py 26 | rf 27 | rg 28 | rm 29 | rp 30 | rs 31 | rw 32 | sb 33 | sc 34 | sd 35 | sf 36 | sh 37 | st 38 | tf 39 | tr 40 | vf 41 | -------------------------------------------------------------------------------- /filters/pot-filt.l: -------------------------------------------------------------------------------- 1 | %pointer 2 | %x NORMAL QUOTED 3 | 4 | %{ 5 | 6 | /* 7 | * $Id: pot-filt.l,v 1.14 2020/05/10 20:28:46 tom Exp $ 8 | * 9 | * Filter to add vile "attribution" sequences to selected bits of gettext files. 10 | */ 11 | 12 | #include 13 | 14 | DefineFilter(pot); 15 | 16 | static char *Action_attr; 17 | static char *Comment_attr; 18 | static char *Error_attr; 19 | static char *Ident_attr; 20 | static char *Number_attr; 21 | static char *Preproc_attr; 22 | static char *String_attr; 23 | 24 | %} 25 | 26 | SSTRING \'([^']|\n)*\' 27 | 28 | NAME [[:alnum:]_] 29 | 30 | IDENT [[:alpha:]_]{NAME}* 31 | 32 | INTEGER [-+]?([[:digit:]]+) 33 | 34 | FORMAT "%"[.*[:digit:]l$#+-]*[cdeEfFgGisuxX] 35 | 36 | %% 37 | 38 | {IDENT} { WriteToken(get_keyword_attr(yytext)); } 39 | "#:"[^\r\n]* { WriteToken(Preproc_attr); } 40 | "#"[^\r\n]* { WriteToken(Comment_attr); } 41 | {INTEGER} { WriteToken(Number_attr); } 42 | 43 | \\. | 44 | {SSTRING} { WriteToken(String_attr); } 45 | \" { BeginQuote(QUOTED, String_attr); } 46 | 47 | \\. { flt_bfr_embed(yytext, yyleng, Action_attr); } 48 | {FORMAT} { flt_bfr_embed(yytext, yyleng, Number_attr); } 49 | [^%\r\n"\\]+ { flt_bfr_append(yytext, yyleng); } 50 | "%%" { flt_bfr_append(yytext, yyleng); } 51 | "%" { flt_error("unexpected '%%'"); 52 | flt_bfr_embed(yytext, yyleng, Error_attr); } 53 | [\r\n] { flt_bfr_append(yytext, yyleng); } 54 | "\"" { FinishQuote(NORMAL); } 55 | 56 | %% 57 | 58 | static void 59 | init_filter(int before GCC_UNUSED) 60 | { 61 | (void) before; 62 | } 63 | 64 | static void 65 | do_filter(FILE *inputs) 66 | { 67 | InitLEX(inputs); 68 | 69 | Action_attr = class_attr(NAME_ACTION); 70 | Comment_attr = class_attr(NAME_COMMENT); 71 | Error_attr = class_attr(NAME_ERROR); 72 | Ident_attr = class_attr(NAME_IDENT2); 73 | Number_attr = class_attr(NAME_NUMBER); 74 | Preproc_attr = class_attr(NAME_PREPROC); 75 | String_attr = class_attr(NAME_LITERAL); 76 | 77 | BEGIN(NORMAL); 78 | 79 | RunLEX(); 80 | flt_bfr_error(); 81 | } 82 | 83 | #if NO_LEAKS 84 | static void 85 | free_filter(void) 86 | { 87 | USE_LEXFREE; 88 | } 89 | #endif 90 | -------------------------------------------------------------------------------- /filters/pot.key: -------------------------------------------------------------------------------- 1 | : $Id: pot.key,v 1.1 1999/09/11 13:43:02 tom Exp $ 2 | : gettext data files 3 | msgid 4 | msgstr 5 | -------------------------------------------------------------------------------- /filters/prolog.key: -------------------------------------------------------------------------------- 1 | : $Id: prolog.key,v 1.2 2009/06/20 16:18:02 tom Exp $ 2 | : ISO directives (without arity) 3 | char_conversion 4 | discontiguous 5 | dynamic 6 | ensure_loaded 7 | include 8 | initialization 9 | multifile 10 | op 11 | set_prolog_flag 12 | : ISO control constructs (without arity) 13 | call 14 | catch 15 | fail 16 | throw 17 | true 18 | : ISO predicates (without arity) 19 | asserta 20 | assertz 21 | at_end_of_stream 22 | atom 23 | atom_chars 24 | atom_codes 25 | atom_concat 26 | atom_length 27 | atomic 28 | bagof 29 | char_code 30 | char_conversion 31 | clause 32 | close 33 | compound 34 | copy_term 35 | current_char_conversion 36 | current_input 37 | current_op 38 | current_output 39 | current_predicate 40 | current_prolog_flag 41 | findall 42 | float 43 | flush_output 44 | functor 45 | get_byte 46 | get_char 47 | get_code 48 | halt 49 | integer 50 | is 51 | nl 52 | nonvar 53 | number 54 | number_chars 55 | number_codes 56 | once 57 | op 58 | open 59 | peek_byte 60 | peek_char 61 | peek_code 62 | put_byte 63 | put_char 64 | put_code 65 | read 66 | read_term 67 | repeat 68 | retract 69 | set_input 70 | set_output 71 | set_prolog_flag 72 | set_stream_position 73 | setof 74 | stream_property 75 | sub_atom 76 | unify_with_occurs_check 77 | var 78 | write 79 | write_canonical 80 | write_term 81 | writeq 82 | : other 83 | abolish 84 | append 85 | arg 86 | -------------------------------------------------------------------------------- /filters/ps1.key: -------------------------------------------------------------------------------- 1 | : $Id: ps1.key,v 1.1 2013/06/25 00:05:29 tom Exp $ 2 | : keywords 3 | begin 4 | break 5 | catch 6 | continue 7 | data 8 | do 9 | dynamicparam 10 | else 11 | elseif 12 | end 13 | exit 14 | filter 15 | finally 16 | for 17 | foreach 18 | from 19 | function 20 | if 21 | in 22 | param 23 | process 24 | return 25 | switch 26 | throw 27 | trap 28 | try 29 | until 30 | while)) 31 | : operators 32 | -as 33 | -band 34 | -bnot 35 | -bor 36 | -bxor 37 | -casesensitive 38 | -ccontains 39 | -ceq 40 | -cge 41 | -cgt 42 | -cle 43 | -clike 44 | -clt 45 | -cmatch 46 | -cne 47 | -cnotcontains 48 | -cnotlike 49 | -cnotmatch 50 | -contains 51 | -creplace 52 | -eq 53 | -exact 54 | -f 55 | -file 56 | -ge 57 | -gt 58 | -icontains 59 | -ieq 60 | -ige 61 | -igt 62 | -ile 63 | -ilike 64 | -ilt 65 | -imatch 66 | -ine 67 | -inotcontains 68 | -inotlike 69 | -inotmatch 70 | -ireplace 71 | -is 72 | -isnot 73 | -le 74 | -like 75 | -lt 76 | -match 77 | -ne 78 | -not 79 | -notcontains 80 | -notlike 81 | -notmatch 82 | -or 83 | -replace 84 | -wildcard 85 | : scope-names 86 | env 87 | function 88 | global 89 | local 90 | private 91 | script 92 | variable 93 | : builtin-variables 94 | ^ 95 | _ 96 | $ 97 | ? 98 | Args 99 | ConfirmPreference 100 | ConsoleFileName 101 | DebugPreference 102 | Error 103 | ErrorActionPreference 104 | ErrorView 105 | ExecutionContext 106 | foreach 107 | FormatEnumerationLimit 108 | HOME 109 | Host 110 | Input 111 | LASTEXITCODE 112 | MaximumAliasCount 113 | MaximumDriveCount 114 | MaximumErrorCount 115 | MaximumFunctionCount 116 | MaximumHistoryCount 117 | MaximumVariableCount 118 | MyInvocation 119 | NestedPromptLevel 120 | OFS 121 | OutputEncoding 122 | PID 123 | PROFILE 124 | PSHOME 125 | PWD 126 | ProgressPreference 127 | ReportErrorShowExceptionClass 128 | ReportErrorShowInnerException 129 | ReportErrorShowSource 130 | ReportErrorShowStackTrace 131 | ShellId 132 | ShouldProcessPreference 133 | ShouldProcessReturnPreference 134 | StackTrace 135 | VerbosePreference 136 | WarningPreference 137 | WhatIfPreference 138 | false 139 | input 140 | lastWord 141 | line 142 | null 143 | true 144 | -------------------------------------------------------------------------------- /filters/raku.key: -------------------------------------------------------------------------------- 1 | : $Id: raku.key,v 1.1 2019/07/21 16:55:17 bod Exp $ 2 | .merge perl 3 | -------------------------------------------------------------------------------- /filters/rb.key: -------------------------------------------------------------------------------- 1 | : Ruby keyword file - by Paul van Tilburg 2 | : $Id: rb.key,v 1.5 2008/05/25 21:30:12 tom Exp $ 3 | :: 4 | : turn off abbreviations 5 | .abbrev 6 | .brief 7 | :: 8 | BEGIN 9 | END 10 | :: 11 | do 12 | end 13 | undef 14 | alias 15 | 16 | : primary 17 | return 18 | yield 19 | and 20 | or 21 | not 22 | super 23 | defined? 24 | 25 | : flow control 26 | if 27 | then 28 | elsif 29 | else 30 | unless 31 | else 32 | 33 | while 34 | until 35 | next 36 | break 37 | redo 38 | 39 | case 40 | when 41 | else 42 | 43 | for 44 | in 45 | 46 | begin 47 | rescue 48 | retry 49 | else 50 | ensure 51 | 52 | class 53 | module 54 | include 55 | def 56 | 57 | : values 58 | : none of these should be "Keyword", since they may be used in expressions. 59 | __FILE__:Preproc 60 | __LINE__:Preproc 61 | __END__:Preproc 62 | self:Ident2 63 | nil:Ident2 64 | false:Ident2 65 | true:Ident2 66 | numeric:Ident2 67 | 68 | : built-in functions (Kernel::*) 69 | at_exit 70 | autoload 71 | binding 72 | caller 73 | catch 74 | chop 75 | chop! 76 | chomp 77 | chomp! 78 | eval 79 | exec 80 | exit 81 | exit! 82 | fail 83 | fork 84 | format 85 | gets 86 | global_variables 87 | gsub 88 | gsub! 89 | iterator? 90 | lambda 91 | load 92 | local_variables 93 | loop 94 | open 95 | print 96 | printf 97 | proc 98 | putc 99 | puts 100 | raise 101 | rand 102 | readline 103 | readlines 104 | require 105 | select 106 | sleep 107 | split 108 | sprintf 109 | srand 110 | sub 111 | sub! 112 | syscall 113 | system 114 | test 115 | trace_var 116 | trap 117 | trace_var 118 | 119 | : often used functions from Module (used in module/classed defs) 120 | attr 121 | attr_reader 122 | attr_writer 123 | attr_accessor 124 | public 125 | protected 126 | private 127 | -------------------------------------------------------------------------------- /filters/rc-filt.l: -------------------------------------------------------------------------------- 1 | %pointer 2 | %state NORMAL PREPRO COMMENT 3 | 4 | %{ 5 | 6 | /* 7 | * $Id: rc-filt.l,v 1.18 2016/12/16 01:01:39 tom Exp $ 8 | * 9 | * Filter to add vile "attribution" sequences to selected bits of Windows 10 | * resource files. 11 | */ 12 | 13 | #include 14 | 15 | DefineFilter(rc); 16 | 17 | static char *Comment_attr; 18 | static char *Number_attr; 19 | static char *Preproc_attr; 20 | static char *String_attr; 21 | 22 | static void 23 | show_prepro(char *text) 24 | { 25 | char *s = skip_blanks(text); 26 | 27 | flt_puts(text, (int) (s - text), ""); 28 | flt_puts(s, 1, Preproc_attr); 29 | s = skip_blanks(text = ++s); 30 | flt_puts(text, (int) (s - text - 1), ""); 31 | set_symbol_table("cpre"); 32 | flt_puts(text, (int) strlen(text), get_keyword_attr(text)); 33 | set_symbol_table(default_table); 34 | } 35 | 36 | %} 37 | 38 | INTEGER [-+]?([[:digit:]]+) 39 | IDENT [[:alpha:]][[:alnum:]_]* 40 | 41 | STRING \"([^"]|(""))*\" 42 | 43 | DECIMAL [[:digit:]_]+ 44 | OCTAL 0[0-7_]+ 45 | HEXADECIMAL 0x[[:xdigit:]_]+ 46 | NUMBER ({DECIMAL}|{OCTAL}|{HEXADECIMAL})[L]? 47 | 48 | %% 49 | 50 | ^[ \t]*#[ \t]*{IDENT} { show_prepro(yytext); } 51 | {IDENT} { WriteToken(get_keyword_attr(yytext)); } 52 | {STRING} { WriteToken(String_attr); } 53 | {NUMBER} { WriteToken(Number_attr); } 54 | 55 | "//"[^\r\n]* { WriteToken(Comment_attr); } 56 | 57 | %% 58 | 59 | static void 60 | init_filter(int before GCC_UNUSED) 61 | { 62 | (void) before; 63 | } 64 | 65 | static void 66 | do_filter(FILE *inputs) 67 | { 68 | InitLEX(inputs); 69 | 70 | Comment_attr = class_attr(NAME_COMMENT); 71 | Number_attr = class_attr(NAME_NUMBER); 72 | Preproc_attr = class_attr(NAME_PREPROC); 73 | String_attr = class_attr(NAME_LITERAL); 74 | 75 | RunLEX(); 76 | } 77 | 78 | #if NO_LEAKS 79 | static void 80 | free_filter(void) 81 | { 82 | USE_LEXFREE; 83 | } 84 | #endif 85 | -------------------------------------------------------------------------------- /filters/rcs.key: -------------------------------------------------------------------------------- 1 | : $Id: rcs.key,v 1.1 1999/04/30 01:45:35 tom Exp $ 2 | head 3 | branch 4 | access 5 | symbols 6 | locks 7 | comment 8 | expand 9 | newphrase 10 | date 11 | author 12 | state 13 | branches 14 | next 15 | newphrase 16 | desc 17 | log 18 | newphrase 19 | text 20 | -------------------------------------------------------------------------------- /filters/rexx.key: -------------------------------------------------------------------------------- 1 | : $Id: rexx.key,v 1.1 1999/12/25 16:18:09 tom Exp $ 2 | : list based on Regina 0.08h 3 | address 4 | arg 5 | begin 6 | break 7 | by 8 | call 9 | digits 10 | do 11 | drop 12 | echo 13 | else 14 | end 15 | engineering 16 | exit 17 | expose 18 | for 19 | forever 20 | form 21 | function 22 | fuzz 23 | if 24 | interpret 25 | iterate 26 | leave 27 | linein 28 | module 29 | name 30 | nop 31 | numeric 32 | off 33 | on 34 | options 35 | otherwise 36 | parse 37 | procedure 38 | pull 39 | push 40 | queue 41 | return 42 | say 43 | scientific 44 | select 45 | shell 46 | signal 47 | source 48 | then 49 | to 50 | trace 51 | until 52 | upper 53 | value 54 | var 55 | version 56 | when 57 | while 58 | with 59 | -------------------------------------------------------------------------------- /filters/rexxfilt.l: -------------------------------------------------------------------------------- 1 | %pointer 2 | %x COMMENT CODE 3 | 4 | %{ 5 | 6 | /* 7 | * $Id: rexxfilt.l,v 1.16 2013/12/02 01:32:53 tom Exp $ 8 | * 9 | * Filter to add vile "attribution" sequences to selected bits of REXX source 10 | * - T.Dickey 11 | */ 12 | 13 | #include 14 | 15 | DefineFilter(rexx); 16 | 17 | static char *Comment_attr; 18 | static char *Number_attr; 19 | static char *String_attr; 20 | 21 | static int my_state; 22 | 23 | %} 24 | 25 | SSTRING \'([^'])*\' 26 | DSTRING \"([^"])*\" 27 | STRINGS ({SSTRING}|{DSTRING}) 28 | 29 | KEYWORD [[:alpha:]@#$!?_][[:alnum:].@#$!?_]* 30 | 31 | SIGN [-+] 32 | DECIMAL [[:digit:]_]+ 33 | OCTAL 0[0-7_]+ 34 | HEXADECIMAL 0x[[:xdigit:]_]+ 35 | REAL [-+]?([[:digit:]_]*\.[[:digit:]][[:digit:]_]*)([eE][+-]?[[:digit:]_]+)? 36 | NUMBER {SIGN}?({DECIMAL}|{OCTAL}|{HEXADECIMAL}|{REAL}) 37 | 38 | %% 39 | 40 | {KEYWORD} { WriteToken(get_keyword_attr(yytext)); } 41 | 42 | "/*" { WriteToken(Comment_attr); BEGIN(COMMENT); } 43 | [^*]* { WriteToken(Comment_attr); } 44 | "*"+[^*/]* { WriteToken(Comment_attr); } 45 | "*"+"/" { WriteToken(Comment_attr); BEGIN(my_state); } 46 | 47 | {STRINGS} { WriteToken(String_attr); } 48 | 49 | {NUMBER} { WriteToken(Number_attr); } 50 | 51 | %% 52 | 53 | static void 54 | init_filter(int before GCC_UNUSED) 55 | { 56 | (void) before; 57 | } 58 | 59 | static void 60 | do_filter(FILE *inputs) 61 | { 62 | InitLEX(inputs); 63 | 64 | Comment_attr = class_attr(NAME_COMMENT); 65 | Number_attr = class_attr(NAME_NUMBER); 66 | String_attr = class_attr(NAME_LITERAL); 67 | 68 | my_state = CODE; 69 | BEGIN(my_state); 70 | RunLEX(); 71 | } 72 | 73 | #if NO_LEAKS 74 | static void 75 | free_filter(void) 76 | { 77 | USE_LEXFREE; 78 | } 79 | #endif 80 | -------------------------------------------------------------------------------- /filters/rtf-filt.l: -------------------------------------------------------------------------------- 1 | %pointer 2 | 3 | %{ 4 | 5 | /* 6 | * $Id: rtf-filt.l,v 1.12 2025/01/26 11:36:23 tom Exp $ 7 | * 8 | * Filter to add vile "attribution" sequences to selected bits of RTF (rich text format) 9 | * input text. 10 | */ 11 | 12 | #include 13 | 14 | DefineFilter(rtf); 15 | 16 | static char *Comment_attr; 17 | static char *Error_attr; 18 | static char *Number_attr; 19 | static char *String_attr; 20 | 21 | static const char *control_attr(char *, int); 22 | 23 | %} 24 | 25 | ESCAPE \\'[[:xdigit:]][[:xdigit:]] 26 | CTRLWORD \\([[:lower:]])+([[:blank:]]?) 27 | INTEGER [[:digit:]]+ 28 | 29 | NUMBER {INTEGER} 30 | 31 | %% 32 | 33 | {CTRLWORD} { WriteToken(control_attr(yytext, yyleng)); } 34 | {ESCAPE} { WriteToken(String_attr); } 35 | {NUMBER} { WriteToken(Number_attr); } 36 | 37 | %% 38 | 39 | static const char * 40 | control_attr(char *text, int length) 41 | { 42 | const char *attr = NULL; 43 | 44 | if (length > 1) { 45 | char save = 0; 46 | 47 | if (isBlank(CharOf(text[length - 1]))) { 48 | save = text[--length]; 49 | text[length] = '\0'; 50 | } 51 | attr = get_keyword_attr(text + 1); 52 | text[length] = save; 53 | } 54 | if (attr == NULL) { 55 | attr = Error_attr; 56 | flt_error("Unknown control word: %s", text); 57 | } 58 | return attr; 59 | } 60 | 61 | static void 62 | init_filter(int before GCC_UNUSED) 63 | { 64 | (void) before; 65 | } 66 | 67 | static void 68 | do_filter(FILE *inputs) 69 | { 70 | InitLEX(inputs); 71 | 72 | Error_attr = class_attr(NAME_ERROR); 73 | Comment_attr = class_attr(NAME_COMMENT); 74 | Number_attr = class_attr(NAME_NUMBER); 75 | String_attr = class_attr(NAME_LITERAL); 76 | 77 | RunLEX(); 78 | } 79 | 80 | #if NO_LEAKS 81 | static void 82 | free_filter(void) 83 | { 84 | USE_LEXFREE; 85 | } 86 | #endif 87 | -------------------------------------------------------------------------------- /filters/ruby.key: -------------------------------------------------------------------------------- 1 | : $Id: ruby.key,v 1.1 2013/04/10 09:37:36 tom Exp $ 2 | .merge rb 3 | -------------------------------------------------------------------------------- /filters/rust.key: -------------------------------------------------------------------------------- 1 | : $Id: rust.key,v 1.3 2018/03/26 20:50:09 tom Exp $ 2 | : https://doc.rust-lang.org/book/second-edition/appendix-01-keywords.html 3 | as 4 | box 5 | break 6 | const 7 | contained 8 | continue 9 | crate 10 | else 11 | enum 12 | extern 13 | fn 14 | for 15 | if 16 | impl 17 | in 18 | let 19 | loop 20 | match 21 | mod 22 | move 23 | mut 24 | pub 25 | ref 26 | return 27 | static 28 | struct 29 | super 30 | trait 31 | type 32 | union 33 | unsafe 34 | use 35 | where 36 | while 37 | 38 | .default Type 39 | bool 40 | char 41 | f32 42 | f64 43 | i128 44 | i16 45 | i32 46 | i64 47 | i8 48 | isize 49 | self 50 | Self 51 | Self 52 | str 53 | u128 54 | u16 55 | u32 56 | u64 57 | u8 58 | usize 59 | 60 | : reserved for future use: 61 | .default Error 62 | abstract 63 | alignof 64 | become 65 | box 66 | do 67 | final 68 | macro 69 | offsetof 70 | override 71 | priv 72 | proc 73 | pure 74 | sizeof 75 | typeof 76 | unsized 77 | virtual 78 | yield 79 | 80 | .default 81 | -------------------------------------------------------------------------------- /filters/sccs.key: -------------------------------------------------------------------------------- 1 | : $Id: sccs.key,v 1.1 1999/04/29 23:22:34 tom Exp $ 2 | .class Insert 3 | .class Delete 4 | .class Marker 5 | Delete:C1 6 | Insert:C2 7 | Marker:BC6 8 | -------------------------------------------------------------------------------- /filters/sccsfilt.l: -------------------------------------------------------------------------------- 1 | %pointer 2 | %s sDELETE INSERT 3 | 4 | %a 10000 5 | %o 10000 6 | 7 | %{ 8 | 9 | /* 10 | * $Id: sccsfilt.l,v 1.23 2013/12/02 01:32:53 tom Exp $ 11 | * 12 | * Filter to add vile "attribution" sequences to SCCS files. 13 | */ 14 | 15 | #include 16 | 17 | DefineFilter(sccs); 18 | 19 | static char *Marker_attr; 20 | static char *Insert_attr; 21 | static char *Delete_attr; 22 | static char *Comment_attr; 23 | static char *Error_attr; 24 | static char *String_attr; 25 | 26 | #include 27 | 28 | %} 29 | 30 | MARKED ^\001[^\r\n]* 31 | 32 | EXPANDED "@(#)"[^\r\n]* 33 | 34 | UNEXPANDED "%"[[:upper:]]"%" 35 | 36 | %% 37 | 38 | {UNEXPANDED} { WriteToken(String_attr); } 39 | {EXPANDED} { flt_error("expanded keywords"); 40 | WriteToken(Error_attr); } 41 | 42 | {MARKED} { flt_putc('\001'); 43 | WriteToken2((yytext[1] == 'c') 44 | ? Comment_attr 45 | : Marker_attr, 1); 46 | switch (yytext[1]) 47 | { 48 | case 'I': 49 | push_state(INSERT); 50 | break; 51 | case 'D': 52 | push_state(sDELETE); 53 | break; 54 | case 'E': 55 | pop_state(); 56 | break; 57 | default: 58 | new_state(INITIAL); 59 | break; 60 | } 61 | } 62 | . | 63 | [^%@\r\n]* { WriteToken(Insert_attr); } 64 | 65 | . | 66 | [^%@\r\n]* { WriteToken(Delete_attr); } 67 | 68 | %% 69 | 70 | #include 71 | 72 | static void 73 | init_filter(int before GCC_UNUSED) 74 | { 75 | (void) before; 76 | } 77 | 78 | static void 79 | do_filter(FILE *inputs) 80 | { 81 | InitLEX(inputs); 82 | 83 | Marker_attr = class_attr("Marker"); 84 | Insert_attr = class_attr("Insert"); 85 | Delete_attr = class_attr("Delete"); 86 | Comment_attr = class_attr(NAME_COMMENT); 87 | Error_attr = class_attr(NAME_ERROR); 88 | String_attr = class_attr(NAME_LITERAL); 89 | 90 | begin_state(INITIAL); 91 | RunLEX(); 92 | end_state(); 93 | } 94 | 95 | #if NO_LEAKS 96 | static void 97 | free_filter(void) 98 | { 99 | USE_LEXFREE; 100 | } 101 | #endif 102 | -------------------------------------------------------------------------------- /filters/sh.key: -------------------------------------------------------------------------------- 1 | : $Id: sh.key,v 1.6 2012/07/11 19:13:38 tom Exp $ 2 | : IEEE 1003.1 2004 edition 3 | : http://pubs.opengroup.org/onlinepubs/009695399/utilities/contents.html 4 | : sh keywords (POSIX) 5 | case 6 | do 7 | done 8 | elif 9 | else 10 | esac 11 | fi 12 | for 13 | if 14 | in 15 | then 16 | until 17 | while 18 | : commands and built-in utilities (POSIX) 19 | alias 20 | bg 21 | break 22 | cd 23 | command 24 | continue 25 | eval 26 | exec 27 | exit 28 | export 29 | false 30 | fc 31 | fg 32 | getopts 33 | jobs 34 | kill 35 | newgrp 36 | pwd 37 | read 38 | readonly 39 | return 40 | set 41 | shift 42 | times 43 | trap 44 | true 45 | umask 46 | unalias 47 | unset 48 | wait 49 | : other utilities (POSIX) 50 | cat 51 | echo 52 | env 53 | hash 54 | printf 55 | test 56 | time 57 | type 58 | ulimit 59 | -------------------------------------------------------------------------------- /filters/sml.key: -------------------------------------------------------------------------------- 1 | : $Id: sml.key,v 1.1 2000/07/27 02:26:16 tom Exp $ 2 | .default Keyword 3 | abstype 4 | and 5 | andalso 6 | as 7 | case 8 | datatype 9 | do 10 | else 11 | end 12 | eqtype 13 | exception 14 | fn 15 | fun 16 | functor 17 | funsig 18 | handle 19 | if 20 | in 21 | include 22 | infix 23 | infixr 24 | let 25 | local 26 | nonfix 27 | of 28 | op 29 | open 30 | orelse 31 | raise 32 | rec 33 | sharing 34 | sig 35 | signature 36 | struct 37 | structure 38 | then 39 | type 40 | val 41 | where 42 | while 43 | with 44 | withtype 45 | : 46 | .default Type 47 | NONE 48 | SOME 49 | array 50 | bool 51 | char 52 | exn 53 | int 54 | list 55 | option 56 | order 57 | real 58 | ref 59 | string 60 | substring 61 | unit 62 | vector 63 | word 64 | : 65 | .default 66 | -------------------------------------------------------------------------------- /filters/spell.rc: -------------------------------------------------------------------------------- 1 | ; $Id: spell.rc,v 1.8 2007/08/08 23:26:21 tom Exp $ 2 | 3 | store-procedure SpellFilter "Highlight misspelled words in the current buffer" 4 | ; The spell filter uses an external program to lookup misspelled words. 5 | ; Usually that is "spell -l", but you can override this by setting the 6 | ; $VILE_SPELL_FILT environment variable. 7 | ~if &filter "spell" 8 | ~local $filtername 9 | ~local $curcol $curline $filtermsgs 10 | ~local %original 11 | 12 | setv %original=$cbufname 13 | ~if &isa buffer '[Filter Messages]' 14 | ~quiet kill-buffer '[Filter Messages]' 15 | ~endif 16 | ~if &isa buffer '[Spelling Errors]' 17 | ~quiet kill-buffer '[Spelling Errors]' 18 | ~endif 19 | set filtermsgs 20 | HighlightClear 21 | ~hidden attribute-directly end-of-file "spell" 22 | ; don't let anyone else write there, e.g., buffer-hooks 23 | set nofiltermsgs 24 | ~if &isa buffer '[Filter Messages]' 25 | ~quiet other-buffer-rename '[Filter Messages]' '[Spelling Errors]' 26 | ~quiet error-buffer '[Spelling Errors]' 27 | ~endif 28 | ~else 29 | ~hidden goto-beginning-of-file 30 | ~hidden attribute-from-filter end-of-file "vile-spell-filt" 31 | ~endif 32 | ~endm 33 | bind-key SpellFilter ^X-i 34 | -------------------------------------------------------------------------------- /filters/syntax.key: -------------------------------------------------------------------------------- 1 | : $Id: syntax.key,v 1.1 2003/02/17 23:58:25 tom Exp $ 2 | : This file illustrates the syntax of the ".key" (.keywords) files. 3 | : 4 | Action:BU 5 | Comment:C1U 6 | Error:RUC1 7 | :Ident:UC3 8 | Ident2:UC6 9 | Keyword:UBC3 10 | Keyword2:UBC1 11 | Literal:UC5 12 | Number:UBC6 13 | Preproc:UC2 14 | Type:UBC2 15 | : 16 | .abbrev * 17 | cl*ass 18 | cle*an 19 | : 20 | .class Foo 21 | Foo:U 22 | name:Foo 23 | .default Foo 24 | name2 25 | .equals = 26 | .include Bar 27 | .merge FooBar 28 | .meta . 29 | .source BarFoo 30 | .table FooBarPlus 31 | .meta ! 32 | !source BarFoo 33 | !meta . 34 | .source BarFoo 35 | -------------------------------------------------------------------------------- /filters/tags.key: -------------------------------------------------------------------------------- 1 | : $Id: tags.key,v 1.1 1999/11/23 23:59:21 tom Exp $ 2 | -------------------------------------------------------------------------------- /filters/tagsfilt.c: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id: tagsfilt.c,v 1.13 2013/12/02 01:32:53 tom Exp $ 3 | * 4 | * Filter to add vile "attribution" sequences to a tags file. It's done best 5 | * in C because the file consists only of columns of data that are delimited 6 | * by whitespace. 7 | */ 8 | 9 | #include 10 | 11 | DefineFilter(tags); 12 | 13 | static char *Comment_attr; 14 | static char *Ident_attr; 15 | static char *Ident2_attr; 16 | static char *Literal_attr; 17 | static char *Number_attr; 18 | 19 | static char * 20 | skip_field(char *src) 21 | { 22 | while (*src != 0 && *src != '\t') 23 | src++; 24 | return (src); 25 | } 26 | 27 | static void 28 | init_filter(int before GCC_UNUSED) 29 | { 30 | (void) before; 31 | } 32 | 33 | static void 34 | do_filter(FILE *input GCC_UNUSED) 35 | { 36 | static size_t used; 37 | static char *line; 38 | 39 | char *s, *t; 40 | 41 | (void) input; 42 | 43 | Comment_attr = class_attr(NAME_COMMENT); 44 | Ident_attr = class_attr(NAME_IDENT); 45 | Ident2_attr = class_attr(NAME_IDENT2); 46 | Literal_attr = class_attr(NAME_LITERAL); 47 | Number_attr = class_attr(NAME_NUMBER); 48 | 49 | while (flt_gets(&line, &used) != NULL) { 50 | s = line; 51 | if (*s != '!') { 52 | t = skip_field(s); 53 | flt_puts(s, (int) (t - s), Ident_attr); 54 | if (*t == '\t') { 55 | flt_putc(*t++); 56 | } 57 | s = t; 58 | t = skip_field(s); 59 | flt_puts(s, (int) (t - s), Ident2_attr); 60 | if (*t == '\t') { 61 | flt_putc(*t++); 62 | } 63 | s = t; 64 | if (isdigit(CharOf(*s))) { 65 | while (isdigit(CharOf(*t))) 66 | t++; 67 | flt_puts(s, (int) (t - s), Number_attr); 68 | } else if (ispunct(CharOf(*s))) { 69 | t++; 70 | while (*t != 0 && *t != *s) { 71 | if (*t == '\\') 72 | t++; 73 | if (*t != 0) 74 | t++; 75 | } 76 | flt_puts(s, (int) (t - s), Literal_attr); 77 | } 78 | s = t; 79 | } 80 | flt_puts(s, (int) strlen(s), Comment_attr); 81 | } 82 | } 83 | 84 | #if NO_LEAKS 85 | static void 86 | free_filter(void) 87 | { 88 | } 89 | #endif 90 | -------------------------------------------------------------------------------- /filters/tbl.key: -------------------------------------------------------------------------------- 1 | : $Id: tbl.key,v 1.2 2008/05/05 20:53:54 tom Exp $ 2 | .meta # 3 | .buffers 4 | .environment 5 | .functions 6 | .globals 7 | .majormode 8 | .qualifier 9 | .table 10 | .windows 11 | .abbr 12 | defined:Preproc 13 | bool:Type 14 | enum:Type 15 | int:Type 16 | regex:Type 17 | string:Type 18 | -------------------------------------------------------------------------------- /filters/texifilt.l: -------------------------------------------------------------------------------- 1 | %pointer 2 | %s sTEXT NOTE 3 | 4 | %{ 5 | 6 | /* 7 | * $Id: texifilt.l,v 1.16 2025/01/26 11:38:02 tom Exp $ 8 | * 9 | * Filter to add vile "attribution" sequences to selected bits of texinfo input. 10 | */ 11 | 12 | #include 13 | 14 | DefineFilter(texi); 15 | 16 | static char *Action_attr; 17 | static char *Comment_attr; 18 | static char *Number_attr; 19 | static char *String_attr; 20 | 21 | %} 22 | 23 | SPACE [ \t] 24 | 25 | PUNCT [!"'*.:=?@^`{}~-] 26 | 27 | NAME [[:alpha:]]+ 28 | 29 | INTEGER [-+]?([[:digit:]]+) 30 | REAL [-+]?([[:digit:]]*\.[[:digit:]]+)([eE][+-]?[[:digit:]]+)? 31 | NUMBER ({INTEGER}|{REAL}) 32 | 33 | %% 34 | 35 | "@{C}" | 36 | "@"{SPACE} | 37 | [{}] | 38 | "@"{PUNCT} { WriteToken(String_attr); } 39 | 40 | "@"{NAME} { const char *attr = get_keyword_attr(yytext + 1); 41 | const char *mark = Action_attr; 42 | if (attr == Comment_attr) { 43 | BEGIN(NOTE); 44 | mark = attr; 45 | } else if (attr != NULL) { 46 | mark = attr; 47 | } 48 | flt_puts("@", 1, mark); 49 | WriteToken2(get_keyword_attr(yytext + 1), 1); 50 | } 51 | 52 | [^\r\n]* { WriteToken(Comment_attr); } 53 | \n { ECHO; BEGIN(sTEXT); } 54 | 55 | {NUMBER} { WriteToken(Number_attr); } 56 | . { ECHO; } 57 | 58 | %% 59 | 60 | static void 61 | init_filter(int before GCC_UNUSED) 62 | { 63 | (void) before; 64 | } 65 | 66 | static void 67 | do_filter(FILE *inputs) 68 | { 69 | InitLEX(inputs); 70 | 71 | Action_attr = class_attr(NAME_ACTION); 72 | Comment_attr = class_attr(NAME_COMMENT); 73 | Number_attr = class_attr(NAME_NUMBER); 74 | String_attr = class_attr(NAME_LITERAL); 75 | 76 | BEGIN(sTEXT); 77 | RunLEX(); 78 | } 79 | 80 | #if NO_LEAKS 81 | static void 82 | free_filter(void) 83 | { 84 | USE_LEXFREE; 85 | } 86 | #endif 87 | -------------------------------------------------------------------------------- /filters/tpu-filt.l: -------------------------------------------------------------------------------- 1 | %pointer 2 | %state NORMAL 3 | 4 | %{ 5 | 6 | /* 7 | * $Id: tpu-filt.l,v 1.4 2025/01/26 11:44:07 tom Exp $ 8 | * 9 | * Filter to add vile "attribution" sequences to selected bits of TPU files. 10 | */ 11 | 12 | #include 13 | 14 | DefineFilter(tpu); 15 | 16 | static char *Comment_attr; 17 | static char *Ident_attr; 18 | static char *Number_attr; 19 | static char *String_attr; 20 | 21 | %} 22 | 23 | BLANK [ \t] 24 | IDENT ([%])?[[:alpha:]_][$[:alnum:]_]* 25 | 26 | INLINECOMMENT ![^\r\n]* 27 | COMMENT ^({BLANK}*)($)?({BLANK}*)(![^\r\n]*)? 28 | 29 | BINARYNUM "%"[bB][01]+ 30 | OCTALNUM "%"[oO][0-7]+ 31 | HEXNUM "%"[xX][0-9a-fA-Z]+ 32 | NUMBER ([[:digit:]]+) 33 | 34 | SSTRING \'([^'\r\n]|(''))*\' 35 | DSTRING \"([^"\r\n]|(""))*\" 36 | 37 | %% 38 | 39 | {INLINECOMMENT} | 40 | {COMMENT} { WriteToken(Comment_attr); } 41 | 42 | {BINARYNUM} | 43 | {OCTALNUM} | 44 | {HEXNUM} | 45 | {NUMBER} { WriteToken(Number_attr); } 46 | 47 | {IDENT} { WriteToken(ci_keyword_attr(yytext)); } 48 | 49 | {SSTRING} { WriteToken(String_attr); } 50 | {DSTRING} { WriteToken(String_attr); } 51 | 52 | [\n] { ECHO; } 53 | 54 | %% 55 | 56 | static void 57 | init_filter(int before GCC_UNUSED) 58 | { 59 | (void) before; 60 | } 61 | 62 | static void 63 | do_filter(FILE *inputs) 64 | { 65 | InitLEX(inputs); 66 | 67 | Comment_attr = class_attr(NAME_COMMENT); 68 | Ident_attr = class_attr(NAME_IDENT); 69 | Number_attr = class_attr(NAME_NUMBER); 70 | String_attr = class_attr(NAME_LITERAL); 71 | 72 | BEGIN(NORMAL); 73 | RunLEX(); 74 | } 75 | 76 | #if NO_LEAKS 77 | static void 78 | free_filter(void) 79 | { 80 | USE_LEXFREE; 81 | } 82 | #endif 83 | -------------------------------------------------------------------------------- /filters/ts.key: -------------------------------------------------------------------------------- 1 | : $Id: ts.key,v 1.1 2019/09/14 16:02:41 tom Exp $ 2 | : keywords for TypeScript 3 | .merge js 4 | -------------------------------------------------------------------------------- /filters/unfilter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Common definitions for un-filters. 3 | * 4 | * $Id: unfilter.h,v 1.2 2003/05/07 00:38:38 tom Exp $ 5 | */ 6 | 7 | #ifndef UNFILTER_H 8 | #define UNFILTER_H 1 9 | #include 10 | 11 | extern void begin_unfilter(FILE *dst); 12 | extern void markup_unfilter(FILE *dst, int attrib); 13 | extern void write_unfilter(FILE *dst, int ch, int attrib); 14 | extern void end_unfilter(FILE *dst); 15 | 16 | #define ATR_COLOR 0x0100 17 | #define ATR_BOLD 0x0200 18 | #define ATR_REVERSE 0x0400 19 | #define ATR_UNDERLINE 0x0800 20 | #define ATR_ITALIC 0x1000 21 | 22 | #endif /* UNFILTER_H */ 23 | -------------------------------------------------------------------------------- /filters/vcproj.key: -------------------------------------------------------------------------------- 1 | : $Id: vcproj.key,v 1.4 2020/05/08 19:14:00 tom Exp $ 2 | Configuration 3 | Configurations 4 | File 5 | FileConfiguration 6 | Files 7 | Filter 8 | Globals 9 | Platform 10 | Platforms 11 | References 12 | RelativePath 13 | Tool 14 | ToolFiles 15 | VisualStudioProject 16 | .table xmlprops 17 | .default Ident2 18 | AdditionalDependencies 19 | AdditionalIncludeDirectories 20 | AdditionalLibraryDirectories 21 | BasicRuntimeChecks 22 | CharacterSet 23 | CommandLine 24 | ConfigurationType 25 | DataExecutionPrevention 26 | DebugInformationFormat 27 | Description 28 | Detect64BitPortabilityProblems 29 | EnableCOMDATFolding 30 | Filter 31 | GenerateDebugInformation 32 | GeneratePreprocessedFile 33 | IgnoreAllDefaultLibraries 34 | IgnoreDefaultLibraryNames 35 | InheritedPropertySheets 36 | IntermediateDirectory 37 | Keyword 38 | LinkIncremental 39 | MinimalRebuild 40 | ModuleDefinitionFile 41 | Name 42 | ObjectFile 43 | Optimization 44 | OptimizeReferences 45 | OutputDirectory 46 | OutputFile 47 | Outputs 48 | PreprocessorDefinitions 49 | ProgramDatabaseFile 50 | ProjectGUID 51 | ProjectType 52 | RandomizedBaseAddress 53 | RelativePath 54 | RootNamespace 55 | RuntimeLibrary 56 | SubSystem 57 | TargetFrameworkVersion 58 | TargetMachine 59 | UniqueIdentifier 60 | UsePrecompiledHeader 61 | Version 62 | WarningLevel 63 | WholeProgramOptimization 64 | DebugInformationFormat 65 | .merge xml 66 | -------------------------------------------------------------------------------- /filters/vcxproj.key: -------------------------------------------------------------------------------- 1 | : $Id: vcxproj.key,v 1.2 2018/10/12 21:54:46 tom Exp $ 2 | : TODO 3 | : $(ProjectDir) 4 | : $(SolutionDir) 5 | : $(Configuration) 6 | : $(OutDir) 7 | : $(Platform) 8 | : $(ProjectDir) 9 | : $(SolutionDir) 10 | : $(TargetDir) 11 | : $(TargetPath) 12 | : $(UserRootDir) 13 | : $(VCTargetsPath) 14 | : $(VcInstallDir) 15 | AdditionalDependencies 16 | AdditionalIncludeDirectories 17 | AdditionalInputs 18 | AdditionalLibraryDirectories 19 | BasicRuntimeChecks 20 | CharacterSet 21 | ClCompile 22 | ClInclude 23 | Command 24 | Configuration 25 | ConfigurationType 26 | CustomBuild 27 | CustomBuildAfterTargets 28 | CustomBuildStep 29 | DataExecutionPrevention 30 | DebugInformationFormat 31 | EnableCOMDATFolding 32 | ExcludedFromBuild 33 | Extensions 34 | FileType 35 | Filter 36 | GenerateDebugInformation 37 | IgnoreSpecificDefaultLibraries 38 | Import 39 | ImportGroup 40 | IncludePath 41 | IntDir 42 | ItemDefinitionGroup 43 | ItemGroup 44 | Keyword 45 | Link 46 | LinkIncremental 47 | LinkObjects 48 | Message 49 | MinimalRebuild 50 | MinimumRequiredVersion 51 | None 52 | Optimization 53 | OptimizeReferences 54 | OutDir 55 | OutputFile 56 | Outputs 57 | Platform 58 | PlatformToolset 59 | PrecompiledHeader 60 | PreprocessSuppressLineNumbers 61 | PreprocessToFile 62 | PreprocessorDefinitions 63 | ProgramDatabaseFile 64 | Project 65 | ProjectConfiguration 66 | ProjectGuid 67 | ProjectReference 68 | PropertyGroup 69 | RandomizedBaseAddress 70 | ReferenceOutputAssembly 71 | ResourceCompile 72 | RootNamespace 73 | RuntimeLibrary 74 | SubSystem 75 | TargetMachine 76 | UniqueIdentifier 77 | WarningLevel 78 | WholeProgramOptimization 79 | .table xmlprops 80 | .default Ident2 81 | Condition 82 | DefaultTargets 83 | Include 84 | Label 85 | Project 86 | ToolsVersion 87 | encoding 88 | version 89 | xmlns 90 | .merge xml 91 | -------------------------------------------------------------------------------- /filters/vile.key: -------------------------------------------------------------------------------- 1 | : $Id: vile.key,v 1.9 2009/05/26 20:11:24 tom Exp $ 2 | : customize this file with the global default values for highlighting attributes 3 | .class Action:BC1 4 | .class Comment:C1 5 | .class Error:RC1 6 | :.class Ident:R 7 | .class Ident2:C3 8 | .class Keyword:BC3 9 | .class Keyword2:BC1 10 | .class Literal:UC5 11 | .class Number:C6 12 | .class Preproc:C2 13 | .class Type:BC2 14 | -------------------------------------------------------------------------------- /filters/vim.key: -------------------------------------------------------------------------------- 1 | : $Id: vim.key,v 1.3 2009/04/25 12:40:02 tom Exp $ 2 | break 3 | command 4 | continue 5 | delcommand 6 | else 7 | elsei*f 8 | endif 9 | endwhile 10 | exe 11 | hi*ghlight 12 | if 13 | let 14 | set 15 | syn*tax 16 | unlet 17 | while 18 | HiLink 19 | try 20 | catch 21 | endtry 22 | : 23 | .default Ident2 24 | append 25 | argc 26 | argv 27 | browse 28 | bufexists 29 | bufloaded 30 | bufname 31 | bufnr 32 | bufwinnr 33 | byte2line 34 | case 35 | char2nr 36 | cluster 37 | col 38 | confirm 39 | contained 40 | contains 41 | def 42 | delete 43 | did_filetype 44 | escape 45 | exists 46 | expand 47 | filereadable 48 | fnamemodify 49 | getcwd 50 | getftime 51 | getline 52 | getwinposx 53 | getwinposy 54 | glob 55 | has 56 | histadd 57 | histdel 58 | histget 59 | histnr 60 | hlID 61 | hlexists 62 | hostname 63 | ignore 64 | input 65 | isdirectory 66 | keyword 67 | libcall 68 | line 69 | line2byte 70 | link 71 | localtime 72 | maparg 73 | mapcheck 74 | match 75 | matchend 76 | matchgroup 77 | matchstr 78 | nr2char 79 | region 80 | rename 81 | setline 82 | strftime 83 | strlen 84 | strpart 85 | strtrans 86 | substitute 87 | synID 88 | synIDattr 89 | synIDtrans 90 | system 91 | tempname 92 | transparent 93 | virtcol 94 | visualmode 95 | winbufnr 96 | winheight 97 | winnr 98 | -------------------------------------------------------------------------------- /filters/wbt-filt.l: -------------------------------------------------------------------------------- 1 | %pointer 2 | %x NORMAL 3 | 4 | %{ 5 | 6 | /* 7 | * $Id: wbt-filt.l,v 1.13 2020/05/10 20:28:46 tom Exp $ 8 | * 9 | * Filter to add vile "attribution" sequences to selected bits of WinBatch script. 10 | */ 11 | 12 | #include 13 | 14 | DefineFilter(wbt); 15 | 16 | static const char *want_attr(char *want, char *name); 17 | 18 | static char *Comment_attr; 19 | static char *Error_attr; 20 | static char *Number_attr; 21 | static char *Preproc_attr; 22 | static char *String_attr; 23 | 24 | %} 25 | 26 | BSTRING \`([^`\r\n]|``)*\` 27 | SSTRING \'([^'\r\n]|'')*\' 28 | DSTRING \"([^"\r\n]|"")*\" 29 | STRING {DSTRING}|{SSTRING}|{BSTRING} 30 | 31 | NAME [[:alnum:]] 32 | 33 | IDENT [[:alpha:]]{NAME}* 34 | 35 | DECIMAL [[:digit:]]+ 36 | REAL [-+]?([[:digit:]]*\.[[:digit:]]+)([eE][+-]?[[:digit:]]+)? 37 | NUMBER ({REAL}|{DECIMAL}) 38 | 39 | %% 40 | 41 | {IDENT} { WriteToken(get_keyword_attr(yytext)); } 42 | #{IDENT} { WriteToken(want_attr(Preproc_attr, yytext)); } 43 | "@"{IDENT} { WriteToken(want_attr(Number_attr, yytext)); } 44 | 45 | ";"[^\r\n]* { WriteToken(Comment_attr); } 46 | 47 | {NUMBER} { WriteToken(Number_attr); } 48 | [[:digit:]]{NUMBER}{NAME}+ { 49 | flt_error("not a number"); 50 | WriteToken(Error_attr); 51 | } 52 | {STRING} { WriteToken(String_attr); } 53 | 54 | %% 55 | 56 | static const char * 57 | want_attr(char *want, char *name) 58 | { 59 | const char *have = get_keyword_attr(name); 60 | if (have != want) 61 | have = Error_attr; 62 | return have; 63 | } 64 | 65 | static void 66 | init_filter(int before GCC_UNUSED) 67 | { 68 | (void) before; 69 | } 70 | 71 | static void 72 | do_filter(FILE *inputs) 73 | { 74 | InitLEX(inputs); 75 | 76 | Comment_attr = class_attr(NAME_COMMENT); 77 | Error_attr = class_attr(NAME_ERROR); 78 | Number_attr = class_attr(NAME_NUMBER); 79 | Preproc_attr = class_attr(NAME_PREPROC); 80 | String_attr = class_attr(NAME_LITERAL); 81 | 82 | BEGIN(NORMAL); 83 | 84 | RunLEX(); 85 | } 86 | 87 | #if NO_LEAKS 88 | static void 89 | free_filter(void) 90 | { 91 | USE_LEXFREE; 92 | } 93 | #endif 94 | -------------------------------------------------------------------------------- /filters/xml.key: -------------------------------------------------------------------------------- 1 | : $Id: xml.key,v 1.4 2009/05/16 00:30:32 tom Exp $ 2 | ?xml 3 | : 4 | !ATTLIST 5 | !DOCTYPE 6 | !ELEMENT 7 | !ENTITY 8 | !NOTATION 9 | : 10 | ANY 11 | CDATA 12 | EMPTY 13 | ENTITIES 14 | ENTITY 15 | ID 16 | IDREF 17 | IDREFS 18 | NMTOKEN 19 | NMTOKENS 20 | NOTATION 21 | PCDATA 22 | : 23 | .include html 24 | -------------------------------------------------------------------------------- /filters/xres.key: -------------------------------------------------------------------------------- 1 | : $Id: xres.key,v 1.3 2006/11/28 23:56:24 tom Exp $ 2 | : keywords are matched case-independent 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 |