From ce1868d707b0f0338a93057d017252c98e50e15d Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 15 Jan 2021 12:40:19 -0800 Subject: Added support for `bp -p 'foo: "xx"; baz; baz: foo'` --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index f90b62d..650fb53 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,6 @@ It's written in pure C with no dependencies. * `-e` `--explain` print an explanation of the matches * `-j` `--json` print matches as JSON objects * `-l` `--list-files` print only filenames containing matches -* `-d` `--define :` define a grammar rule -* `-D` `--define-string :` define a grammar rule (string-pattern) * `-p` `--pattern ` provide a pattern (equivalent to `bp '\()'`) * `-P` `--pattern-string ` provide a string pattern (equivalent to `bp ''`, but may be useful if `''` begins with a '-') * `-r` `--replace ` replace the input pattern with the given replacement @@ -63,6 +61,7 @@ Pattern | Meaning `(pat1 @keep=pat2) => "@keep"` | Match `pat1` followed by `pat2` and replace it with the text of `pat2` `pat1==pat2` | `pat1`, assuming `pat2` also matches with the same length `pat1!=pat2` | `pat1`, unless `pat2` also matches with the same length +`name:pat2` | `name` is defined to mean `pat` `#( block comment )#` | A block comment `# line comment` | A line comment -- cgit v1.2.3