Skip to content

Commit ae17644

Browse files
committed
prelude: introduce @1 ~ @9 and 1@ ~ 9@ procedures
Signed-off-by: Masatake YAMATO <[email protected]>
1 parent 19f854b commit ae17644

File tree

16 files changed

+37
-17
lines changed

16 files changed

+37
-17
lines changed

main/CommonPrelude.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,4 +178,24 @@ const char ctagsCommonPrelude []=
178178
" } forall\n"
179179
" dup true ne { pop pop false } if\n"
180180
"} __bddef\n"
181+
"\n"
182+
"% define @1 ~ @9.\n"
183+
"1 1 9 {\n"
184+
" dup\n"
185+
" mark (- @) 3 -1 roll ?0 add ( matchloc) _buildstring\n"
186+
" exch dup\n"
187+
" mark (@) 3 -1 roll ?0 add _buildstring cvn\n"
188+
" exch\n"
189+
" [ exch /start /_matchloc cvx ] cvx __bddef\n"
190+
"} for\n"
191+
"\n"
192+
"% define 1@ ~ 9@.\n"
193+
"1 1 9 {\n"
194+
" dup\n"
195+
" mark (- ) 3 -1 roll ?0 add (@ matchloc) _buildstring\n"
196+
" exch dup\n"
197+
" mark exch ?0 add (@) _buildstring cvn\n"
198+
" exch\n"
199+
" [ exch /end /_matchloc cvx ] cvx __bddef\n"
200+
"} for\n"
181201
;

main/CommonPrelude.ps

421 Bytes
Binary file not shown.

optlib/gperf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ static void initializeGPerfParser (const langType language)
4141
" (lookup-function-name) /lfunc\n"
4242
" (class-name) /class\n"
4343
" (string-pool-name) /strpool >> \\1 get\n"
44-
" 2 /start _matchloc\n"
44+
" @2\n"
4545
" _tag _commit pop\n"
4646
"}}", NULL);
4747
addLanguageTagMultiTableRegex (language, "main",
@@ -92,7 +92,7 @@ static void initializeGPerfParser (const langType language)
9292
" (lookup-function-name) /lfunc\n"
9393
" (class-name) /class\n"
9494
" (string-pool-name) /strpool >> \\1 get\n"
95-
" 2 /start _matchloc\n"
95+
" @2\n"
9696
" _tag _commit pop\n"
9797
"}}", NULL);
9898
addLanguageTagMultiTableRegex (language, "structdec",

optlib/gperf.ctags

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
(lookup-function-name) /lfunc
8585
(class-name) /class
8686
(string-pool-name) /strpool >> \1 get
87-
2 /start _matchloc
87+
@2
8888
_tag _commit pop
8989
}}
9090
--_mtable-regex-GPerf=structdec/[^\n]*\n//

optlib/man.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static void initializeManParser (const langType language)
2525
" /fill-end-of-scope {\n"
2626
" _scopetop pop exch\n"
2727
" % scope-top:int adjustment:int\n"
28-
" 1 /start _matchloc _matchloc2line exch\n"
28+
" @1 _matchloc2line exch\n"
2929
" % scope-top:int line adjustment:int\n"
3030
" 2 copy gt {\n"
3131
" sub end:\n"

optlib/man.ctags

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
/fill-end-of-scope {
6060
_scopetop pop exch
6161
% scope-top:int adjustment:int
62-
1 /start _matchloc _matchloc2line exch
62+
@1 _matchloc2line exch
6363
% scope-top:int line adjustment:int
6464
2 copy gt {
6565
sub end:

optlib/mesonOptions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ extern parserDefinition* MesonOptionsParser (void)
5656
" % \\2 may point a kind. This must be converted to a name from a string.\n"
5757
" \\2 cvn\n"
5858
" % Push the start position of the group 1.\n"
59-
" 1 /start _matchloc\n"
59+
" @1\n"
6060
" % To skip an unexpected kind name, _tag is wrapped with stopped.\n"
6161
" { _tag } stopped {\n"
6262
" % Unexpected kind. Clear the stack.\n"

optlib/mesonOptions.ctags

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
% \2 may point a kind. This must be converted to a name from a string.
3434
\2 cvn
3535
% Push the start position of the group 1.
36-
1 /start _matchloc
36+
@1
3737
% To skip an unexpected kind name, _tag is wrapped with stopped.
3838
{ _tag } stopped {
3939
% Unexpected kind. Clear the stack.

optlib/pod.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ extern parserDefinition* PodParser (void)
9292
"{{\n"
9393
" \\2\n"
9494
" kindTable \\1 tolevel get\n"
95-
" 2 /start _matchloc\n"
95+
" @2\n"
9696
" _tag _commit\n"
9797
" dup :line 1 sub \\1 tolevel scopePopUpTo\n"
9898
" _scopetop {\n"

optlib/pod.ctags

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
--regex-Pod=/^=head([1-4])[ \t]+(.+)//{{
8080
\2
8181
kindTable \1 tolevel get
82-
2 /start _matchloc
82+
@2
8383
_tag _commit
8484
dup :line 1 sub \1 tolevel scopePopUpTo
8585
_scopetop {

0 commit comments

Comments
 (0)