-
Notifications
You must be signed in to change notification settings - Fork 628
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3028 from masatake/makeTagEntryReflection-prepara…
…tion optscript: bug fix, new operators, refactoring
- Loading branch information
Showing
45 changed files
with
594 additions
and
161 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[/a /b /c] | ||
true | ||
true | ||
true | ||
false | ||
[1 true (abc)] | ||
true | ||
false | ||
true | ||
false | ||
true | ||
false |
Binary file not shown.
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
amember.ps...0 | ||
buildstring.ps...0 | ||
dedup.ps...0 | ||
dedup_spaces.ps...0 | ||
|
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ true | |
[/reference] | ||
true | ||
[/qualified /reference] | ||
false | ||
true | ||
[/X.foo] | ||
true | ||
[/reference /X.foo] |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--langdef=C10{base=C} | ||
--_prelude-C10={{ | ||
(prelude C10) == | ||
}} | ||
--_sequel-C10={{ | ||
(sequel C10) == | ||
}} | ||
|
||
|
||
--langdef=C11{base=C} | ||
--_prelude-C11={{ | ||
(prelude C11) == | ||
}} | ||
--_sequel-C11={{ | ||
(sequel C11) == | ||
}} | ||
|
||
--langdef=C20{base=C10} | ||
--_prelude-C20={{ | ||
(prelude C20) == | ||
}} | ||
--_sequel-C20={{ | ||
(sequel C20) == | ||
}} | ||
|
||
|
||
--langdef=C30{base=C20} | ||
--_prelude-C30={{ | ||
(prelude C30) == | ||
}} | ||
--_sequel-C30={{ | ||
(sequel C30) == | ||
}} |
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,33 @@ | ||
--langdef=CPreProcessor10{base=CPreProcessor} | ||
--_prelude-CPreProcessor10={{ | ||
(prelude CPreProcessor10) == | ||
}} | ||
--_sequel-CPreProcessor10={{ | ||
(sequel CPreProcessor10) == | ||
}} | ||
|
||
|
||
--langdef=CPreProcessor11{base=CPreProcessor} | ||
--_prelude-CPreProcessor11={{ | ||
(prelude CPreProcessor11) == | ||
}} | ||
--_sequel-CPreProcessor11={{ | ||
(sequel CPreProcessor11) == | ||
}} | ||
|
||
--langdef=CPreProcessor20{base=CPreProcessor10} | ||
--_prelude-CPreProcessor20={{ | ||
(prelude CPreProcessor20) == | ||
}} | ||
--_sequel-CPreProcessor20={{ | ||
(sequel CPreProcessor20) == | ||
}} | ||
|
||
|
||
--langdef=CPreProcessor30{base=CPreProcessor20} | ||
--_prelude-CPreProcessor30={{ | ||
(prelude CPreProcessor30) == | ||
}} | ||
--_sequel-CPreProcessor30={{ | ||
(sequel CPreProcessor30) == | ||
}} |
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,33 @@ | ||
--langdef=DTS10{base=DTS} | ||
--_prelude-DTS10={{ | ||
(prelude DTS10) == | ||
}} | ||
--_sequel-DTS10={{ | ||
(sequel DTS10) == | ||
}} | ||
|
||
|
||
--langdef=DTS11{base=DTS} | ||
--_prelude-DTS11={{ | ||
(prelude DTS11) == | ||
}} | ||
--_sequel-DTS11={{ | ||
(sequel DTS11) == | ||
}} | ||
|
||
--langdef=DTS20{base=DTS10} | ||
--_prelude-DTS20={{ | ||
(prelude DTS20) == | ||
}} | ||
--_sequel-DTS20={{ | ||
(sequel DTS20) == | ||
}} | ||
|
||
|
||
--langdef=DTS30{base=DTS20} | ||
--_prelude-DTS30={{ | ||
(prelude DTS30) == | ||
}} | ||
--_sequel-DTS30={{ | ||
(sequel DTS30) == | ||
}} |
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 @@ | ||
0 |
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 @@ | ||
/* EMPTY */ |
Empty file.
Empty file.
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,29 @@ | ||
# Copyright: 2021 Masatake YAMATO | ||
# License: GPL-2 | ||
|
||
CTAGS=$1 | ||
|
||
. ../utils.sh | ||
: && | ||
${CTAGS} --quiet --options=NONE\ | ||
--_prelude-C='{{ (enter C) == }}' \ | ||
--_sequel-C='{{ (leave C) == }}' \ | ||
--options=./args-c.ctags -o - input.c && | ||
${CTAGS} --quiet --options=NONE \ | ||
--_prelude-DTS='{{ (enter DTS) == }}' \ | ||
--_sequel-DTS='{{ (leave DTS) == }}' \ | ||
--options=./args-dts.ctags -o - input.dts && | ||
${CTAGS} --quiet --options=NONE --map-CPreProcessor=+.i \ | ||
--_prelude-CPreProcessor='{{ (enter CPreProcessor) == }}' \ | ||
--_sequel-CPreProcessor='{{ (leave CPreProcessor) == }}' \ | ||
--options=./args-cpreprocessor.ctags -o - input.i | ||
|
||
# | ||
# BUGS: The following two don't work because in-use marker is not set to | ||
# the subparsers of the CPreprocessor parser. The CPreprocessor parser must | ||
# mark in-use on its sub parsers to call the inputStart and inputEnd methods | ||
# in the foreachSubparser loop. | ||
# | ||
# ${CTAGS} --quiet --options=NONE --options=./args-cpreprocessor.ctags -o - input.c | ||
# ${CTAGS} --quiet --options=NONE --options=./args-cpreprocessor.ctags -o - input.dts | ||
# |
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,24 @@ | ||
(enter C) | ||
(prelude C10) | ||
(prelude C20) | ||
(prelude C30) | ||
(prelude C11) | ||
(sequel C30) | ||
(sequel C20) | ||
(sequel C10) | ||
(sequel C11) | ||
(leave C) | ||
(enter DTS) | ||
(prelude DTS10) | ||
(prelude DTS20) | ||
(prelude DTS30) | ||
(prelude DTS11) | ||
(sequel DTS30) | ||
(sequel DTS20) | ||
(sequel DTS10) | ||
(sequel DTS11) | ||
(leave DTS) | ||
ctags: Warning: Because of an internal limitation, Making a sub parser based on the CPreProcessor parser is not allowed: CPreProcessor | ||
ctags: Warning: Because of an internal limitation, Making a sub parser based on the CPreProcessor parser is not allowed: CPreProcessor | ||
(enter CPreProcessor) | ||
(leave CPreProcessor) |
Empty file.
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
Binary file not shown.
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 |
---|---|---|
|
@@ -83,3 +83,6 @@ efg | |
/B [0 1 2] | ||
>> ] | ||
>> ] | ||
char after metachar | ||
[97] | ||
[10] |
Binary file not shown.
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,11 @@ | ||
--sort=no | ||
--langdef=UnknownX | ||
--map-UnknownX=.unknown | ||
|
||
--kinddef-UnknownX=d,def,definitions | ||
|
||
--regex-UnknownX=/([ \t]*)def +([a-zA-Z]):/\2/d/{{ | ||
\1 length 5 gt { | ||
. _markplaceholder | ||
} if | ||
}} |
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,4 @@ | ||
a input.unknown /^def a:$/;" d | ||
b input.unknown /^ def b:$/;" d | ||
A input.unknown /^def A:$/;" d | ||
B input.unknown /^ def B:$/;" d |
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,6 @@ | ||
def a: | ||
def b: | ||
def c: | ||
def A: | ||
def B: | ||
def C: |
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,12 @@ | ||
--langdef=FOO | ||
--map-FOO=.foo | ||
--kinddef-FOO=d,def,definitions | ||
--_extradef-FOO=withprefix,name with prefix | ||
--extras-FOO=+{withprefix} | ||
--fields=+{extras} | ||
--regex-FOO=/def +([a-zA-Z]+)/\1/d/{{ | ||
mark (<prefix>) . :name _buildstring | ||
. :kind | ||
. _tagloc _tag _commit | ||
/FOO.withprefix _markextra | ||
}} |
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,4 @@ | ||
<prefix>x input.foo /^def x$/;" d extras:withprefix | ||
<prefix>y input.foo /^def y$/;" d extras:withprefix | ||
x input.foo /^def x$/;" d | ||
y input.foo /^def y$/;" d |
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,2 @@ | ||
def x | ||
def y |
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 |
---|---|---|
@@ -1,7 +1,35 @@ | ||
--langdef=X | ||
--map-X=.unknown | ||
--kinddef-X=d,def,definitions | ||
--kinddef-X=t,type,type definitions | ||
|
||
--_prelude-X={{ | ||
/typedict 5 dict def | ||
}} | ||
|
||
--regex-X=/^type[ ]+([A-Z]+)$/\1/t/{{ | ||
typedict \1 cvn . put | ||
}} | ||
|
||
# [string string] | ||
--regex-X=/def[ ]+([a-z]+)[ ]*:[ ]*([a-z]+)/\1/d/{{ | ||
. [ (typename) \2 ] typeref: | ||
. [ (postfix) \2 ] typeref: | ||
}} | ||
|
||
# string | ||
--regex-X=/def[ ]+<([a-z]+)>[ ]*([a-z]+)/\2/d/{{ | ||
. \1 typeref: | ||
}} | ||
|
||
# index | ||
--regex-X=/def[ ]+([A-Z]+)\^([a-z]+)/\2/d/{{ | ||
typedict \1 cvn known { | ||
. typedict \1 cvn get typeref: | ||
} if | ||
}} | ||
|
||
# false | ||
--regex-X=/def[ ]+([a-z]+)\^!([a-z]+)/\2/d/{{ | ||
. \1 typeref: | ||
. false typeref: | ||
}} |
Oops, something went wrong.