From 09b86ec674094f0af87d3b669faee6601a148225 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Thu, 9 Nov 2023 11:47:24 -0800 Subject: [PATCH] Format/typo check 1993/ant Format/typo check README.md. Format/typo check ant.txt. I kept the terms the same like 'period' for '.' as I believe that's the way it is in POSIX (even though I'd prefer dot or full stop). I added in parentheses some symbols where they were missing and there was a typo here and there. I was considering adding 's round some characters to make things stand out a bit better but I did not do that. If that's useful it can be done another time. The bugs.md has been updated as well, both with INABIAF and missing file statuses. I believe that this completes 1993/ant the 's idea noted above notwithstanding. --- 1993/ant/README.md | 19 +++++++++++++++---- 1993/ant/ant.txt | 16 ++++++++-------- bugs.md | 23 +++++++++++++++++++++++ 3 files changed, 46 insertions(+), 12 deletions(-) diff --git a/1993/ant/README.md b/1993/ant/README.md index 8971398a0..51fc7693e 100644 --- a/1993/ant/README.md +++ b/1993/ant/README.md @@ -4,6 +4,16 @@ 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: @@ -23,8 +33,8 @@ make -f ant.test.mk ## Judges' remarks: -See the author's POSIX P1003.2-like documentation file ant.txt for more -information. +See the author's POSIX P1003.2-like documentation file [ant.txt](ant.txt) for +more information. 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: -- "Lengthy" POSIX.2 style specification and manual :) :)\ +- "Lengthy" POSIX.2 style specification and manual :) :) - 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. - Code tested on a variety of platforms. - Make driven test script. - Can be compiled with ANSI or K&R C. - 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: diff --git a/1993/ant/ant.txt b/1993/ant/ant.txt index c68cd843d..009e2cf24 100644 --- a/1993/ant/ant.txt +++ b/1993/ant/ant.txt @@ -91,7 +91,7 @@ None. 7.1.1. MATCHING A SINGLE CHARACTER 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 character enclosed in parentheses shall match the same as the ERE 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 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 an ending range point in a range expression. As examples, the expressions [-ac] and [ac-] are equivalent and match any of - the characters a, c, or -; the expressions [^-ac] and [^ac-] - are equivalent and match ant character except a, c, -; the + the characters a, c, or -; the expressions [^-ac] and [^ac-] + are equivalent and match any character except a, c, or -; the expression [%--] matches any of the characters between % and - inclusive; the expression [--@] matches any of the 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 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 example, the ERE b?c matches the second character in the string acabbbcde. @@ -353,10 +353,10 @@ the command line with -DARRAY=nn, where 255 < nn < INT_MAX. 11. FILES -ag.c Obfuscated source -ag.txt Manual for AG +ant.c Obfuscated source +ant.txt Manual for AG agag.c Unobfuscated source -test.mk Makefile test driver for AG. +ant.test.mk Makefile test driver for AG. 12. BUGS diff --git a/bugs.md b/bugs.md index 1eb99916c..a86373856 100644 --- a/bugs.md +++ b/bugs.md @@ -999,6 +999,29 @@ not a misunderstanding). # 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 ### Source code: [1993/cmills/cmills.c](1993/cmills/cmills.c) ### Information: [1993/cmills/README.md](1993/cmills/README.md)