/usr/share/doc/epic4/new-load is in epic4 1:2.10.5-2build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | This is a brief discussion on a new load parser.
The current load parser is kind of a hodge podge and a mess. Plus, it's
pretty slow, and it has a few annoying limitations (such as the maximum
line length.) I endevor to write a new load parser that fixes as many
of these problems as possible.
The new load parser will be a combination of a lexer and a parser, where
the lexer will remove tokens from the load parser, and the parser will
decide what to do with them. Here are a sample of the possible tokens
you might find in a loaded file:
# The hash character (HASH)
/* The slash-star sequence (SLASH-STAR)
*/ The star-slash sequence (STAR-SLASH)
; The semicolon character (SEMICOLON)
\n The newline character (NEWLINE)
{ The opening brace (LBRACE)
} The closing brace (RBRACE)
\ The backslash character (BACKSLASH)
... The literal string (STRING)
The lexer will submit each special token from the file one at a time to
the parser for consideration. The parser will decide whether to accept
the token, or whether to reject it. Rejected special tokens are accepted
as literal text strings. The format of an input file looks roughly like
this:
FILE := <LINE>*
LINE := <C-COMMENT> | <HASH-COMMENT> | <COMMAND> | <EMPTY>
C-COMMENT := <SLASH-STAR> <TEXT> <STAR-SLASH>
HASH-COMMENT := <HASH> <STRING> <NEWLINE>
COMMAND := <TEXT> <COMMAND-SEP>
COMMAND-SEP := <NEWLINE> !<BLOCK>
BLOCK := <LBRACE> <COMMAND>* <RBRACE>
EMPTY := <NEWLINE>
TEXT := (<STRING>|<NEWLINE>)*
STRING := (<NON-SPECIAL-CHAR>|<BACKSLASH> <ANY>)*
A "command" is some literal text, followed by some number of blocks.
The text may be seperated from the blocks by a newline and whitespace,
and blocks may be seperated from each other by a newline and whitespace.
|