-
Notifications
You must be signed in to change notification settings - Fork 622
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lregex: replace gnu_regex with Onigmo regex engine
Close #1861. In the much of cases, I hope there is no impact on existing optlib code using --regex-... option. If `r` regex flag is given, you can use extended features of Onigmo with ruby regex syntax. A demonstration of one of miracle features: ;; input.mylang (define (f1) 1) (define ((f2)) #t) (define (((f3))) "abc") --langdef=mylang --map-mylang=.mylang --kinddef-mylang=f,fun,function, function returing a function, or function returing a function returing function... --_fielddef-mylang=symbol,symbol binding to the function --fields-mylang={symbol} --regex-mylang=/\(define +(([-a-z0-9]+)|\(\g<1>\))/\1/f/r{_field=symbol:\2} See the r flag passed to --regex-mylang. (((f3))) input.mylang /^(define (((f3))) "abc")$/;" f symbol:f3 ((f2)) input.mylang /^(define ((f2)) #t)$/;" f symbol:f2 (f1) input.mylang /^(define (f1) 1)$/;" f symbol:f1 Look at the name of tags. The pairs of `(' and `)' are balanced well. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
- Loading branch information
Showing
13 changed files
with
91 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,7 @@ addons: | |
- gdb | ||
- valgrind | ||
- python3-docutils | ||
- libtool | ||
|
||
env: | ||
- TARGET=Unix | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--langdef=mylang | ||
--map-mylang=.mylang | ||
--kinddef-mylang=f,fun,function, function returing a function, or function returing a function returing function... | ||
--_fielddef-mylang=symbol,symbol binding to the function | ||
--fields-mylang={symbol} | ||
--regex-mylang=/\(define +(([-a-z0-9]+)|\(\g<1>\))/\1/f/r{_field=symbol:\2} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(((f3))) input.mylang /^(define (((f3))) "abc")$/;" f symbol:f3 | ||
((f2)) input.mylang /^(define ((f2)) #t)$/;" f symbol:f2 | ||
(f1) input.mylang /^(define (f1) 1)$/;" f symbol:f1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(define (f1) 1) | ||
(define ((f2)) #t) | ||
(define (((f3))) "abc") | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -748,6 +748,8 @@ AC_CONFIG_FILES([Makefile | |
man/ctags-optlib.7.rst | ||
]) | ||
|
||
AC_CONFIG_SUBDIRS([Onigmo]) | ||
|
||
AC_OUTPUT | ||
|
||
# vim:ts=4:sw=4: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters