GNU bug report logs -
#63225
Compiling regexp patterns (and REGEXP_CACHE_SIZE in search.c)
Previous Next
Full log
View this message in rfc822 format
Mattias EngdegÄrd <mattias.engdegard <at> gmail.com> writes:
>> Ideally, the compiler should do something similar to
>> what https://www.colm.net/open-source/ragel/ does.
>
> Yes, constructing a DFA would be more realistic when it's less in danger of being thrown away at any time.
I tried to look closer into regex-emacs.c and I note that the regexp
compiler basically generates a specialized bytecode to be executed by
regexp matcher later.
So, may the existing vector type be reused to store compiled regexp
pattern objects?
AFIU, pvec_type will need to have one more item and reader/printer will
need to be modified for a specialized print representation. The compiled
regexp itself will be stored as unibyte string, containing the
instructions.
This will also open a possibility to compile regexp patterns from Elisp,
if necessary.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
This bug report was last modified 2 years and 38 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.