diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2023-11-27 14:20:43 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2023-11-27 14:20:43 -0500 |
| commit | 3a728b28df662af9ad588a9a95c94ce030a3f4dd (patch) | |
| tree | 4e89eab75c0744e28d3748bb2b029b21ad9038dc /bp.c | |
| parent | e6e482054de77f3fe5d65344da86065373cf5f23 (diff) | |
Fix "-w" flag and fix optimization for skipping to match
Diffstat (limited to 'bp.c')
| -rw-r--r-- | bp.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -599,7 +599,7 @@ int main(int argc, char *argv[]) errx(EXIT_FAILURE, "Couldn't find grammar: %s", flag); defs = load_grammar(defs, f); // Keep in memory for debug output } else if (FLAG("-w") || FLAG("--word")) { - require(asprintf(&flag, "\\|%s\\|", flag), "Could not allocate memory"); + require(asprintf(&flag, "{|}%s{|}", flag), "Could not allocate memory"); file_t *arg_file = spoof_file(&loaded_files, "<word pattern>", flag, -1); delete(&flag); pat_t *p = assert_pat(arg_file->start, arg_file->end, bp_stringpattern(arg_file->start, arg_file->end)); |
