ERights Home enative 
Back to: ENative: Compiling Expressions x No Next Sibling

Compiling Patterns


Not yet formatted, edited, or made readable

But does contain useful content. Proceed at your own risk.

PatternTuple XXX (replace with ListPattern & CdrPattern)

"["subs*, "]" ("+" optRest)?

Is the specimen a list at least as long, and does each of the first N
elements match the corresponding sub-pattern?  If there's an optRest,
does it match a list of the remaining elements?  If there's no
optRest, does the list have the same number of elements?

Object visitPatternTuple(Pattern[] subs, Pattern optRest);
 
 

IgnorePattern

"_"

Matches anything, binds nothing.

Object visitIgnorePattern();
 
 

SuchThatPattern

patt "?" test

Does patt match the specimen?  And does test evaluate to true?

Object visitSuchThatPattern(Pattern patt, EExpr test);

 

 
Unless stated otherwise, all text on this page which is either unattributed or by Mark S. Miller is hereby placed in the public domain.
ERights Home enative 
Back to: ENative: Compiling Expressions x No Next Sibling
Download    FAQ    API    Mail Archive    Donate

report bug (including invalid html)

Golden Key Campaign Blue Ribbon Campaign