Merge pull request #1342 from xexyl/ant-1993

Format/typo check 1993/ant
This commit is contained in:
Landon Curt Noll authored and GitHub committed 2023-11-09 13:47:50 -07:00
commit a9f70afe90
3 files changed
+46 -12

No files matched your search

+15 -4
View File
@@ -4,6 +4,16 @@
make all make all
``` ```
### Bugs and (Mis)features:
The current status of this entry is:
```
STATUS: missing file - please provide it
```
For more detailed information see [1993 ant in bugs.md](/bugs.md#1993-ant).
## To use: ## To use:
@@ -23,8 +33,8 @@ make -f ant.test.mk
## Judges' remarks: ## Judges' remarks:
See the author's POSIX P1003.2-like documentation file ant.txt for more See the author's POSIX P1003.2-like documentation file [ant.txt](ant.txt) for
information. more information.
This program demonstrates that POSIX doesn't guarantee readability. :-) This program demonstrates that POSIX doesn't guarantee readability. :-)
@@ -33,14 +43,15 @@ This program demonstrates that POSIX doesn't guarantee readability. :-)
Some of the features of my entry are: Some of the features of my entry are:
- "Lengthy" POSIX.2 style specification and manual :) :)\ - "Lengthy" POSIX.2 style specification and manual :) :)
- Useful subset of POSIX.2 Extended Regular Expressions. - Useful subset of POSIX.2 Extended Regular Expressions.
- Recursive ERE parser/compiler that generates an NFA railroad.\ - Recursive ERE parser/compiler that generates an NFA railroad.
- Lazy NFA to DFA evaluation to improve performance speed. - Lazy NFA to DFA evaluation to improve performance speed.
- Code tested on a variety of platforms. - Code tested on a variety of platforms.
- Make driven test script. - Make driven test script.
- Can be compiled with ANSI or K&R C. - Can be compiled with ANSI or K&R C.
- Not a toy, but actually useful and usable on systems that use DOS. - Not a toy, but actually useful and usable on systems that use DOS.
- See also [ant.txt](ant.txt).
## Copyright and CC BY-SA 4.0 License: ## Copyright and CC BY-SA 4.0 License:
+8 -8
View File
@@ -91,7 +91,7 @@ None.
7.1.1. MATCHING A SINGLE CHARACTER 7.1.1. MATCHING A SINGLE CHARACTER
An ERE ordinary character, a special character preceded by a An ERE ordinary character, a special character preceded by a
backslash, or a period shall match a single character. A bracket backslash (\), or a period (.) shall match a single character. A bracket
expression shall match a single character. An ERE matching a single expression shall match a single character. An ERE matching a single
character enclosed in parentheses shall match the same as the ERE character enclosed in parentheses shall match the same as the ERE
without parentheses would have matched. without parentheses would have matched.
@@ -203,12 +203,12 @@ The following rules and definitions apply to bracket expressions:
range point is the starting range point of a subsequent range range point is the starting range point of a subsequent range
expression is undefined. expression is undefined.
The hyphen character shall be treated as itself if it occurs The hyphen (-) character shall be treated as itself if it occurs
first (after an initial ^, if any) or last in the list, or as first (after an initial ^, if any) or last in the list, or as
an ending range point in a range expression. As examples, the an ending range point in a range expression. As examples, the
expressions [-ac] and [ac-] are equivalent and match any of expressions [-ac] and [ac-] are equivalent and match any of
the characters a, c, or -; the expressions [^-ac] and [^ac-] the characters a, c, or -; the expressions [^-ac] and [^ac-]
are equivalent and match ant character except a, c, -; the are equivalent and match any character except a, c, or -; the
expression [%--] matches any of the characters between % and expression [%--] matches any of the characters between % and
- inclusive; the expression [--@] matches any of the - inclusive; the expression [--@] matches any of the
characters between - and @ inclusive; and the expression characters between - and @ inclusive; and the expression
@@ -240,7 +240,7 @@ characters from EREs matching a single character:
3) When an ERE matching a single character or an ERE enclosed in 3) When an ERE matching a single character or an ERE enclosed in
parentheses is followed by the special character question-mark parentheses is followed by the special character question-mark
(?), together with that question mark it shall match what zero (?), together with that question mark (?) it shall match what zero
or one consecutive occurrences of the ERE would match. For or one consecutive occurrences of the ERE would match. For
example, the ERE b?c matches the second character in the example, the ERE b?c matches the second character in the
string acabbbcde. string acabbbcde.
@@ -353,10 +353,10 @@ the command line with -DARRAY=nn, where 255 < nn < INT_MAX.
11. FILES 11. FILES
ag.c Obfuscated source ant.c Obfuscated source
ag.txt Manual for AG ant.txt Manual for AG
agag.c Unobfuscated source agag.c Unobfuscated source
test.mk Makefile test driver for AG. ant.test.mk Makefile test driver for AG.
12. BUGS 12. BUGS
+23
View File
@@ -999,6 +999,29 @@ not a misunderstanding).
# 1993 # 1993
### STATUS: INABIAF - please **DO NOT** fix
### Source code: [1993/ant/ant.c](1993/ant/ant.c)
### Information: [1993/ant/README.md](1993/ant/README.md)
The author stated that:
```
The expression `(a*)*` compiles but loops forever.
There is no check for trailing backslash (`\`) in the pattern.
There is no check for unbalanced brackets. Omitting a closing bracket
will generate a "Pattern too long" error, which is not the real error.
```
### STATUS: missing file - please provide it
The author wrote in the documentation file [ant.txt](1993/ant/ant.txt) that
there is a version of the code that is not obfuscated. This file, `agag.c` does
not exist in the archive. Do you have it? Please provide it!
### STATUS: known bug - please help us fix ### STATUS: known bug - please help us fix
### Source code: [1993/cmills/cmills.c](1993/cmills/cmills.c) ### Source code: [1993/cmills/cmills.c](1993/cmills/cmills.c)
### Information: [1993/cmills/README.md](1993/cmills/README.md) ### Information: [1993/cmills/README.md](1993/cmills/README.md)