-O, --lenient sets the regcomp(3) REG_LENIENT flag
in general if REG_LENIENT is on then certain constructs marked
"unspecified" in the standard will be accepted, otherwise they
may produce regcomp(3) errors

e.g.

invalid \char escape

        grep -S '\#' <<<'#'

invalid [...] range endpoint

        grep -S '[a-q-z]' <<<'a'

the intention (theory) is that RE's that make it through -S, --strict 
will make it through all conformant implementations

as counterexamples roll in I tweak libast/reg*.c to make pratice match theory

On Thu, 4 Mar 2010 15:51:05 +0100 =?KOI8-R?B?z8zYx8Egy9LZ1sHOz9fTy8HR?= wrote:
> What is the difference between lenient (-O) and strict pattern (-S)
> interpretation in AST grep?

_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to