Skip to content

Commit 755dfa2

Browse files
committed
XS: new parrser
Signed-off-by: Masatake YAMATO <[email protected]>
1 parent aec0a1d commit 755dfa2

File tree

20 files changed

+863
-12
lines changed

20 files changed

+863
-12
lines changed

Tmain/extras-long.d/run.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,27 @@
33

44
CTAGS=$1
55

6+
ignore_pcre2()
7+
{
8+
grep -v 'XS'
9+
}
10+
611
echo '# resetting'
712
${CTAGS} --quiet --options=NONE --with-list-header=no \
8-
--extras='{subparser}' --list-extras
13+
--extras='{subparser}' --list-extras | ignore_pcre2
914

1015
echo '# enabling 1'
1116
${CTAGS} --quiet --options=NONE --with-list-header=no \
12-
--extras=+'{pseudo}' --list-extras
17+
--extras=+'{pseudo}' --list-extras | ignore_pcre2
1318

1419
echo '# disabling 1'
1520
${CTAGS} --quiet --options=NONE --with-list-header=no \
16-
--extras=-'{fileScope}' --list-extras
21+
--extras=-'{fileScope}' --list-extras | ignore_pcre2
1722

1823
echo '# combination'
1924
${CTAGS} --quiet --options=NONE --with-list-header=no \
20-
--extras=-'{fileScope}+{inputFile}{reference}' --list-extras
25+
--extras=-'{fileScope}+{inputFile}{reference}' --list-extras | ignore_pcre2
2126

2227
echo '# combination with letters'
2328
${CTAGS} --quiet --options=NONE --with-list-header=no \
24-
--extras=-'{fileScope}+p{inputFile}q{reference}-f' --list-extras
29+
--extras=-'{fileScope}+p{inputFile}q{reference}-f' --list-extras | ignore_pcre2

Tmain/list-extras.d/run.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33

44
CTAGS=$1
55

6-
${CTAGS} --quiet --options=NONE --extras='*' --with-list-header --list-extras
7-
${CTAGS} --quiet --options=NONE --extras='*' --with-list-header --machinable --list-extras
8-
${CTAGS} --quiet --options=NONE --extras= --with-list-header --list-extras=NONE
6+
ignore_pcre2()
7+
{
8+
grep -v XS
9+
}
10+
11+
${CTAGS} --quiet --options=NONE --extras='*' --with-list-header --list-extras | ignore_pcre2
12+
${CTAGS} --quiet --options=NONE --extras='*' --with-list-header --machinable --list-extras | ignore_pcre2
13+
${CTAGS} --quiet --options=NONE --extras= --with-list-header --list-extras=NONE | ignore_pcre2

Tmain/list-roles.d/run.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ ignore_yaml()
2323
grep -v 'Yaml'
2424
}
2525

26+
ignore_pcre2()
27+
{
28+
grep -v 'XS'
29+
}
30+
2631
# When introducing newly rewritten parser, we would like to provide
2732
# the both new parser and old parser for debugging and providing
2833
# migration period to users. In such case the prefix "Old" will be
@@ -34,16 +39,16 @@ ignore_old()
3439
}
3540

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'
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--sort=no
2+
--extras-XS=-{noprefix}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
X input.xs /^MODULE = X PACKAGE = X PREFIX = xyz_$/;" m
2+
X input.xs /^MODULE = X PACKAGE = X PREFIX = xyz_$/;" p module:X
3+
xyz_f input.xs /^xyz_f(dbtype)$/;" f package:X.X typeref:typename:void
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pcre2
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
MODULE = X PACKAGE = X PREFIX = xyz_
2+
3+
void
4+
xyz_f(dbtype)
5+
char * dbtype

Units/parser-xs.r/pod.d/args.ctags

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
--sort=no
2+
--extras=+g
3+
--fields=+Sl
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
XS::Typemap input.xs /^MODULE = XS::Typemap PACKAGE = XS::Typemap$/;" m language:XS
2+
XS::Typemap input.xs /^MODULE = XS::Typemap PACKAGE = XS::Typemap$/;" p language:XS module:XS::Typemap
3+
T_SV input.xs /^T_SV( sv )$/;" f language:XS package:XS::Typemap.XS::Typemap typeref:typename:SV * signature:(SV * sv)
4+
T_SVREF input.xs /^T_SVREF( svref )$/;" f language:XS package:XS::Typemap.XS::Typemap typeref:typename:SVREF signature:(SVREF svref)
5+
intArrayPtr input.xs /^intArray * intArrayPtr( int nelem ) {$/;" f language:C typeref:typename:intArray * signature:(int nelem)
6+
TYPEMAPS input.xs /^=head1 TYPEMAPS$/;" c language:Pod

Units/parser-xs.r/pod.d/features

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pcre2

0 commit comments

Comments
 (0)