public final class ESExprMatcher
extends java.lang.Object
ESExpr
.
Matches expressions with patterns as-is, i.e. without normalization,
respecting expression structure.
Uses same Lisp-syntax notation for pattern specification, supports
several wildcards: %a
matches any atom including NIL
,
%s
matches any S-expression.Constructor and Description |
---|
ESExprMatcher(java.lang.String pattern)
Create new matcher for given pattern.
|
public ESExprMatcher(java.lang.String pattern)
pattern
- Lisp-syntax S-expression denoting pattern to matchjava.lang.IllegalArgumentException
- if pattern
is null
public boolean matches(ESExpr e)
true
if given expression matches this matcher.e
- S-expression to be checked for matchtrue
if given expression matchesjava.lang.IllegalArgumentException
- if e
is null