Common Lisp Package: CLAWK

README:

FUNCTION

Public

!~ (STR PAT)

Test if pattern isn't present in the string.

$#N (N)

Access a field, as a number.

$GSUB (PATTERN REPLACEMENT &OPTIONAL (SOURCE *CURLINE*))

Replaces all occurrences of pattern in the source string. Coerces its arguments to the appropriate type.

$MATCH (SOURCE PATTERN &OPTIONAL (START 0))

Scan for first occurrence of a pattern within the source string. Coerces its arguments to the appropriate type.

$N (N)

Access a field.

$SPLIT (&OPTIONAL (SOURCE NIL SOURCE-SUPPLIED-P) (FIELDSEP-PATTERN (FS)))

Split a string up into a list of multiple fields based on the field-separator pattern. Coerces its arguments to the appropriate type.

$SUB (PATTERN REPLACEMENT &OPTIONAL (SOURCE *CURLINE*))

Replace the first occurrence of pattern in the source string. Coerces its arguments to the appropriate type.

%N (N)

Access a register.

/~ (STR PAT)

Test if pattern isn't present in the string.

GSUB (PATTERN REPLACEMENT &OPTIONAL (SOURCE *CURLINE*))

Replace all occurrences of pattern in the source string.

MATCH (SOURCE PATTERN &OPTIONAL (START 0))

Scan for first occurrence of a pattern within the source string.

SPLIT (&OPTIONAL (SOURCE NIL NOT-SPLITTING-CURLINE) (FIELDSEP-PATTERN (FS)) INCLUDE-EMPTY-LEADING-AND-TRAILING-FIELDS)

Split a string up into a list of multiple fields based on the field-separator pattern.

SUB (PATTERN REPLACEMENT &OPTIONAL (SOURCE *CURLINE*))

Replace the first occurrence of pattern in the source string.

Undocumented

$* (&REST REST)

$+ (&REST REST)

$++ (&REST REST)

$- (&REST REST)

$/ (&REST REST)

$ARRAY

$ATAN2 (X Y)

$COS (X)

$DELETE (TBL &OPTIONAL (ELT NIL ELTP))

$EXP (Y)

$EXPT (X Y)

$FPRINT (STREAM &REST REST)

$IN (KEY TBL)

$INDEX (PAT STR &OPTIONAL (START 0))

$INT (X)

$LOG (X)

$PRINT (&REST REST)

$RAND

$REM (X Y)

$SIN (X)

$SQRT (X)

$SRAND (X)

$SUBSTR (STR START LEN)

INDEX (PAT STR &OPTIONAL (START 0))

INSTALL-REGEX-SYNTAX

SUBSTR (STR START LEN)

Private

GET-REG-STR (STR REGS N)

Access a register.

SIDE-EFFECT-FREE-P (EXP)

Is EXP a constant, variable, or function, or of the form (THE type x) where x is side-effect-free.

Undocumented

!= (X Y)

#/-reader (STRM SUBCHAR ARG)

#`-reader (STRM SUBCHAR ARG)

ASSOC-ARRAY-REF (TBL INDEX)

DO-$FPRINT (STREAM LST)

EXPAND-FOR-FILE-FIELDS (STRMVAR LINEVAR FIELDSPEC PATH BODY)

EXPAND-FOR-FILE-LINES (STREAMVAR LINEVAR PATH BODY)

EXPAND-FOR-STREAM-FIELDS (STRMVAR LINEVAR FIELDSPEC STREAM BODY &KEY (CURFILE-NAME STREAM CURFILE-NAME-P) &AUX (NEXTLBL (GENSYM)))

EXPAND-FOR-STREAM-LINES (STREAMVAR LINEVAR STREAM BODY &AUX (NEXTLBL (GENSYM)))

EXPAND-IF-MATCH (PAT STR POS CONSEQUENT ALTERNATIVE)

EXPAND-MATCH-CASE (STREXPR CLAUSES)

EXPAND-MATCH-CASE-CLAUSES (STREXPR CLAUSES)

EXPAND-MATCH-WHEN-CLAUSE (CLAUSE)

EXPAND-MATCH-WHEN-CONSEQUENT (CONSEQUENT)

EXPAND-WITH-FIELDS (FIELDS SOURCESTR FIELDSEP-PATTERN BODY)

