Skip to content

Commit da4af9c

Browse files
committed
Texinfo: new parser
Signed-off-by: Masatake YAMATO <[email protected]>
1 parent dbeed62 commit da4af9c

File tree

17 files changed

+741
-25
lines changed

17 files changed

+741
-25
lines changed

Tmain/list-params.d/run.sh

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
CTAGS=$1
55
C="${CTAGS} --quiet --options=NONE"
66

7+
ignore_pcre2()
8+
{
9+
grep -v Texinfo
10+
}
11+
12+
{
713
echo '# ALL'
814
${C} --with-list-header=yes --list-params
915
echo
@@ -31,3 +37,4 @@ echo
3137
echo '# CPP MACHINABLE NOHEADER + PARAM DEFINE WITH CMDLINE'
3238
${C} --_paramdef-CPreProcessor='pragma,handle program' --with-list-header=no --machinable --list-params=CPreProcessor
3339
echo
40+
} | ignore_pcre2

Tmain/list-roles-with-kind-names.d/run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ echo '{header}'
77
${CTAGS} --list-roles=all.'{header}'
88

99
echo '{header}I'
10-
${CTAGS} --list-roles=all.'{header}I'
10+
${CTAGS} --machinable=yes --list-roles=all.'{header}I' | grep -v Texinfo
1111

1212
echo 'd{header}'
1313
${CTAGS} --list-roles=all.'d{header}'

Tmain/list-roles-with-kind-names.d/stdout-expected.txt

+20-20
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,26 @@ OldC++ h/header system on system header
1515
Vera h/header local on local header
1616
Vera h/header system on system header
1717
{header}I
18-
#LANGUAGE KIND(L/N) NAME ENABLED DESCRIPTION
19-
C h/header local on local header
20-
C h/header system on system header
21-
C++ h/header local on local header
22-
C++ h/header system on system header
23-
CPreProcessor h/header local on local header
24-
CPreProcessor h/header system on system header
25-
CUDA h/header local on local header
26-
CUDA h/header system on system header
27-
Flex I/import import on imports
28-
M4 I/macrofile included on included macro
29-
M4 I/macrofile sincluded on silently included macro
30-
Make I/makefile included on included
31-
Make I/makefile optional on optionally included
32-
OldC h/header local on local header
33-
OldC h/header system on system header
34-
OldC++ h/header local on local header
35-
OldC++ h/header system on system header
36-
Vera h/header local on local header
37-
Vera h/header system on system header
18+
#LANGUAGE KIND(L/N) NAME ENABLED DESCRIPTION
19+
C h/header local on local header
20+
C h/header system on system header
21+
C++ h/header local on local header
22+
C++ h/header system on system header
23+
CPreProcessor h/header local on local header
24+
CPreProcessor h/header system on system header
25+
CUDA h/header local on local header
26+
CUDA h/header system on system header
27+
Flex I/import import on imports
28+
M4 I/macrofile included on included macro
29+
M4 I/macrofile sincluded on silently included macro
30+
Make I/makefile included on included
31+
Make I/makefile optional on optionally included
32+
OldC h/header local on local header
33+
OldC h/header system on system header
34+
OldC++ h/header local on local header
35+
OldC++ h/header system on system header
36+
Vera h/header local on local header
37+
Vera h/header system on system header
3838
d{header}
3939
#LANGUAGE KIND(L/N) NAME ENABLED DESCRIPTION
4040
Automake d/directory data on directory for DATA primary

Tmain/list-roles.d/run.sh

+8-3
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,22 @@ ignore_old()
3333
grep -v '^Old'
3434
}
3535

36+
ignore_pcre2()
37+
{
38+
grep -v '^Texinfo'
39+
}
40+
3641
title ''
37-
${CTAGS} --quiet --options=NONE --list-roles= | ignore_xml | ignore_old | ignore_yaml
42+
${CTAGS} --quiet --options=NONE --list-roles= | ignore_xml | ignore_old | ignore_yaml | ignore_pcre2
3843

3944
title 'all.*'
40-
${CTAGS} --quiet --options=NONE --list-roles='all.*' | ignore_xml | ignore_old | ignore_yaml
45+
${CTAGS} --quiet --options=NONE --list-roles='all.*' | ignore_xml | ignore_old | ignore_yaml | ignore_pcre2
4146

4247
title 'C.*'
4348
${CTAGS} --quiet --options=NONE --list-roles='C.*'
4449

4550
title 'all.d'
46-
${CTAGS} --quiet --options=NONE --list-roles='all.d' | ignore_xml | ignore_old | ignore_yaml
51+
${CTAGS} --quiet --options=NONE --list-roles='all.d' | ignore_xml | ignore_old | ignore_yaml | ignore_pcre2
4752

4853
title 'Sh.s'
4954
${CTAGS} --quiet --options=NONE --list-roles='Sh.s'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--sort=no
2+
--extras=+g
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
exec input.texi /^(defun exec (cmd)$/;" f
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pcre2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@lisp
2+
(defun exec (cmd)
3+
...)
4+
@end lisp
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
--sort=no
2+
--extras=+g
3+
--param-Texinfo.LispLang=Scheme
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
exec input.texi /^(define (exec cmd)$/;" f
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pcre2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@lisp
2+
(define (exec cmd)
3+
...)
4+
@end lisp

docs/news.rst

+1
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,7 @@ The following parsers have been added:
478478
* TerraformVariables *optlib*
479479
* Thrift *peg/packcc*
480480
* TTCN
481+
* Texinfo *optlib pcre2*
481482
* Txt2tags
482483
* TypeScript
483484
* Varlink *peg/packcc*

main/parsers_p.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848

4949
#ifdef HAVE_PCRE2
5050
#define OPTLIB2C_PCRE2_PARSER_LIST \
51-
RDocParser
51+
RDocParser, \
52+
TexinfoParser
5253
#else
5354
#define OPTLIB2C_PCRE2_PARSER_LIST
5455
#endif

0 commit comments

Comments
 (0)