EXPAND-WITH-MATCH (PAT FIELDS SOURCESTR BODY)

EXPAND-WITH-PATTERN (VAR STRPAT BODY)

EXPAND-WITH-PATTERNS (PATS BODY)

EXPAND-WITH-SUBMATCHES (FIELDS BODY)

EXTRACT-BEGIN-CLAUSES (CLAUSES)

EXTRACT-DOCS-AND-DECS (CLAUSES)

EXTRACT-END-CLAUSES (CLAUSES)

EXTRACT-PATTERN-CLAUSES (CLAUSES)

FS

INSTALL-CMD-SYNTAX

IS-SPECIAL-CLAUSE (CLAUSE TYPE)

MAKE-REGISTER-LIST (STR REGS)

STARTS-WITH (LST X)

SYMBOL-NAME-EQ (X Y)

MACRO

Public

IF-MATCH ((PAT STR &OPTIONAL (POS 0)) CONSEQUENT ALTERNATIVE)

Match the pattern to the string, and if it matches, bind the *RSTART*, *RLENGTH*, and *REGS* and evaluate the consequent, otherwise evaluate the alternative.

WITH-FIELDS ((&OPTIONAL FIELDS SOURCESTR (FIELDSEP-PATTERN '(FS))) &REST BODY)

Split the source string into fields based on the field separator, bind the field array to the fields variable.

WITH-MATCH ((&OPTIONAL FIELDS PAT SOURCESTR) &REST BODY)

Split the source string into registers based on the pattern, bind the register variables to the registers array.

WITH-PATTERNS (PATS &REST BODY)

Execute the body in an environment that includes the compiled patterns bound to their respective variables.

WITH-SUBMATCHES (&OPTIONAL FIELDS &REST BODY)

Bind the submatch variables to the corresponding strings from the registers array.

Undocumented

$AREF (TBL INDEX &REST OTHER-INDICES)

$FOR ((KEYVAR IN TBL) &REST BODY)

DEFAWK (NAME (&REST PARMS) &REST CLAUSES)

FOR-FILE-FIELDS ((PATH &OPTIONAL FIELDSPEC (STRMVAR (GENSYM)) (LINEVAR (GENSYM))) &REST BODY)

FOR-FILE-LINES ((PATH &OPTIONAL (STREAMVAR (GENSYM)) (LINEVAR (GENSYM))) &REST BODY)

FOR-STREAM-FIELDS ((STREAM &OPTIONAL FIELDSPEC (STRMVAR (GENSYM)) (LINEVAR (GENSYM))) &REST BODY)

FOR-STREAM-LINES ((STREAM &OPTIONAL (STRMVAR (GENSYM)) (LINEVAR (GENSYM))) &REST BODY)

MATCH-CASE (STREXPR &REST CLAUSES)

MATCH-WHEN (&REST CLAUSES)

WHEN-FILE-FIELDS ((PATH &OPTIONAL FIELDSPEC) &REST CLAUSES)

WHEN-STREAM-FIELDS ((STREAM &OPTIONAL FIELDSPEC) &REST CLAUSES)

Private

ONCE-ONLY (VARIABLES &REST BODY)

Returns the code built by BODY. If any of VARIABLES might have side effects, they are evaluated once and stored in temporary variables that are then passed to BODY.

GENERIC-FUNCTION

Public

~ (STR PAT)

Test if pattern matches the string.

Undocumented

$/= (X Y)

$< (X Y)

$<= (X Y)

$== (X Y)

$> (X Y)

$>= (X Y)

$LENGTH (X)

$MAX (X &REST REST)

$MIN (X &REST REST)

$ZEROP (X)

GET-MATCHER-FOR-PATTERN (PATTERN)

INT (X)

NUM (X)

STR (X)

Private

Undocumented

! (X)

VARIABLE

Public

Undocumented

*CURLINE*

*FIELDS*

*FNR*

*FS*

*NF*

*NR*

*REGS*

*REND*

*RLENGTH*

*RSTART*

*SUBSEP*

Private

Undocumented

*FS-IS-WS*

*OFS*

*ORS*

*RANDOM-STATES*

CONSTANT

Private

Undocumented

+WS-FIELDSEP-PAT+