Remove obsolete stuffs
This commit is contained in:
90
bin/notepad++/functionList/ada.xml
Normal file
90
bin/notepad++/functionList/ada.xml
Normal file
@@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!--
|
||||
| Complies to ADA 2022
|
||||
| http://www.ada-auth.org/standards/overview22.html
|
||||
| Based on:
|
||||
| http://stackoverflow.com/questions/32126855/notepad-and-ada
|
||||
\-->
|
||||
<parser
|
||||
displayName="ADA"
|
||||
id ="ada_syntax"
|
||||
commentExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
(?m-s:-{2}.*?$) # Single Line Comment
|
||||
"
|
||||
>
|
||||
<function
|
||||
mainExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
^\h* # optional leading whitespace at start-of-line
|
||||
(?:
|
||||
(?i:function)
|
||||
\s+
|
||||
(?'VALID_ID' # valid identifier, use as subroutine
|
||||
\b(?!(?i: # keywords (case-insensitive), not to be used as identifier
|
||||
a(?:b(?:ort|s(?:tract)?)|cce(?:pt|ss)|l(?:iased|l)|nd|rray|t)
|
||||
| b(?:egin|ody)
|
||||
| c(?:ase|onstant)
|
||||
| d(?:eclare|el(?:ay|ta)|igits|o)
|
||||
| e(?:ls(?:e|if)|n(?:d|try)|x(?:ception|it))
|
||||
| f(?:or|unction)
|
||||
| g(?:eneric|oto)
|
||||
| i(?:[fs]|n(?:terface)?)
|
||||
| l(?:imited|oop)
|
||||
| mod
|
||||
| n(?:ew|ot|ull)
|
||||
| o(?:[fr]|thers|ut|verriding)
|
||||
| p(?:a(?:ckage|rallel)|r(?:agma|ivate|o(?:cedure|tected)))
|
||||
| r(?:a(?:is|ng)e|e(?:cord|m|names|queue|turn|verse))
|
||||
| s(?:e(?:lect|parate)|ome|ubtype|ynchronized)
|
||||
| t(?:a(?:gged|sk)|erminate|hen|ype)
|
||||
| u(?:ntil|se)
|
||||
| w(?:h(?:en|ile)|ith)
|
||||
| xor
|
||||
)\b)
|
||||
[[:alpha:]](?:[\w.]*[[:alnum:]])? # valid character combination for identifiers
|
||||
)
|
||||
(?'PARAMETERS'
|
||||
\s*
|
||||
\( # start-of-parameters indicator
|
||||
[^()]* # parameters
|
||||
\) # end-of-parameters indicator
|
||||
)? # parentheses and parameters optional
|
||||
\s*
|
||||
(?:return # function returns a value with...
|
||||
\s+(?&VALID_ID) # ...type-name
|
||||
)?
|
||||
|
|
||||
(?i:procedure)
|
||||
\s+(?&VALID_ID)
|
||||
(?&PARAMETERS)?
|
||||
)
|
||||
\s*(?i:\bis\b|;) # end-of-definition indicator
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
(?:function|procedure)\s+
|
||||
\K # discard text matched so far
|
||||
[[:alpha:]](?:[\w.]*[[:alnum:]])?
|
||||
(?:\s*\([^()]*\))? # parentheses and parameters optional
|
||||
(?=
|
||||
\s*
|
||||
(?:\breturn|\bis|;)
|
||||
)
|
||||
"
|
||||
/>
|
||||
<!-- comment out the following node to display the method with its parameters -->
|
||||
<!-- <nameExpr expr="[[:alpha:]](?:[\w.]*[[:alnum:]])?" /> -->
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
30
bin/notepad++/functionList/asm.xml
Normal file
30
bin/notepad++/functionList/asm.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ==================================================== [ Assembly ] -->
|
||||
|
||||
<parser
|
||||
displayName="Assembly"
|
||||
id ="assembly_subroutine"
|
||||
commentExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?m-s:;.*$) # Single Line Comment
|
||||
"
|
||||
>
|
||||
<function
|
||||
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?m)^\h* # optional leading whitespace
|
||||
\K # keep the text matched so far, out of the overall match
|
||||
[A-Za-z_$][\w$]* # valid character combination for labels
|
||||
(?=:) # up till the colon
|
||||
"
|
||||
/>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
41
bin/notepad++/functionList/autoit.xml
Normal file
41
bin/notepad++/functionList/autoit.xml
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ===================================================== [ AutoIt3 ] -->
|
||||
|
||||
<!--
|
||||
| Based on:
|
||||
| https://sourceforge.net/p/notepad-plus/discussion/331753/thread/5d9bb881/#e86e
|
||||
\-->
|
||||
<parser
|
||||
displayName="AutoIt3"
|
||||
id ="autoit3_function"
|
||||
commentExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?is:\x23cs.*?\x23ce) # Multi Line Comment
|
||||
| (?m-s:^\h*;.*?$) # Single Line Comment
|
||||
"
|
||||
>
|
||||
<function
|
||||
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?m)^\h* # optional leading whitespace
|
||||
(?i:FUNC\s+) # start-of-function indicator
|
||||
\K # keep the text matched so far, out of the overall match
|
||||
[A-Za-z_]\w* # valid character combination for identifiers
|
||||
\s*\([^()]*?\) # parentheses required, parameters optional
|
||||
"
|
||||
>
|
||||
<!-- comment out the following node to display the function with its parameters -->
|
||||
<functionName>
|
||||
<nameExpr expr="[A-Za-z_]\w*" />
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
183
bin/notepad++/functionList/baanc.xml
Normal file
183
bin/notepad++/functionList/baanc.xml
Normal file
@@ -0,0 +1,183 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ======================================================= [ BaanC ] -->
|
||||
|
||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
| Based on:
|
||||
| https://notepad-plus-plus.org/community/topic/14494/functionlist-classrange-question
|
||||
|
|
||||
| Note(s):
|
||||
| 1. Boost::Regex 1.58-1.59 do not correctly handle quantifiers on subroutine calls
|
||||
| therefore the additional non-capturing group i.e. "(?:(?&COMMENT))?" instead
|
||||
| of simply "(?&COMMENT)?"
|
||||
\-->
|
||||
<parser
|
||||
displayName="BaanC Sections"
|
||||
id ="baanc_section"
|
||||
>
|
||||
<classRange
|
||||
mainExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
(?im) # case-insensitive, ^ and $ match at line breaks
|
||||
(?(DEFINE) # definition of sub-routines
|
||||
(?'SECTION'
|
||||
^\h* # optional leading whitespace at start-of-line
|
||||
(?: # known section names
|
||||
(?:after|before)\.(?:report\.\d+|\w+(?:\.\w+)*\.\d+)
|
||||
| (?:field|zoom\.from)\.(?:all|other|\w+(?:\.\w+)*)
|
||||
| (?:footer|group|header)\.\d+
|
||||
| choice\.\w+(?:\.\w+)*
|
||||
| detail\.\d+
|
||||
| form\.(?:all|other|\d+)
|
||||
| functions
|
||||
| main\.table\.io
|
||||
): # end-of-section-header indicator
|
||||
)
|
||||
(?'SECTION_EMPTY'
|
||||
^\h* # optional leading whitespace at start-of-line
|
||||
(?: # known `empty` section names
|
||||
after\.(?:form\.read|program|receive\.data|update\.db\.commit)
|
||||
| before\.(?:(?:display|new)\.object|program)
|
||||
| declaration
|
||||
| on\.(?:display\.total\.line|error)
|
||||
): # end-of-section-header indicator
|
||||
)
|
||||
)
|
||||
(?&SECTION) # section header
|
||||
(?s:.*?) # whatever,
|
||||
(?= # ...up till
|
||||
\s*
|
||||
(?:
|
||||
(?&SECTION) # ...next section header,
|
||||
| (?&SECTION_EMPTY) # ...next `empty` section header
|
||||
| \Z # ...or end-of-text
|
||||
)
|
||||
)
|
||||
"
|
||||
>
|
||||
<className>
|
||||
<nameExpr expr="^\h*\K\w+(?:\.\w+)*:" />
|
||||
</className>
|
||||
<function
|
||||
mainExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
(?im) # case-insensitive, ^ and $ match at line breaks
|
||||
(?(DEFINE) # definition of sub-routines
|
||||
(?'COMMENT'
|
||||
\s*\x7C[^\r\n]* # trailing comment
|
||||
(?: # optional subsequent comment
|
||||
(?:\r?\n|\n?\r) # - mandatory line-break
|
||||
\s*\x7C[^\r\n]* # - `trailing` comment
|
||||
)*
|
||||
)
|
||||
)
|
||||
^\h* # optional leading whitespace at start-of-line
|
||||
(?:
|
||||
\K # discard text matched so far
|
||||
(?: # known sub-section names
|
||||
after\.(?:choice|d(?:elete|isplay)|f(?:ield|orm)|group|input|layout|re(?:ad|write)|skip\.(?:delete|(?:re)?write)|write|zoom)
|
||||
| before\.(?:ch(?:ecks|oice)|d(?:elete|isplay)|f(?:ield|orm)|group|input|layout|print|re(?:ad|write)|write|zoom)
|
||||
| check\.input
|
||||
| domain\.error
|
||||
| init\.(?:f(?:ield|orm)|group)
|
||||
| on\.(?:choice|e(?:ntry|xit)|input)
|
||||
| read\.view
|
||||
| ref\.(?:display|input)
|
||||
| selection\.filter
|
||||
| when\.field\.changes
|
||||
): # end-of-sub-section-header indicator
|
||||
|
|
||||
function # keyword, start-of-function-header indicator
|
||||
(?:(?&COMMENT))? # optional `embedded` comment
|
||||
(?: # optional storage-class specifier
|
||||
\s+extern
|
||||
(?:(?&COMMENT))? # ...with optional `embedded` comment
|
||||
)?
|
||||
(?: # optional function type specifier
|
||||
\s+(?:
|
||||
boolean
|
||||
| double
|
||||
| long
|
||||
| string
|
||||
| void
|
||||
| domain
|
||||
(?:(?&COMMENT))? # ...with optional `embedded` comment
|
||||
\s+\w+(?:\.\w+)*
|
||||
)
|
||||
(?:(?&COMMENT))? # ...with optional `embedded` comment
|
||||
)?
|
||||
\s+
|
||||
\K # discard text matched so far
|
||||
\w+(?:\.\w+)* # function identifier
|
||||
(?:(?&COMMENT)(?:\r?\n|\n?\r))? # optional `embedded` comment
|
||||
\s*\( # start-of-parameter-list indicator
|
||||
)
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<funcNameExpr expr="\w+(?:\.\w+)*(?:\h*:)?" />
|
||||
</functionName>
|
||||
</function>
|
||||
</classRange>
|
||||
<function
|
||||
mainExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
(?im) # case-insensitive, ^ and $ match at line breaks
|
||||
(?(DEFINE) # definition of sub-routines
|
||||
(?'COMMENT'
|
||||
\s*\x7C[^\r\n]* # trailing comment
|
||||
(?: # optional subsequent comment
|
||||
(?:\r?\n|\n?\r) # - mandatory line-break
|
||||
\s*\x7C[^\r\n]* # - `trailing` comment
|
||||
)*
|
||||
)
|
||||
)
|
||||
^\h* # optional leading whitespace at start-of-line
|
||||
(?:
|
||||
\K # discard text matched so far
|
||||
(?: # known `empty` section names
|
||||
after\.(?:form\.read|program|receive\.data|update\.db\.commit)
|
||||
| before\.(?:display\.object|new\.object|program)
|
||||
| declaration
|
||||
| on\.(?:display\.total\.line|error)
|
||||
): # end-of-section-header indicator
|
||||
|
|
||||
function # keyword, start-of-function-header indicator
|
||||
(?:(?&COMMENT))? # optional `embedded` comment
|
||||
(?: # optional storage-class specifier
|
||||
\s+extern
|
||||
(?:(?&COMMENT))? # ...with optional `embedded` comment
|
||||
)?
|
||||
(?: # optional function type specifier
|
||||
\s+(?:
|
||||
boolean
|
||||
| double
|
||||
| long
|
||||
| string
|
||||
| void
|
||||
| domain
|
||||
(?:(?&COMMENT))? # ...with optional `embedded` comment
|
||||
\s+\w+(?:\.\w+)*
|
||||
)
|
||||
(?:(?&COMMENT))? # ...with optional `embedded` comment
|
||||
)?
|
||||
\s+
|
||||
\K # discard text matched so far
|
||||
\w+(?:\.\w+)* # function identifier
|
||||
(?:(?&COMMENT)(?:\r?\n|\n?\r))? # optional `embedded` comment
|
||||
\s*\( # start-of-parameter-list indicator
|
||||
)
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr="\w+(?:\.\w+)*(?:\h*:)?" />
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
67
bin/notepad++/functionList/bash.xml
Normal file
67
bin/notepad++/functionList/bash.xml
Normal file
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ======================================================== [ Bash ] -->
|
||||
<!-- BASH - Bourne-Again Shell -->
|
||||
|
||||
<parser
|
||||
displayName="Bash"
|
||||
id ="bash_function"
|
||||
commentExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?-s:(?:^\x23[^!]|^\h*\x23|\h+\x23).*$) # Single Line Comment
|
||||
| (?s:\x22(?:[^\x22\x5C]|\x5C.)*\x22) # String Literal - Double Quoted
|
||||
| (?s:\x27[^\x27]*\x27) # String Literal - Single Quoted
|
||||
| (?s: # Here Document (Type 1) and Here String
|
||||
\x3C{2,3}\h*(?'HD1ID'[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]*\b)[^\r\n]*\R
|
||||
(?s:.*?)
|
||||
\R\k'HD1ID' # close with exactly the same identifier, in the first column
|
||||
)
|
||||
| (?s: # Here Document (Type 2)
|
||||
\x3C{2}-\h*(?'HD2ID'[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]*\b)[^\r\n]*\R
|
||||
(?s:.*?)
|
||||
\R\h*\k'HD2ID' # close with exactly the same identifier
|
||||
)
|
||||
"
|
||||
>
|
||||
<function
|
||||
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?m)^\h* # optional leading whitespace
|
||||
(?:
|
||||
(?-i:function\s+)
|
||||
(?'VALID_ID' # valid identifier, use as subroutine
|
||||
\b(?!(?-i:
|
||||
do(?:ne)?
|
||||
| el(?:if|se)|esac
|
||||
| f(?:i|or|unction)
|
||||
| i[fn]
|
||||
| select
|
||||
| t(?:hen|ime)
|
||||
| until
|
||||
| while
|
||||
)\b) # keywords, not to be used as identifier
|
||||
[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]* # valid character combination for identifiers
|
||||
)
|
||||
(?:\s*\([^)]*?\))? # parentheses and parameters optional
|
||||
|
|
||||
(?&VALID_ID)
|
||||
\s*\([^)]*?\) # parentheses required, parameters optional
|
||||
)
|
||||
[^{;]*?\{ # no semi-colon until start of body
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr="\b(?!function\b)\w+(?:\s*\([^)]*\))?" />
|
||||
<!-- comment out the following node to display the function with its parameters -->
|
||||
<nameExpr expr="\w+(?=\b)" />
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
35
bin/notepad++/functionList/batch.xml
Normal file
35
bin/notepad++/functionList/batch.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ================================ [ Batch / Command Shell Script ] -->
|
||||
|
||||
<parser
|
||||
displayName="Batch / Command Shell Script"
|
||||
id ="batch_label"
|
||||
commentExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?m-s:(?i:REM)(?:\h.+)?$) # Single Line Comment 1
|
||||
| (?m-s::{2}.*$) # Single Line Comment 2
|
||||
"
|
||||
>
|
||||
<function
|
||||
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?m-s) # enforce strict line by line search
|
||||
^ # label starts at the beginning of a line,...
|
||||
\h* # ...can be preceded by blank characters and
|
||||
: # ...starts with a colon
|
||||
\K # keep the text matched so far, out of the overall match
|
||||
\w # a label name has to start with a word character,...
|
||||
[\w.\-]+ # ...the remainder of the name can contain dots and minus signs and
|
||||
\b # ...ends at a word boundary i.e. discard any trailing characters
|
||||
"
|
||||
/>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
112
bin/notepad++/functionList/c.xml
Normal file
112
bin/notepad++/functionList/c.xml
Normal file
@@ -0,0 +1,112 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- =========================================================== [ C ] -->
|
||||
<parser
|
||||
displayName="C"
|
||||
id ="c_function"
|
||||
commentExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?s:\x2F\x2A.*?\x2A\x2F) # Multi Line Comment
|
||||
| (?m-s:\x2F{2}.*$) # Single Line Comment
|
||||
| (?s:\x22(?:[^\x22\x5C]|\x5C.)*\x22) # String Literal - Double Quoted
|
||||
| (?s:\x27(?:[^\x27\x5C]|\x5C.)*\x27) # String Literal - Single Quoted
|
||||
"
|
||||
>
|
||||
<function
|
||||
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?: # Declaration specifiers
|
||||
\b
|
||||
(?:
|
||||
(?-i:auto|register|static|extern|typedef) # Storage class specifier
|
||||
| (?: # Type specifier
|
||||
(?-i:void|char|short|int|long|float|double|(?:un)?signed)
|
||||
| (?-i:struct|union|enum)
|
||||
\s+
|
||||
(?&VALID_ID) # Struct, Union or Enum Specifier (simplified)
|
||||
| (?&VALID_ID) # Type-definition name
|
||||
)
|
||||
| (?'TYPE_QUALIFIER'(?-i:const|volatile))
|
||||
)
|
||||
\b
|
||||
\s*
|
||||
)*
|
||||
(?'DECLARATOR'
|
||||
(?'POINTER'
|
||||
\*
|
||||
\s*
|
||||
(?:
|
||||
\b(?&TYPE_QUALIFIER)\b
|
||||
\s*
|
||||
)*
|
||||
(?:(?&POINTER))? # Boost::Regex 1.58-1.59 do not correctly handle quantifiers on subroutine calls
|
||||
)?
|
||||
(?: # 'DIRECT_DECLARATOR'
|
||||
\s*
|
||||
(?'VALID_ID' # valid identifier, use as subroutine
|
||||
\b(?!(?-i:
|
||||
auto
|
||||
| break
|
||||
| c(?:ase|har|on(?:st|ntinue))
|
||||
| d(?:efault|o(?:uble)?)
|
||||
| e(?:lse|num|xtern)
|
||||
| f(?:loat|or)
|
||||
| goto
|
||||
| i(?:f|n(?:t|line))
|
||||
| long
|
||||
| while
|
||||
| re(?:gister|strict|turn)
|
||||
| s(?:hort|i(?:gned|zeof)|t(?:atic|ruct)|witch)
|
||||
| typedef
|
||||
| un(?:ion|signed)
|
||||
| vo(?:id|latile)
|
||||
| _(?:
|
||||
A(?:lignas|lignof|tomic)
|
||||
| Bool
|
||||
| Complex
|
||||
| Generic
|
||||
| Imaginary
|
||||
| Noreturn
|
||||
| Static_assert
|
||||
| Thread_local
|
||||
)
|
||||
)\b) # keywords, not to be used as identifier
|
||||
[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]* # valid character combination for identifiers
|
||||
)
|
||||
| \s*\(
|
||||
(?&DECLARATOR)
|
||||
\)
|
||||
| \s*(?&VALID_ID)
|
||||
\s*\[
|
||||
[^[\];{]*?
|
||||
\]
|
||||
| \s*(?&VALID_ID)
|
||||
\s*\(
|
||||
[^();{]*?
|
||||
\)
|
||||
)
|
||||
\s*
|
||||
)
|
||||
(?=\{) # start of function body
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]*
|
||||
\s*\( # start of parameters
|
||||
(?s:.*?) # whatever, until...
|
||||
\) # end of parameters
|
||||
" />
|
||||
<!-- comment out the following node to display the method with its parameters -->
|
||||
<!-- <nameExpr expr="[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]*" /> -->
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
44
bin/notepad++/functionList/cobol-free.xml
Normal file
44
bin/notepad++/functionList/cobol-free.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- Variant for COBOL free-form reference format -->
|
||||
<parser id="cobol_section_free" displayName="COBOL free-form reference format">
|
||||
<!-- working comment Expression:
|
||||
commentExpr="(?m-s)(?:\*>).*$"
|
||||
cannot be used because problems with comment boundaries
|
||||
in current FunctionList implementation, for details see
|
||||
https://sourceforge.net/p/notepad-plus/patches/597/
|
||||
-->
|
||||
<!-- Variant with paragraphs (don't work with comment lines
|
||||
before section/paragraph header, can be activated when
|
||||
comment boundaries work and the commentExpr is used) -->
|
||||
<!--
|
||||
<function
|
||||
mainExpr="(?m-s)(?<=\.)\s*(?!exit\s)[\w_-]+(\s+section(\s*|(\s+[\w_-]+)?))(?=\.)"
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr="(?m-s)(?<=[\s\.])[\w_-]+(\s*section\s*([\w_-]+)?)?"/>
|
||||
</functionName>
|
||||
</function>
|
||||
-->
|
||||
<!-- Variant without paragraphs (works with comment lines before section header) -->
|
||||
<function
|
||||
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
[\s\.](?!exit\s)[\w_-]+\s+section(\s*|(\s+[\w_-]+)?)(?=\.) # all names that come before `section` but not `exit section`
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr="[\w_-]+\s*section"/>
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
27
bin/notepad++/functionList/cobol.xml
Normal file
27
bin/notepad++/functionList/cobol.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- Variant for COBOL fixed-form reference format -->
|
||||
<parser id="cobol_section_fixed" displayName="COBOL fixed-form reference format">
|
||||
<function
|
||||
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?m-s)(^.{6}[ D]) # ignore first 6 columns, 7 must be empty or D (debug-line)
|
||||
([\t ]{0,3}) # don't start after column 12
|
||||
(?!exit\s)[\w_-]+(\.|((?'seps'([\t ]|\*>.*|([\n\r]+(.{6}([ D]|\*.*)|.{0,6}$)))+)section(\.|((?&seps)(\.|[\w_-]+\.)))))
|
||||
# all names that come before `section` but not `exit section`
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr="[\w_-]+((?=\.)|((?'seps'([\t ]|\*>.*|([\n\r]+(.{6}([ D]|\*.*)|.{0,6}$)))+)section((?=\.)|(?&seps)((?=\.)|[\w_-]+(?=\.)))))"/>
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
304
bin/notepad++/functionList/cpp.xml
Normal file
304
bin/notepad++/functionList/cpp.xml
Normal file
@@ -0,0 +1,304 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ========================================================= [ C++ ] -->
|
||||
<parser
|
||||
displayName="C++"
|
||||
id ="cplusplus_syntax"
|
||||
commentExpr="(?s:/\*.*?\*/)|(?m-s://.*?$)"
|
||||
>
|
||||
<classRange
|
||||
mainExpr="(?x) # use inline comments
|
||||
^[\t\x20]* # leading whitespace
|
||||
(template\s*<\s*[\w\t\x20\(\)\=\.:,<>]*\s*>\s*)? # template parameters
|
||||
(class|struct) # class/struct definition keyword
|
||||
[\t\x20]+ # following whitespace
|
||||
((\w+|\[\[[^\r\n]*\]\])[\t\x20]+)* # type attributes
|
||||
(
|
||||
\w+ # namespace identifier
|
||||
(\s*<\s*[\w\t\x20\(\)\=\.:,<>]*\s*>\s*)? # template parameters
|
||||
\s*::\s* # namespace separator
|
||||
)*
|
||||
\w+ # class/struct identifier
|
||||
(\s*<\s*[\w\t\x20\(\)\=\.:,<>]*\s*>\s*)? # template parameters
|
||||
(\s*final\s*)? # final specifier
|
||||
(
|
||||
\s*:\s* # inheritance separator
|
||||
((private|protected|public|virtual)\s+)* # visibility/virtual specifier
|
||||
(
|
||||
\w+ # namespace identifier
|
||||
(\s*<\s*[\w\t\x20\(\)\=\.:,<>]*\s*>\s*)? # template parameters
|
||||
\s*::\s* # namespace separator
|
||||
)*
|
||||
\w+ # parent class/struct identifier
|
||||
(\s*<\s*[\w\t\x20\(\)\=\.:,<>]*\s*>\s*)? # template parameters
|
||||
(
|
||||
\s*,\s* # multiple inheritance separator
|
||||
((private|protected|public|virtual)\s+)* # visibility/virtual specifier
|
||||
(
|
||||
\w+ # namespace identifier
|
||||
(\s*<\s*[\w\t\x20\(\)\=\.:,<>]*\s*>\s*)? # template parameters
|
||||
\s*::\s* # namespace separator
|
||||
)*
|
||||
\w+ # parent class/struct identifier
|
||||
(\s*<\s*[\w\t\x20\(\)\=\.:,<>]*\s*>\s*)? # template parameters
|
||||
)*
|
||||
)?
|
||||
\s* # trailing whitespace
|
||||
\{ # class/struct body
|
||||
"
|
||||
openSymbole ="\{"
|
||||
closeSymbole="\}"
|
||||
>
|
||||
<className>
|
||||
<nameExpr
|
||||
expr="(?x) # use inline comments
|
||||
(class|struct) # class/struct definition keyword
|
||||
[\t\x20]+ # following whitespace
|
||||
((\w+|\[\[[^\r\n]*\]\])[\t\x20]+)* # type attributes
|
||||
(\w+\s*::\s*)* # namespace specifier
|
||||
\w+ # class/struct identifier
|
||||
(\s*<\s*[\w\t\x20\(\)\=\.:,<>]*\s*>\s*)? # template parameters
|
||||
(\s*final\s*)? # final specifier
|
||||
\s* # trailing whitespace
|
||||
(:\s*\w+|\{) # inheritance separator | class/struct body
|
||||
"
|
||||
/>
|
||||
<nameExpr
|
||||
expr="(?x) # use inline comments
|
||||
(\w+\s*::\s*)* # namespace specifier
|
||||
\w+ # class/struct identifier
|
||||
(\s*<\s*[\w\t\x20\(\)\=\.:,<>]*\s*>\s*)? # template parameters
|
||||
(\s*final\s*)? # final specifier
|
||||
\s* # trailing whitespace
|
||||
(:\s*\w+|\{) # inheritance separator | class/struct body
|
||||
"
|
||||
/>
|
||||
<nameExpr
|
||||
expr="(?x) # use inline comments
|
||||
(\w+\s*::\s*)* # namespace specifier
|
||||
\w+ # class/struct identifier
|
||||
"
|
||||
/>
|
||||
</className>
|
||||
<function
|
||||
mainExpr="(?x) # use inline comments
|
||||
^[\t\x20]* # leading whitespace
|
||||
(template\s*<\s*[\w\t\x20\(\)\=\.:,<>]*\s*>\s*)? # template parameters
|
||||
((consteval|constexpr|explicit|friend|inline|static|virtual)\s+)* # left function definition keywords
|
||||
(
|
||||
( # conversion operator definition
|
||||
(
|
||||
\w+ # namespace identifier
|
||||
(\s*<\s*[\w\t\x20\(\)\=\.:,<>]*\s*>\s*)? # template parameters
|
||||
\s*::\s* # namespace separator
|
||||
)*
|
||||
operator\s+ # operator keyword
|
||||
((const|long|signed|unsigned|volatile)\s+)* # type definition keyword
|
||||
( # operator type definition
|
||||
(
|
||||
\w+ # namespace identifier
|
||||
(\s*<\s*[\w\t\x20\(\)\=\.:,<>]*\s*>\s*)? # template parameters
|
||||
\s*::\s* # namespace separator
|
||||
)*
|
||||
\w+ # operator type identifier
|
||||
(\s*<\s*[\w\t\x20\(\)\=\.:,<>]*\s*>\s*)? # template parameters
|
||||
)*
|
||||
(\s*(\*|\*\*|&)\s*)? # type pointer/reference
|
||||
)
|
||||
| (
|
||||
((const|long|signed|unsigned|volatile)\s+)* # type definition keyword
|
||||
( # return type definition
|
||||
(
|
||||
\w+ # namespace identifier
|
||||
(\s*<\s*[\w\t\x20\(\)\=\.:,<>]*\s*>\s*)? # template parameters
|
||||
\s*::\s* # namespace separator
|
||||
)*
|
||||
\w+ # return type identifier
|
||||
(\s*<\s*[\w\t\x20\(\)\=\.:,<>]*\s*>\s*)? # template parameters
|
||||
)
|
||||
( # type pointer/reference
|
||||
\s+
|
||||
| (\*|\*\*|&)\s+
|
||||
| \s+(\*|\*\*|&)
|
||||
| \s+(\*|\*\*|&)\s+
|
||||
)
|
||||
(
|
||||
\w+ # namespace identifier
|
||||
(\s*<\s*[\w\t\x20\(\)\=\.:,<>]*\s*>\s*)? # template parameters
|
||||
\s*::\s* # namespace separator
|
||||
)*
|
||||
(
|
||||
( # function definition
|
||||
(?!(if|while|for|switch)\s*\() # exclude block/loop definition
|
||||
\w+ # function identifier
|
||||
)
|
||||
| ( # operator definition
|
||||
operator\(\) # parenthesis operator
|
||||
| operator # operator keyword
|
||||
[\[\]\*\=\+\-\~\|\^%!,&<>]+ # operator symbol
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
\s* # following whitespace
|
||||
\(
|
||||
[^\)\(]* # function parameters
|
||||
(\([^\)\(]*\)[^\)\(]*)* # functors as parameter
|
||||
\)
|
||||
(\s*(const|final|noexcept|override|volatile)\s*)* # right function definition keywords
|
||||
\s* # trailing whitespace
|
||||
\{ # function body
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<funcNameExpr
|
||||
expr="(?x) # use inline comments
|
||||
(
|
||||
operator\(\) # parenthesis operator
|
||||
| operator # operator keyword
|
||||
[\w\t\x20\[\]\*\=\+\-\~\|\^%!,&<>]+ # operator symbol | conversion operator
|
||||
| (?!(if|while|for|switch)\s*\() # exclude block/loop definition
|
||||
\w+ # function identifier
|
||||
)
|
||||
\s* # following whitespace
|
||||
\( # function parameters
|
||||
"
|
||||
/>
|
||||
<funcNameExpr
|
||||
expr="(?x) # use inline comments
|
||||
(
|
||||
operator\(\) # parenthesis operator
|
||||
| operator # operator keyword
|
||||
[\w\t\x20\[\]\*\=\+\-\~\|\^%!,&<>]+ # operator symbol | conversion operator
|
||||
| (?!(if|while|for|switch)\s*\() # exclude block/loop definition
|
||||
\w+ # function identifier
|
||||
)
|
||||
"
|
||||
/>
|
||||
</functionName>
|
||||
</function>
|
||||
</classRange>
|
||||
<function
|
||||
mainExpr="(?x) # use inline comments
|
||||
^[\t\x20]* # leading whitespace
|
||||
(template\s*<\s*[\w\t\x20\(\)\=\.:,<>]*\s*>\s*)? # template parameters
|
||||
((consteval|constexpr|explicit|friend|inline|static|virtual)\s+)* # left function definition keywords
|
||||
(
|
||||
( # conversion operator definition
|
||||
(
|
||||
\w+ # namespace identifier
|
||||
(\s*<\s*[\w\t\x20\(\)\=\.:,<>]*\s*>\s*)? # template parameters
|
||||
\s*::\s* # namespace separator
|
||||
)*
|
||||
operator\s+ # operator keyword
|
||||
((const|long|signed|unsigned|volatile)\s+)* # type definition keyword
|
||||
( # operator type definition
|
||||
(
|
||||
\w+ # namespace identifier
|
||||
(\s*<\s*[\w\t\x20\(\)\=\.:,<>]*\s*>\s*)? # template parameters
|
||||
\s*::\s* # namespace separator
|
||||
)*
|
||||
\w+ # operator type identifier
|
||||
(\s*<\s*[\w\t\x20\(\)\=\.:,<>]*\s*>\s*)? # template parameters
|
||||
)*
|
||||
(\s*(\*|\*\*|&)\s*)? # type pointer/reference
|
||||
)
|
||||
| (
|
||||
((const|long|signed|unsigned|volatile)\s+)* # type definition keyword
|
||||
( # return type definition
|
||||
(
|
||||
\w+ # namespace identifier
|
||||
(\s*<\s*[\w\t\x20\(\)\=\.:,<>]*\s*>\s*)? # template parameters
|
||||
\s*::\s* # namespace separator
|
||||
)*
|
||||
\w+ # return type identifier
|
||||
(\s*<\s*[\w\t\x20\(\)\=\.:,<>]*\s*>\s*)? # template parameters
|
||||
)
|
||||
( # type pointer/reference
|
||||
\s+
|
||||
| (\*|\*\*|&)\s+
|
||||
| \s+(\*|\*\*|&)
|
||||
| \s+(\*|\*\*|&)\s+
|
||||
)
|
||||
(
|
||||
\w+ # namespace identifier
|
||||
(\s*<\s*[\w\t\x20\(\)\=\.:,<>]*\s*>\s*)? # template parameters
|
||||
\s*::\s* # namespace separator
|
||||
)*
|
||||
(
|
||||
( # function definition
|
||||
(?!(if|while|for|switch)\s*\() # exclude block/loop definition
|
||||
\w+ # function identifier
|
||||
)
|
||||
| ( # operator definition
|
||||
operator\(\) # operator parenthesis
|
||||
| operator # operator keyword
|
||||
[\[\]\*\=\+\-\~\|\^%!,&<>]+ # operator symbol
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
\s* # following whitespace
|
||||
\(
|
||||
[^\)\(]* # function parameters
|
||||
(\([^\)\(]*\)[^\)\(]*)* # functors as parameter
|
||||
\)
|
||||
(\s*(const|final|noexcept|override|volatile)\s*)* # right function definition keywords
|
||||
\s* # trailing whitespace
|
||||
\{ # function body
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr
|
||||
expr="(?x) # use inline comments
|
||||
(
|
||||
operator\(\) # parenthesis operator
|
||||
| operator # operator keyword
|
||||
[\w\t\x20\[\]\*\=\+\-\~\|\^%!,&<>]+ # operator symbol | conversion operator
|
||||
| (?!(if|while|for|switch)\s*\() # exclude block/loop definition
|
||||
\w+ # function identifier
|
||||
)
|
||||
\s* # following whitespace
|
||||
\( # function parameters
|
||||
"
|
||||
/>
|
||||
<nameExpr
|
||||
expr="(?x) # use inline comments
|
||||
(
|
||||
operator\(\) # parenthesis operator
|
||||
| operator # operator keyword
|
||||
[\w\t\x20\[\]\*\=\+\-\~\|\^%!,&<>]+ # operator symbol | conversion operator
|
||||
| (?!(if|while|for|switch)\s*\() # exclude block/loop definition
|
||||
\w+ # function identifier
|
||||
)
|
||||
"
|
||||
/>
|
||||
</functionName>
|
||||
<className>
|
||||
<nameExpr expr="(?x) # use inline comments
|
||||
\w+ # namespace identifier
|
||||
(?=
|
||||
(\s*<\s*[\w\t\x20\(\)\=\.:,]*\s*>\s*)? # template parameters
|
||||
\s*::\s* # namespace separator
|
||||
(
|
||||
operator\(\) # parenthesis operator
|
||||
| operator # operator keyword
|
||||
[\w\t\x20\[\]\*\=\+\-\~\|\^%!,&<>]+ # operator symbol | conversion operator
|
||||
| \w+ # function identifier
|
||||
)
|
||||
\( # function parameters
|
||||
)
|
||||
" />
|
||||
</className>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
43
bin/notepad++/functionList/cs.xml
Normal file
43
bin/notepad++/functionList/cs.xml
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ========================================================== [ C# ] -->
|
||||
|
||||
<!--
|
||||
| Based on:
|
||||
| http://sourceforge.net/p/notepad-plus/patches/613/
|
||||
\-->
|
||||
<parser
|
||||
displayName="C#"
|
||||
id ="csharp_class"
|
||||
commentExpr="(?s:/\*.*?\*/)|(?m-s://.*?$)"
|
||||
>
|
||||
<classRange
|
||||
mainExpr ="^[\t\x20]*((public|protected|private|internal)\s+)?(\w+\s*)?(class|struct|interface)[\t\x20]+[^\{]+\{"
|
||||
openSymbole ="\{"
|
||||
closeSymbole="\}"
|
||||
>
|
||||
<className>
|
||||
<nameExpr expr="(class|struct|interface)[\t\x20]+\w+" />
|
||||
<nameExpr expr="[\t\x20]+\w+" />
|
||||
<nameExpr expr="\w+" />
|
||||
</className>
|
||||
<function
|
||||
mainExpr="^[^\S\r\n]*(?<modifier1>(?:public|protected|internal|private)\s*)?(?<modifier2>(?:new|static|virtual|sealed|override|abstract|extern)\s*)?(partial\s*)?(?<type>(?!(return|if|else))\w+(?<genericType><[\w,\s<>]+>)?\s+)(?<name>\w+(?<genericNameType><[\w,\s<>]+>)?\s?)\((?<params>[\w\s,<>\[\]\:=\.]*)\)(?<ctorChain>\s*\:\s*(?:base|this)\s*\((?<ctorParams>[\w\s,<>\[\]\:=\.]*)\))?[\w\s<>\:,\(\)\[\]]*(?:\{|;)"
|
||||
>
|
||||
<functionName>
|
||||
<funcNameExpr expr="(\w+(<[\w,\s<>]+>)?\s?)\(" />
|
||||
<funcNameExpr expr="(\w+(<[\w,\s<>]+>)?\s?)" />
|
||||
</functionName>
|
||||
</function>
|
||||
</classRange>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
49
bin/notepad++/functionList/fortran.xml
Normal file
49
bin/notepad++/functionList/fortran.xml
Normal file
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!--
|
||||
| Based on:
|
||||
| https://notepad-plus-plus.org/community/topic/11059/custom-functions-list-rules
|
||||
| https://notepad-plus-plus.org/community/topic/13553/functionlist-xml-regular-expressions-not-parsing-properly
|
||||
\-->
|
||||
<parser
|
||||
displayName="Fortran Free Form style - FORmula TRANslation"
|
||||
id ="fortran_freeform"
|
||||
commentExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
(?m-s:!.*$) # Single Line Comment
|
||||
"
|
||||
>
|
||||
<function
|
||||
mainExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
(?im-s) # case-insensitive, ^ and $ match at line breaks, dot does not
|
||||
^\h* # optional leading whitespace at start-of-line
|
||||
(?:
|
||||
(?:
|
||||
ELEMENTAL
|
||||
| (?:IM)?PURE
|
||||
| MODULE
|
||||
| (?:NON_)?RECURSIVE
|
||||
)
|
||||
\s+
|
||||
)*
|
||||
(?:FUNCTION|SUBROUTINE)\s+
|
||||
\K # discard text matched so far
|
||||
[A-Z]\w{0,62} # valid character combination for identifiers
|
||||
(?:\s*\([^()]*\))? # optional paramater list
|
||||
"
|
||||
>
|
||||
<!-- comment out the following node to display the method with its parameters -->
|
||||
<functionName>
|
||||
<nameExpr expr="\w+" />
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
35
bin/notepad++/functionList/fortran77.xml
Normal file
35
bin/notepad++/functionList/fortran77.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<parser
|
||||
displayName="Fortran Fixed Form style - FORmula TRANslation"
|
||||
id ="fortran_fixedform"
|
||||
commentExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
(?m-s:(?:!|^[Cc*].*$) # Single Line Comment 1..3
|
||||
"
|
||||
>
|
||||
<function
|
||||
mainExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
(?im-s) # case-insensitive, ^ and $ match at line breaks, dot does not
|
||||
^\h* # optional leading whitespace at start-of-line
|
||||
(?:FUNCTION|SUBROUTINE)\s+
|
||||
\K # discard text matched so far
|
||||
[A-Z]\w{0,62} # valid character combination for identifiers
|
||||
(?:\s*\([^()]*\))? # optional paramater list
|
||||
"
|
||||
>
|
||||
<!-- comment out the following node to display the method with its parameters -->
|
||||
<functionName>
|
||||
<nameExpr expr="\w+" />
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
40
bin/notepad++/functionList/gdscript.xml
Normal file
40
bin/notepad++/functionList/gdscript.xml
Normal file
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
|
||||
<parser
|
||||
displayName="GDScript"
|
||||
id ="gdscript_syntax"
|
||||
commentExpr="(?s:'''.*?''')|(?s:\x22\x22\x22.*?\x22\x22\x22)|(?m-s:#.*?$)"
|
||||
>
|
||||
<classRange
|
||||
mainExpr ="^class\x20\K.*?(?=\n\S|\Z)"
|
||||
>
|
||||
<className>
|
||||
<nameExpr expr="\w+(?=[\s:])" />
|
||||
</className>
|
||||
<function
|
||||
mainExpr="\s+?func\x20\K.+?(?=:\s*?$|:\s*?#)"
|
||||
>
|
||||
<functionName>
|
||||
<funcNameExpr expr=".*" />
|
||||
</functionName>
|
||||
</function>
|
||||
</classRange>
|
||||
<function
|
||||
mainExpr="^func\x20\K.+?(?=:\s*?$|:\s*?#)"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr=".*" />
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
51
bin/notepad++/functionList/haskell.xml
Normal file
51
bin/notepad++/functionList/haskell.xml
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!--
|
||||
| Based on:
|
||||
| https://notepad-plus-plus.org/community/topic/12972/trouble-with-defining-a-function-list-entry/7
|
||||
|
|
||||
| By convention, the style of comment is indicated by the file extension,
|
||||
| with ".hs" indicating a "usual" Haskell file
|
||||
| and ".lhs" indicating a literate Haskell file.
|
||||
\-->
|
||||
<parser
|
||||
displayName="Haskell"
|
||||
id ="haskell_function"
|
||||
commentExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
(?s: # Multi Line Comment (nesting allowed)
|
||||
\{- # - start-of-comment indicator
|
||||
(?> # - followed by zero or more characters...
|
||||
[^{-] # ...not part of the start indicator,
|
||||
| \{(?!-) # ...not being a start-of-comment indicator,
|
||||
| -(?!\}) # ...not being an end-of-comment indicator and
|
||||
| (?R) # ...balancing through recursion (nesting)
|
||||
)*
|
||||
-\} # - end-of-comment indicator
|
||||
)
|
||||
| (?m-s:-{2}.*?$) # Single Line Comment
|
||||
"
|
||||
>
|
||||
<function
|
||||
mainExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
(?m-s) # ^ and $ match at line breaks, dot does not
|
||||
^ # NO leading whitespace at start-of-line
|
||||
[A-Za-z][\w\x27]* # valid character combination for identifiers
|
||||
\x20+::\x20
|
||||
.*?$ # whatever, until end-of-line
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr="[A-Za-z][\w\x27]*" />
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
27
bin/notepad++/functionList/hollywood.xml
Normal file
27
bin/notepad++/functionList/hollywood.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ================================================ [ Hollywood ] -->
|
||||
|
||||
<parser
|
||||
displayName="Hollywood"
|
||||
id ="hollywood_function"
|
||||
>
|
||||
<function
|
||||
mainExpr="((^|\s+|[{,])([A-Za-z_$][\w$]*\.)*[A-Za-z_$][\w$]*\s*[=:]|^|[\s;\}]+)\s*function(\s+[A-Za-z_][\w$:.]*)?\s*\([^\)\(]*\)[\n\s]"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr="[A-Za-z_$][\w$:.]*\s*[=]|[A-Za-z_$][\w$:.]*\s*\(" />
|
||||
<nameExpr expr="([A-Za-z_$][\w$:.]*\.)*[A-Za-z_$][\w$:.]*" />
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
30
bin/notepad++/functionList/ini.xml
Normal file
30
bin/notepad++/functionList/ini.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ========================================= [ Initialisation File ] -->
|
||||
<!-- File format used for: .INF / .INI / .REG / .editorconfig -->
|
||||
|
||||
<parser
|
||||
displayName="INI Section"
|
||||
id ="ini_section"
|
||||
commentExpr="(?x)
|
||||
(?m-s:[;\#].*$) # Single Line Comment
|
||||
"
|
||||
>
|
||||
<function
|
||||
mainExpr="^\h*[\["][\w*.;\x20()\-]+["\]]"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr="[^[\]"]*" />
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
104
bin/notepad++/functionList/inno.xml
Normal file
104
bin/notepad++/functionList/inno.xml
Normal file
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ================================================== [ Inno Setup ] -->
|
||||
|
||||
<parser
|
||||
displayName="Inno Setup"
|
||||
id ="innosetup_syntax"
|
||||
>
|
||||
<classRange
|
||||
mainExpr ="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?ms)
|
||||
(?'SECTION_HEADER'
|
||||
^ # header starts at beginning of a line
|
||||
\[ # start of section header
|
||||
(?-i:Code) # `Code` section name
|
||||
] # end of section header
|
||||
)
|
||||
.*? # whatever, up till...
|
||||
(?= # ...next valid section header or...
|
||||
^ # +-- header starts at beginning of a line
|
||||
\[ # +-- start-of-header indicator
|
||||
(?-i:
|
||||
Components|(?:Custom)?Messages
|
||||
| Dirs
|
||||
| Files
|
||||
| I(?:cons|nstallDelete)
|
||||
| Languages
|
||||
| R(?:egistry|un)
|
||||
| Setup
|
||||
| T(?:asks|ypes)
|
||||
| Uninstall(?:Delete|Run)
|
||||
) # +-- valid section name
|
||||
] # \-- end-of-header indicator
|
||||
| \Z # ...end-of-file
|
||||
)
|
||||
"
|
||||
>
|
||||
<className>
|
||||
<nameExpr expr="^\[\K[^\h\]]+(?=])" />
|
||||
</className>
|
||||
<function
|
||||
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?m-s)^\h* # optional leading whitespace
|
||||
(?i:FUNCTION\h+)
|
||||
(?'VALID_ID'
|
||||
[A-Za-z_]\w*
|
||||
)
|
||||
\s*\( # start-of-parameter-list indicator
|
||||
[^()]* # parameter list
|
||||
\s*\) # end-of-parameter-list indicator
|
||||
\s*: # type indicator
|
||||
\s*[A-Za-z_]\w* # type identifier
|
||||
\s*; # end-of-statement indicator
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<funcNameExpr expr="(?i:FUNCTION\h+)\K[A-Za-z_]\w*\s*\([^()]*\)" />
|
||||
<!-- comment out the following node to display the method with its parameters -->
|
||||
<funcNameExpr expr="[A-Za-z_]\w*" />
|
||||
</functionName>
|
||||
</function>
|
||||
</classRange>
|
||||
<function
|
||||
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?ms)
|
||||
(?'SECTION_HEADER'
|
||||
^ # header starts at beginning of a line
|
||||
\[ # start-of-header indicator
|
||||
(?-i:
|
||||
Components|(?:Custom)?Messages
|
||||
| Dirs
|
||||
| Files
|
||||
| I(?:cons|nstallDelete)
|
||||
| Languages
|
||||
| R(?:egistry|un)
|
||||
| Setup
|
||||
| T(?:asks|ypes)
|
||||
| Uninstall(?:Delete|Run)
|
||||
) # valid section name
|
||||
] # end-of-header indicator
|
||||
)
|
||||
.*? # whatever, up till...
|
||||
(?=
|
||||
(?&SECTION_HEADER) # ...next valid section header,...
|
||||
| ^\[(?-i:Code)] # ...`Code` section header or...
|
||||
| \Z # ...end-of-file
|
||||
)
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr="^\[\K[^\]]+(?=])" />
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
232
bin/notepad++/functionList/java.xml
Normal file
232
bin/notepad++/functionList/java.xml
Normal file
@@ -0,0 +1,232 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ======================================================== [ Java ] -->
|
||||
|
||||
<!--
|
||||
| Based on:
|
||||
| https://notepad-plus-plus.org/community/topic/12691/function-list-with-java-problems
|
||||
\-->
|
||||
<parser
|
||||
displayName="Java"
|
||||
id ="java_syntax"
|
||||
>
|
||||
<classRange
|
||||
mainExpr ="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?m)^[\t\x20]* # leading whitespace
|
||||
(?:
|
||||
(?-i:
|
||||
abstract
|
||||
| final
|
||||
| native
|
||||
| p(?:rivate|rotected|ublic)
|
||||
| s(?:tatic|trictfp|ynchronized)
|
||||
| transient
|
||||
| volatile
|
||||
| @[A-Za-z_]\w* # qualified identifier
|
||||
(?: # consecutive names...
|
||||
\. # ...are dot separated
|
||||
[A-Za-z_]\w*
|
||||
)*
|
||||
)
|
||||
\s+
|
||||
)*
|
||||
(?-i:class|enum|@?interface)
|
||||
\s+
|
||||
(?'DECLARATOR'
|
||||
(?'VALID_ID' # valid identifier, use as subroutine
|
||||
\b(?!(?-i:
|
||||
a(?:bstract|ssert)
|
||||
| b(?:oolean|reak|yte)
|
||||
| c(?:ase|atch|har|lass|on(?:st|tinue))
|
||||
| d(?:efault|o(?:uble)?)
|
||||
| e(?:lse|num|xtends)
|
||||
| f(?:inal(?:ly)?|loat|or)
|
||||
| goto
|
||||
| i(?:f|mp(?:lements|ort)|nstanceof|nt(?:erface)?)
|
||||
| long
|
||||
| n(?:ative|ew)
|
||||
| p(?:ackage|rivate|rotected|ublic)
|
||||
| return
|
||||
| s(?:hort|tatic|trictfp|uper|witch|ynchronized)
|
||||
| th(?:is|rows?)|tr(?:ansient|y)
|
||||
| vo(?:id|latile)
|
||||
| while
|
||||
)\b) # keywords, not to be used as identifier
|
||||
[A-Za-z_]\w* # valid character combination for identifiers
|
||||
)
|
||||
(?:
|
||||
\s*\x3C # start-of-template indicator...
|
||||
(?'GENERIC' # ...match first generic, use as subroutine
|
||||
\s*
|
||||
(?:
|
||||
(?&DECLARATOR) # use named generic
|
||||
| \? # or unknown
|
||||
)
|
||||
(?: # optional type extension
|
||||
\s+(?-i:extends|super)
|
||||
\s+(?&DECLARATOR)
|
||||
(?: # multiple bounds...
|
||||
\s+\x26 # ...are ampersand separated
|
||||
\s+(?&DECLARATOR)
|
||||
)*
|
||||
)?
|
||||
(?: # match consecutive generics objects...
|
||||
\s*, # ...are comma separated
|
||||
(?&GENERIC)
|
||||
)?
|
||||
)
|
||||
\s*\x3E # end-of-template indicator
|
||||
)?
|
||||
(?: # package and|or nested classes...
|
||||
\. # ...are dot separated
|
||||
(?&DECLARATOR)
|
||||
)?
|
||||
)
|
||||
(?: # optional object extension
|
||||
\s+(?-i:extends)
|
||||
\s+(?&DECLARATOR)
|
||||
(?: # consecutive objects...
|
||||
\s*, # ...are comma separated
|
||||
\s*(?&DECLARATOR)
|
||||
)*
|
||||
)?
|
||||
(?: # optional object implementation
|
||||
\s+(?-i:implements)
|
||||
\s+(?&DECLARATOR)
|
||||
(?: # consecutive objects...
|
||||
\s*, # ...are comma separated
|
||||
\s*(?&DECLARATOR)
|
||||
)*
|
||||
)?
|
||||
\s*\{ # whatever, up till start-of-body indicator
|
||||
"
|
||||
openSymbole ="\{"
|
||||
closeSymbole="\}"
|
||||
>
|
||||
<className>
|
||||
<nameExpr expr="(?-i:class|enum|@?interface)\s+\K\w+(?:\s*\x3C.*?\x3E)?" />
|
||||
</className>
|
||||
<function
|
||||
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
^[\t\x20]* # leading whitespace
|
||||
(?:
|
||||
(?-i:
|
||||
abstract
|
||||
| final
|
||||
| native
|
||||
| p(?:rivate|rotected|ublic)
|
||||
| s(?:tatic|trictfp|ynchronized)
|
||||
| transient
|
||||
| volatile
|
||||
| @[A-Za-z_]\w* # qualified identifier
|
||||
(?: # consecutive names...
|
||||
\. # ...are dot separated
|
||||
[A-Za-z_]\w*
|
||||
)*
|
||||
)
|
||||
\s+
|
||||
)*
|
||||
(?:
|
||||
\s*\x3C # start-of-template indicator
|
||||
(?&GENERIC)
|
||||
\s*\x3E # end-of-template indicator
|
||||
)?
|
||||
\s*
|
||||
(?'DECLARATOR'
|
||||
[A-Za-z_]\w* # (parent) type name
|
||||
(?: # consecutive sibling type names...
|
||||
\. # ...are dot separated
|
||||
[A-Za-z_]\w*
|
||||
)*
|
||||
(?:
|
||||
\s*\x3C # start-of-template indicator
|
||||
(?'GENERIC' # match first generic, use as subroutine
|
||||
\s*
|
||||
(?:
|
||||
(?&DECLARATOR) # use named generic
|
||||
| \? # or unknown
|
||||
)
|
||||
(?: # optional type extension
|
||||
\s+(?-i:extends|super)
|
||||
\s+(?&DECLARATOR)
|
||||
(?: # multiple bounds...
|
||||
\s+\x26 # ...are ampersand separated
|
||||
\s+(?&DECLARATOR)
|
||||
)*
|
||||
)?
|
||||
(?: # consecutive generics objects...
|
||||
\s*, # ...are comma separated
|
||||
(?&GENERIC)
|
||||
)?
|
||||
)
|
||||
\s*\x3E # end-of-template indicator
|
||||
)?
|
||||
(?: # package and|or nested classes...
|
||||
\. # ...are dot separated
|
||||
(?&DECLARATOR)
|
||||
)?
|
||||
(?: # optional compound type...
|
||||
\s*\[ # ...start-of-compound indicator
|
||||
\s*\] # ...end-of-compound indicator
|
||||
)*
|
||||
)
|
||||
\s+
|
||||
(?'VALID_ID' # valid identifier, use as subroutine
|
||||
\b(?!(?-i:
|
||||
a(?:bstract|ssert)
|
||||
| b(?:oolean|reak|yte)
|
||||
| c(?:ase|atch|har|lass|on(?:st|tinue))
|
||||
| d(?:efault|o(?:uble)?)
|
||||
| e(?:lse|num|xtends)
|
||||
| f(?:inal(?:ly)?|loat|or)
|
||||
| goto
|
||||
| i(?:f|mp(?:lements|ort)|nstanceof|nt(?:erface)?)
|
||||
| long
|
||||
| n(?:ative|ew)
|
||||
| p(?:ackage|rivate|rotected|ublic)
|
||||
| return
|
||||
| s(?:hort|tatic|trictfp|uper|witch|ynchronized)
|
||||
| th(?:is|rows?)|tr(?:ansient|y)
|
||||
| vo(?:id|latile)
|
||||
| while
|
||||
)\b) # keywords, not to be used as identifier
|
||||
[A-Za-z_]\w* # valid character combination for identifiers
|
||||
)
|
||||
\s*\( # start-of-parameters indicator
|
||||
(?'PARAMETER' # match first parameter, use as subroutine
|
||||
\s*(?-i:final\s+)?
|
||||
(?&DECLARATOR)
|
||||
\s+(?&VALID_ID) # parameter name
|
||||
(?: # consecutive parameters...
|
||||
\s*, # ...are comma separated
|
||||
(?&PARAMETER)
|
||||
)?
|
||||
)?
|
||||
\) # end-of-parameters indicator
|
||||
(?: # optional exceptions
|
||||
\s*(?-i:throws)
|
||||
\s+(?&VALID_ID) # first exception name
|
||||
(?: # consecutive exception names...
|
||||
\s*, # ...are comma separated
|
||||
\s*(?&VALID_ID)
|
||||
)*
|
||||
)?
|
||||
[^{;]*\{ # start-of-function-body indicator
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<funcNameExpr expr="\w+(?=\s*\()" />
|
||||
</functionName>
|
||||
</function>
|
||||
</classRange>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
32
bin/notepad++/functionList/javascript.js.xml
Normal file
32
bin/notepad++/functionList/javascript.js.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ================================================ [ JavaScript ] -->
|
||||
|
||||
<parser
|
||||
displayName="JavaScript"
|
||||
id ="javascript_function"
|
||||
commentExpr="(?s:/\*.*?\*/)|(?m-s://.*?$)"
|
||||
>
|
||||
<function
|
||||
mainExpr="((^|\s+|[;\}\.])([A-Za-z_$][\w$]*\.)*[A-Za-z_$][\w$]*\s*[=:]|^|[\s;\}]+)\s*function(\s+[A-Za-z_$][\w$]*)?\s*\([^\)\(]*\)[\n\s]*\{"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr="[A-Za-z_$][\w$]*\s*[=:]|[A-Za-z_$][\w$]*\s*\(" />
|
||||
<nameExpr expr="[A-Za-z_$][\w$]*" />
|
||||
</functionName>
|
||||
<className>
|
||||
<nameExpr expr="([A-Za-z_$][\w$]*\.)*[A-Za-z_$][\w$]*\." />
|
||||
<nameExpr expr="([A-Za-z_$][\w$]*\.)*[A-Za-z_$][\w$]*" />
|
||||
</className>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
76
bin/notepad++/functionList/krl.xml
Normal file
76
bin/notepad++/functionList/krl.xml
Normal file
@@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ========================================================= [ KRL ] -->
|
||||
<!-- KRL - KUKA Robot Language -->
|
||||
|
||||
<!--
|
||||
| https://notepad-plus-plus.org/community/topic/12264/function-list-for-new-language
|
||||
\-->
|
||||
<parser
|
||||
displayName="KRL"
|
||||
id ="krl_function"
|
||||
commentExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?m-s:;.*$) # Single Line Comment
|
||||
"
|
||||
>
|
||||
<function
|
||||
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?i:
|
||||
(?:GLOBAL\h+)?
|
||||
DEF # start-of-procedure indicator, possible extended to...
|
||||
(?:
|
||||
FCT # ...start-of-function indicator
|
||||
\h+
|
||||
(?:BOOL|CHAR|INT|REAL|(?&VALID_ID)) # returning a primitive type or a user-defined-type...
|
||||
(?: # ...optionally as an array
|
||||
\h*\[
|
||||
\h*(?:\d+|\x27(?:H[0-9A-Fa-f]+|B[01]+)\x27)?
|
||||
\h*\]
|
||||
)?
|
||||
)?
|
||||
)
|
||||
\h+
|
||||
\K # keep the text matched so far, out of the overall match
|
||||
(?'VALID_ID' # valid identifier, use as subroutine
|
||||
\b(?!(?i:
|
||||
AN(?:D|IN|OUT)
|
||||
| B(?:OOL|RAKE|_(?:AND|EXOR|NOT|OR))
|
||||
| C(?:ASE|AST_(?:FROM|TO)|HAR|IRC(?:_REL)?|ON(?:ST|TINUE)|_(?:DIS|ORI|PTP|VEL))
|
||||
| D(?:ECL|EF(?:AULT|DAT|FCT)|ELAY|O)
|
||||
| E(?:LSE|ND(?:DAT|FCT|FOR|IF|LOOP|SWITCH|WHILE)?|NUM|X(?:IT|OR|T(?:FCT)?))
|
||||
| F(?:ALSE|OR)
|
||||
| G(?:LOBAL|OTO)
|
||||
| HALT
|
||||
| I(?:[FS]|MPORT|NT(?:ERRUPT)?)
|
||||
| L(?:IN(?:_REL)?|OOP)
|
||||
| M(?:AXI|INI)MUM
|
||||
| NOT
|
||||
| OR
|
||||
| P(?:RIO|TP(?:_REL)?|UBLIC)
|
||||
| RE(?:AL|PEAT|SUME|TURN)
|
||||
| S(?:EC|IGNAL|TRUC|WITCH)
|
||||
| T(?:HEN|O|RIGGER|RUE)
|
||||
| UNTIL
|
||||
| W(?:AIT|HEN|HILE)
|
||||
)\b) # keywords, not to be used as identifier
|
||||
[$A-Za-z_\x7F-\xFF][$\w\x7F-\xFF]{0,23} # valid character combination for identifiers
|
||||
)
|
||||
\h*\([^)]*\)
|
||||
"
|
||||
>
|
||||
<!-- comment out the following node to display the method with its parameters -->
|
||||
<functionName>
|
||||
<nameExpr expr="[$A-Za-z_\x7F-\xFF][$\w\x7F-\xFF]{0,23}" />
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
32
bin/notepad++/functionList/latex.xml
Normal file
32
bin/notepad++/functionList/latex.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link: https://npp-user-manual.org/docs/function-list/
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<parser
|
||||
displayName="LaTeX Syntax"
|
||||
id ="latex_function"
|
||||
commentExpr="(?x)
|
||||
(%.*?$) # Comment
|
||||
"
|
||||
|
||||
>
|
||||
<function
|
||||
mainExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
(?im-s) # ignore case, ^ and $ match start/end of line, dot doesn't match newline
|
||||
\\(begin|
|
||||
part\*?|
|
||||
chapter\*?|
|
||||
section\*?|
|
||||
subsection\*?|
|
||||
subsubsection\*?|
|
||||
paragraph\*?|
|
||||
subparagraph\*?)
|
||||
{.*}"
|
||||
>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
107
bin/notepad++/functionList/lua.xml
Normal file
107
bin/notepad++/functionList/lua.xml
Normal file
@@ -0,0 +1,107 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- Copied from https://github.com/notepad-plus-plus/notepad-plus-plus/issues/4563 -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
| Based on:
|
||||
| http://stackoverflow.com/questions/19246077/how-to-add-lua-functions-to-the-notepad-functionlist-xml
|
||||
|
|
||||
| Note(s):
|
||||
| 1) Multi Line Comment `Level` is supported by Lua 5.1 and above;
|
||||
| 2) Nested table view not supported;
|
||||
\-->
|
||||
<parser
|
||||
displayName="Lua w/ Class"
|
||||
id ="lua_syntax"
|
||||
commentExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
(?s: # Multi Line Comment (MLC)
|
||||
(?<!-) # - no preceeding dash, otherwise start of SLC
|
||||
-{2}\x5B(?'MLCLvl'=*)\x5B.*?\x5D\k'MLCLvl'\x5D
|
||||
)
|
||||
| (?m-s:-{2}(?!\x5B=*\x5B).*$) # Single Line Comment (SLC)
|
||||
| (?s:\x22(?:[^\x22\x5C]|\x5C.)*\x22) # String Literal - Double Quoted (SLDQ) / Normal String
|
||||
| (?s: # String Literal - Multi Line (SLML) / Long String
|
||||
(?<!-{2}) # - no preceeding double dash, otherwise start of MLC or SLC
|
||||
\x5B(?'SLMLLvl'=*)\x5B(?:[^\x5C\x5D]|\x5C.)*\x5D\k'SLMLLvl'\x5D
|
||||
)
|
||||
| (?s:\x27(?:[^\x27\x5C]|\x5C.)*\x27) # String Literal - Single Quoted (SLSQ) / Char String
|
||||
"
|
||||
>
|
||||
<classRange
|
||||
mainExpr ="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
[.\w]+
|
||||
\s*=
|
||||
\s*\{
|
||||
"
|
||||
openSymbole ="\{"
|
||||
closeSymbole="\}"
|
||||
>
|
||||
<className>
|
||||
<nameExpr expr="[.\w]+" />
|
||||
</className>
|
||||
<function
|
||||
mainExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
[.\w]+
|
||||
\s*=
|
||||
\s*(?'QT'[\x22\x27]?)\w+\k'QT'
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<funcNameExpr expr=".*" />
|
||||
</functionName>
|
||||
</function>
|
||||
</classRange>
|
||||
<function
|
||||
mainExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
(?m-i) # ^ and $ match at line-breaks, case-sensitive
|
||||
(?(DEFINE) # definition of sub-routine(s)
|
||||
(?'VALID_ID' # Valid Identifier sub-routine
|
||||
\b(?!(?-i: # - keywords (case-sensitive), not to be used as identifier
|
||||
and
|
||||
| break
|
||||
| do
|
||||
| e(?:lse(?:if)?|nd)
|
||||
| f(?:alse|or|unction)
|
||||
| goto
|
||||
| i[fn]
|
||||
| local
|
||||
| n(?:il|ot)
|
||||
| or
|
||||
| re(?:peat|turn)
|
||||
| t(?:hen|rue)
|
||||
| until
|
||||
| while
|
||||
)\b)
|
||||
[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]* # - valid character combination for identifiers
|
||||
)
|
||||
)
|
||||
(?m) # ^ and $ match at line-breaks
|
||||
(?:
|
||||
^\h* # optional leading white-space at start-of-line
|
||||
(?:local\s+)?
|
||||
function\s+
|
||||
\K # discard text matched so far
|
||||
(?&VALID_ID)
|
||||
(?:\s*\.\s*(?&VALID_ID))*
|
||||
(?:\s*:\s*(?&VALID_ID))?
|
||||
|
|
||||
(?&VALID_ID)
|
||||
(?:\s*\.\s*(?&VALID_ID))*
|
||||
\s*=
|
||||
\s*function
|
||||
)
|
||||
\s*\( # start-of-parameter-list indicator
|
||||
[^)]* # optional parameters
|
||||
\) # end-of-parameter-list indicator
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr="[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]*(?=\s*[(=])" />
|
||||
</functionName>
|
||||
<className>
|
||||
<nameExpr expr="[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]*(?:\s*\.\s*[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]*)*(?=\s*[.:])" />
|
||||
</className>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
61
bin/notepad++/functionList/nppexec.xml
Normal file
61
bin/notepad++/functionList/nppexec.xml
Normal file
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ===================================================== [ NppExec ] -->
|
||||
|
||||
<parser
|
||||
displayName="NppExec"
|
||||
id ="nppexec_syntax"
|
||||
>
|
||||
<!-- Define NppExec script as the range started by a pair of colons
|
||||
and ending right before the next pair of colons or the file's
|
||||
end, respectively
|
||||
-->
|
||||
<classRange
|
||||
mainExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
(?ims) # ignore case, ^ and $ match start/end of line, dot matches newline
|
||||
^\h*
|
||||
::
|
||||
.*?
|
||||
(?=::|\Z)
|
||||
"
|
||||
>
|
||||
<className>
|
||||
<!-- The script's name is shown without its preceding pair
|
||||
of colons
|
||||
-->
|
||||
<nameExpr expr="(?im-s)^\h*::\K(?:(.+?)(?=\h*\/{2}|$))" />
|
||||
</className>
|
||||
|
||||
<!-- Define jump labels as functions. Names are starting with one
|
||||
or two colons (thus the script's name itself is shown as a
|
||||
function) and terminated by a line comment, the line's end
|
||||
or the file's end
|
||||
-->
|
||||
<function
|
||||
mainExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
(?im-s) # ignore case, ^ and $ match start/end of line, dot doesn't match newline
|
||||
^\h*
|
||||
:{1,2}.+?
|
||||
\h*(?=\/{2}|$|\Z)
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<!-- The script name is shown including its preceding pair
|
||||
of colons, jump labels are shown without the preceding
|
||||
single colon
|
||||
-->
|
||||
<funcNameExpr expr="(?im-s)\h*(?(?=::)(.+)|(?::\K(.+)))" />
|
||||
</functionName>
|
||||
</function>
|
||||
</classRange>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
146
bin/notepad++/functionList/nsis.xml
Normal file
146
bin/notepad++/functionList/nsis.xml
Normal file
@@ -0,0 +1,146 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ======================================================== [ NSIS ] -->
|
||||
<!-- NSIS - Nullsoft Scriptable Install System -->
|
||||
|
||||
<parser
|
||||
displayName="NSIS"
|
||||
id ="nsis_syntax"
|
||||
>
|
||||
<classRange
|
||||
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
\b(?-i:SectionGroup)\b # open indicator
|
||||
(?s:.*?)
|
||||
\b(?-i:SectionGroupEnd)\b # close indicator
|
||||
"
|
||||
>
|
||||
<className>
|
||||
<nameExpr expr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?m-s)
|
||||
SectionGroup\h+(?-i:/e\h+)? # start indicator and its optional switch
|
||||
\K # keep the text matched so far, out of the overall match
|
||||
.+$ # whatever, till end-of-line
|
||||
"
|
||||
/>
|
||||
<nameExpr expr="[^\r\n\x22]*" />
|
||||
</className>
|
||||
<function
|
||||
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?m)
|
||||
^(?'INDENT'\h*) # optional leading whitespace at start-of-line
|
||||
(?:
|
||||
(?-i:!macro)
|
||||
\h+ # required whitespace separator
|
||||
\K # keep the text matched so far, out of the overall match
|
||||
[^\r\n]*$ # whatever, until end-of-line
|
||||
|
|
||||
(?'TAG'(?-i:Function|PageEx|Section))
|
||||
\h+ # required whitespace separator
|
||||
(?-i:/o\h+)? # optional switch
|
||||
\K # keep the text matched so far, out of the overall match
|
||||
(?s:
|
||||
.*? # whatever,
|
||||
(?= # up till...
|
||||
^\k'INDENT' # ...equal indent at start-of-line for...
|
||||
\k'TAG'End\b # ...matching close indicator
|
||||
)
|
||||
)
|
||||
|
|
||||
\x24\x7B # start-of-open-element indicator
|
||||
(?'ID'[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]*)
|
||||
\x7D # end-of-open-element indicator
|
||||
\h+ # required whitespace separator
|
||||
(?-i:/o\h+)? # optional switch
|
||||
\K # keep the text matched so far, out of the overall match
|
||||
(?s:
|
||||
.*? # whatever,
|
||||
(?= # up till...
|
||||
^\k'INDENT' # ...equal indent at start-of-line for...
|
||||
\x24\x7B\k'ID'End\x7D # ...matching close indicator
|
||||
)
|
||||
)
|
||||
)
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<funcNameExpr expr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?m)
|
||||
[^\r\n]+? # whatever,
|
||||
(?= # up till...
|
||||
\h* # ...optional whitespace and...
|
||||
(?:
|
||||
\x2F\x2A # ...start of multi line comment or...
|
||||
| [\x23;] # ...start of single line comment or...
|
||||
| $ # ...end-of-line
|
||||
)
|
||||
)
|
||||
"
|
||||
/>
|
||||
</functionName>
|
||||
</function>
|
||||
</classRange>
|
||||
<function
|
||||
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?m)
|
||||
^(?'INDENT'\h*) # optional leading whitespace at start-of-line
|
||||
(?:
|
||||
(?-i:!macro)
|
||||
\h+ # required whitespace separator
|
||||
\K # keep the text matched so far, out of the overall match
|
||||
[^\r\n]*$ # whatever, until end-of-line
|
||||
|
|
||||
(?'TAG'(?-i:Function|PageEx|Section))
|
||||
\h+ # required whitespace separator
|
||||
(?-i:/o\h+)? # optional switch
|
||||
\K # keep the text matched so far, out of the overall match
|
||||
(?s:
|
||||
.*? # whatever,
|
||||
(?= # up till...
|
||||
^\k'INDENT' # ...equal indent at start-of-line for...
|
||||
\k'TAG'End\b # ...matching close indicator
|
||||
)
|
||||
)
|
||||
|
|
||||
\x24\x7B # start-of-open-element indicator
|
||||
(?'ID'[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]*)
|
||||
\x7D # end-of-open-element indicator
|
||||
\h+ # required whitespace separator
|
||||
(?-i:/o\h+)? # optional switch
|
||||
\K # keep the text matched so far, out of the overall match
|
||||
(?s:
|
||||
.*? # whatever,
|
||||
(?= # up till...
|
||||
^\k'INDENT' # ...equal indent at start-of-line for...
|
||||
\x24\x7B\k'ID'End\x7D # ...matching close indicator
|
||||
)
|
||||
)
|
||||
)
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?m)
|
||||
[^\r\n]+? # whatever,
|
||||
(?= # up till...
|
||||
\h* # ...optional whitespace and...
|
||||
(?:
|
||||
\x2F\x2A # ...start of multi line comment or...
|
||||
| [\x23;] # ...start of single line comment or...
|
||||
| $ # ...end-of-line
|
||||
)
|
||||
)
|
||||
"
|
||||
/>
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
138
bin/notepad++/functionList/overrideMap.xml
Normal file
138
bin/notepad++/functionList/overrideMap.xml
Normal file
@@ -0,0 +1,138 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<associationMap>
|
||||
<!--
|
||||
This file is optional (can be removed).
|
||||
Each functionlist parse rule links to a language ID ("langID").
|
||||
The "id" is the parse rule's default file name, but users can override it.
|
||||
Here are the default value they are using:
|
||||
|
||||
<association id= "php.xml" langID= "1" />
|
||||
<association id= "c.xml" langID= "2" />
|
||||
<association id= "cpp.xml" langID= "3" /> (C++)
|
||||
<association id= "cs.xml" langID= "4" /> (C#)
|
||||
<association id= "objc.xml" langID= "5" /> (Obective-C)
|
||||
<association id= "java.xml" langID= "6" />
|
||||
<association id= "rc.xml" langID= "7" /> (Windows Resource file)
|
||||
<association id= "html.xml" langID= "8" />
|
||||
<association id= "xml.xml" langID= "9" />
|
||||
<association id= "makefile.xml" langID= "10"/>
|
||||
<association id= "pascal.xml" langID= "11"/>
|
||||
<association id= "batch.xml" langID= "12"/>
|
||||
<association id= "ini.xml" langID= "13"/>
|
||||
<association id= "asp.xml" langID= "16"/>
|
||||
<association id= "sql.xml" langID= "17"/>
|
||||
<association id= "vb.xml" langID= "18"/>
|
||||
<association id= "css.xml" langID= "20"/>
|
||||
<association id= "perl.xml" langID= "21"/>
|
||||
<association id= "python.xml" langID= "22"/>
|
||||
<association id= "lua.xml" langID= "23"/>
|
||||
<association id= "tex.xml" langID= "24"/> (TeX)
|
||||
<association id= "fortran.xml" langID= "25"/>
|
||||
<association id= "bash.xml" langID= "26"/>
|
||||
<association id= "actionscript.xml" langID= "27"/>
|
||||
<association id= "nsis.xml" langID= "28"/>
|
||||
<association id= "tcl.xml" langID= "29"/>
|
||||
<association id= "lisp.xml" langID= "30"/>
|
||||
<association id= "scheme.xml" langID= "31"/>
|
||||
<association id= "asm.xml" langID= "32"/> (Assembly)
|
||||
<association id= "diff.xml" langID= "33"/>
|
||||
<association id= "props.xml" langID= "34"/>
|
||||
<association id= "postscript.xml" langID= "35"/>
|
||||
<association id= "ruby.xml" langID= "36"/>
|
||||
<association id= "smalltalk.xml" langID= "37"/>
|
||||
<association id= "vhdl.xml" langID= "38"/>
|
||||
<association id= "kix.xml" langID= "39"/> (KiXtart)
|
||||
<association id= "autoit.xml" langID= "40"/>
|
||||
<association id= "caml.xml" langID= "41"/>
|
||||
<association id= "ada.xml" langID= "42"/>
|
||||
<association id= "verilog.xml" langID= "43"/>
|
||||
<association id= "matlab.xml" langID= "44"/>
|
||||
<association id= "haskell.xml" langID= "45"/>
|
||||
<association id= "inno.xml" langID= "46"/> (Inno Setup)
|
||||
<association id= "cmake.xml" langID= "48"/>
|
||||
<association id= "yaml.xml" langID= "49"/>
|
||||
<association id= "cobol.xml" langID= "50"/>
|
||||
<association id= "gui4cli.xml" langID= "51"/>
|
||||
<association id= "d.xml" langID= "52"/>
|
||||
<association id= "powershell.xml" langID= "53"/>
|
||||
<association id= "r.xml" langID= "54"/>
|
||||
<association id= "jsp.xml" langID= "55"/>
|
||||
<association id= "coffeescript.xml" langID= "56"/>
|
||||
<association id= "json.xml" langID= "57"/>
|
||||
<association id= "javascript.js.xml" langID= "58"/>
|
||||
<association id= "fortran77.xml" langID= "59"/>
|
||||
<association id= "baanc.xml" langID= "60"/> (BaanC)
|
||||
<association id= "srec.xml" langID= "61"/> (Motorola S-Record binary data)
|
||||
<association id= "ihex.xml" langID= "62"/> (Intel HEX binary data)
|
||||
<association id= "tehex.xml" langID= "63"/> (Tektronix extended HEX binary data)
|
||||
<association id= "swift.xml" langID= "64"/>
|
||||
<association id= "asn1.xml" langID= "65"/> (Abstract Syntax Notation One)
|
||||
<association id= "avs.xml" langID= "66"/> (AviSynth)
|
||||
<association id= "blitzbasic.xml" langID= "67"/> (BlitzBasic)
|
||||
<association id= "purebasic.xml" langID= "68"/>
|
||||
<association id= "freebasic.xml" langID= "69"/>
|
||||
<association id= "csound.xml" langID= "70"/>
|
||||
<association id= "erlang.xml" langID= "71"/>
|
||||
<association id= "escript.xml" langID= "72"/>
|
||||
<association id= "forth.xml" langID= "73"/>
|
||||
<association id= "latex.xml" langID= "74"/>
|
||||
<association id= "mmixal.xml" langID= "75"/>
|
||||
<association id= "nimrod.xml" langID= "76"/>
|
||||
<association id= "nncrontab.xml" langID= "77"/> (extended crontab)
|
||||
<association id= "oscript.xml" langID= "78"/>
|
||||
<association id= "rebol.xml" langID= "79"/>
|
||||
<association id= "registry.xml" langID= "80"/>
|
||||
<association id= "rust.xml" langID= "81"/>
|
||||
<association id= "spice.xml" langID= "82"/>
|
||||
<association id= "txt2tags.xml" langID= "83"/>
|
||||
<association id= "visualprolog.xml" langID= "84"/>
|
||||
<association id= "typescript.xml" langID= "85"/>
|
||||
<association id= "mssql.xml" langID= "87"/>
|
||||
<association id= "gdscript.xml" langID= "88"/>
|
||||
<association id= "hollywood.xml" langID= "89"/>
|
||||
<association id= "go.xml" langID= "90"/>
|
||||
|
||||
If you create your own parse rule of supported languages (above) for your specific need,
|
||||
you can copy it without modifying the original one, and make it point to your rule.
|
||||
|
||||
For example, you have created your php parse rule, named "myphp2.xml". You add the rule file
|
||||
into the functionlist directory and add the following line in this file:
|
||||
<association id= "myphp2.xml" langID= "1" />
|
||||
and that's it.
|
||||
-->
|
||||
|
||||
|
||||
<!--
|
||||
As there is currently only one langID for COBOL:
|
||||
uncomment the following line to change to cobol-free.xml (cobol section free)
|
||||
if this is your favourite format
|
||||
-->
|
||||
<!--
|
||||
<association id= "cobol-free.xml" langID= "50"/>
|
||||
-->
|
||||
|
||||
<!--
|
||||
For User Defined Languages (UDL's) use:
|
||||
|
||||
<association id="my_parser.xml" userDefinedLangName="My UDL Name" />
|
||||
|
||||
If "My UDL Name" doesn't exist yet, you can create it via UDL dialog.
|
||||
-->
|
||||
<!-- ==================== User Defined Languages ============================ -->
|
||||
<association id= "krl.xml" userDefinedLangName="KRL"/>
|
||||
<association id= "nppexec.xml" userDefinedLangName="NppExec"/>
|
||||
<association id= "sinumerik.xml" userDefinedLangName="Sinumerik"/>
|
||||
<association id= "universe_basic.xml" userDefinedLangName="UniVerse BASIC"/>
|
||||
<!-- ======================================================================== -->
|
||||
</associationMap>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
183
bin/notepad++/functionList/pascal.xml
Normal file
183
bin/notepad++/functionList/pascal.xml
Normal file
@@ -0,0 +1,183 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ==================================================== [ Pascal ] -->
|
||||
|
||||
<parser
|
||||
displayName="Pascal"
|
||||
id ="pascal_syntax"
|
||||
commentExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?m-s:\x2F{2}.*$) # Single Line Comment
|
||||
| (?s:\x7B.*?\x7D) # Multi Line Comment 1st variant
|
||||
| (?s:\x28\x2A.*?\x2A\x29) # Multi Line Comment 2nd variant
|
||||
| (?is:^\h*INTERFACE\h*$.*?^\h*IMPLEMENTATION\h*$) # Prevent matching procedure/function declarations in interface section of unit
|
||||
"
|
||||
>
|
||||
<classRange
|
||||
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?im-s) # multi-line mode on, single-line mode off
|
||||
^\h* # optional leading whitespace
|
||||
(?: # indicator that following element exists on class level instead of instance level
|
||||
CLASS\s+
|
||||
)?
|
||||
(?:
|
||||
(?'CONSTRUCTOR_HEADER' # constructor
|
||||
CONSTRUCTOR
|
||||
)
|
||||
| (?'DESTRUCTOR_HEADER' # or destructor
|
||||
DESTRUCTOR
|
||||
)
|
||||
| (?'PROCEDURE_HEADER' # or procedure
|
||||
PROCEDURE
|
||||
)
|
||||
| (?'FUNCTION_HEADER' # or function
|
||||
FUNCTION
|
||||
)
|
||||
| (?'OPERATOR_HEADER' # or operator
|
||||
OPERATOR
|
||||
)
|
||||
)\s+
|
||||
(?'CLASS_NAME' # class/interface name
|
||||
(?:
|
||||
[A-Z_]\w*
|
||||
(?: # match generic classes too
|
||||
\s*<[^>]+>
|
||||
)?
|
||||
\s*\.\s*
|
||||
)+ # match nested classes too
|
||||
)
|
||||
(?'METHOD_NAME' # method name
|
||||
[A-Z_]\w*
|
||||
(?: # match generic methods too
|
||||
\s*<[^>]+>
|
||||
)?
|
||||
)
|
||||
(?'PARAM_LIST' # optional parameter list
|
||||
\s*\( # start-of-parameter-list indicator
|
||||
[^()]* # parameter list
|
||||
\) # end-of-parameter-list indicator
|
||||
)?
|
||||
(?('CONSTRUCTOR_HEADER') # constructors don't have a return type
|
||||
\s*
|
||||
; # end-of-statement indicator
|
||||
)
|
||||
(?('DESTRUCTOR_HEADER') # destructors don't have a return type
|
||||
\s*
|
||||
; # end-of-statement indicator
|
||||
)
|
||||
(?('PROCEDURE_HEADER') # procedures don't have a return type
|
||||
\s*
|
||||
; # end-of-statement indicator
|
||||
)
|
||||
(?('FUNCTION_HEADER') # functions have a return type
|
||||
\s*: # return type indicator
|
||||
\s*[^;]+ # return type identifier
|
||||
; # end-of-statement indicator
|
||||
)
|
||||
(?('OPERATOR_HEADER') # operators have a return type
|
||||
\s*: # type indicator
|
||||
\s*[^;]+ # type identifier
|
||||
; # end-of-statement indicator
|
||||
)
|
||||
"
|
||||
>
|
||||
<className>
|
||||
<nameExpr expr="(?i)(?:(CONSTRUCTOR|DESTRUCTOR|PROCEDURE|FUNCTION|OPERATOR)\s+)\K(?:(?:[A-Z_]\w*(?:\s*<[^>]+>)?\s*\.\s*)+)(?:[A-Z_]\w*)" />
|
||||
<nameExpr expr="(?i)(?:(?:[A-Z_]\w*(?:\s*<[^>]+>)?\s*\.\s*)+)(?=[A-Z_])" />
|
||||
<nameExpr expr="(?i)(?:(?:\s*\.\s*)?[A-Z_]\w*(?:\s*<[^>]+>)?)+(?!\Z)" />
|
||||
</className>
|
||||
<function
|
||||
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?im-s) # multi-line mode on, single-line mode off
|
||||
\s+
|
||||
( # class/interface name
|
||||
(?:
|
||||
[A-Z_]\w*
|
||||
(?: # match generic classes too
|
||||
\s*<[^>]+>
|
||||
)?
|
||||
\s*\.\s*
|
||||
)+ # match nested classes too
|
||||
)
|
||||
( # method name
|
||||
[A-Z_]\w*
|
||||
(?: # match generic methods too
|
||||
\s*<[^>]+>
|
||||
)?
|
||||
)
|
||||
( # optional parameter list
|
||||
\s*\( # start-of-parameter-list indicator
|
||||
[^()]* # parameter list
|
||||
\) # end-of-parameter-list indicator
|
||||
)?
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<funcNameExpr expr="(?i)(?:(?:[A-Z_]\w*(?:\s*<[^>]+>)?\s*\.\s*)+)\K(?:[A-Z_]\w*(?:\s*<[^>]+>)?)(?:\s*\([^()]*\))*" />
|
||||
<!-- comment out the following node to display the method with its parameters -->
|
||||
<funcNameExpr expr="(?i)(?:[A-Z_]\w*(?:\s*<[^>]+>)?)(?=\s*|\(|\Z)" />
|
||||
</functionName>
|
||||
</function>
|
||||
</classRange>
|
||||
<function
|
||||
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?im-s) # multi-line mode on, single-line mode off
|
||||
^\h* # optional leading whitespace
|
||||
(?:
|
||||
(?:
|
||||
PROCEDURE\s+ # procedure
|
||||
([A-Z_]\w*)\s* # name
|
||||
(?: # optional parameter list
|
||||
\([^()]*\)
|
||||
)?
|
||||
\s*; # end-of-statement indicator
|
||||
)
|
||||
| (?:
|
||||
FUNCTION\s+ # or function
|
||||
([A-Z_]\w*)\s* # name
|
||||
(?: # optional parameter list
|
||||
\([^()]*\)
|
||||
)?
|
||||
\s*: # return type indicator
|
||||
\s*[^;]+ # return type identifier
|
||||
; # end-of-statement indicator
|
||||
)
|
||||
)
|
||||
(?:\s*OVERLOAD\s*;)? # function/procedure overloading
|
||||
(?:\s*INLINE\s*;)? # function/procedure inlining
|
||||
(?:\s*(?:REGISTER|PASCAL|CDECL|STDCALL|SAFECALL|WINAPI)\s*;)? # calling convention
|
||||
(?: # external function from object file
|
||||
(?:\s*(?:VARARGS)\s*;) # variadic C function with cdecl calling convention
|
||||
| (?:\s*(?:EXTERNAL)\s+[^;]+;) # or normal function
|
||||
)?
|
||||
(?!
|
||||
(?:\s*FORWARD\s*;) # prevent matching forward declarations in implementation section of unit
|
||||
)
|
||||
(?= # only match function/procedure definitions
|
||||
(?:\s*
|
||||
(?: # optional comment
|
||||
(?s:\x7B.*?\x7D) # multi line comment 1st variant
|
||||
| (?s:\x28\x2A.*?\x2A\x29) # or multi line comment 2nd variant
|
||||
| (?-s:\x2F{2}.*$) # or single line comment
|
||||
)
|
||||
)*
|
||||
\s*(?:CONST|TYPE|VAR|LABEL|BEGIN|(?R))\s* # declaration block
|
||||
)
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr="(?i)(?:(PROCEDURE|FUNCTION)\s+)\K(?:[A-Z_]\w*)(?:\s*\([^()]*\))*" />
|
||||
<!-- comment out the following node to display the routine with its parameters -->
|
||||
<nameExpr expr="(?i)(?:[A-Z_]\w*)(?=\s*|\(|$)" />
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
40
bin/notepad++/functionList/perl.xml
Normal file
40
bin/notepad++/functionList/perl.xml
Normal file
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ======================================================== [ PERL ] -->
|
||||
<!-- PERL - Practical Extraction and Reporting Language -->
|
||||
|
||||
<parser
|
||||
displayName="PERL"
|
||||
id ="perl_function"
|
||||
commentExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?m-s:\x23.*$) # Single Line Comment
|
||||
"
|
||||
>
|
||||
<function
|
||||
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
sub
|
||||
\s+
|
||||
[A-Za-z_]\w*
|
||||
(\s*\([^()]*\))? # prototype or signature
|
||||
(\s*\:\s*[^{]+)? # attributes
|
||||
\s*\{ # start of class body
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr="(?:sub\s+)?\K[A-Za-z_]\w*" />
|
||||
</functionName>
|
||||
<className>
|
||||
<nameExpr expr="[A-Za-z_]\w*(?=\s*:{2})" />
|
||||
</className>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
201
bin/notepad++/functionList/php.xml
Normal file
201
bin/notepad++/functionList/php.xml
Normal file
@@ -0,0 +1,201 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ========================================================= [ PHP ] -->
|
||||
<!-- PHP - Personal Home Page / PHP Hypertext Preprocessor -->
|
||||
|
||||
<parser
|
||||
displayName="PHP - Personal Home Page / PHP Hypertext Preprocessor"
|
||||
id ="php_syntax"
|
||||
commentExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
(?s:\x2F\x2A.*?\x2A\x2F) # Multi Line Comment x2F -> '/' x2A -> '*'
|
||||
| (?m-s:(?:\x23|\x2F{2}).*$) # Single Line Comment 1 # and 2 //
|
||||
# | (?s:\x22(?:[^\x22\x24\x5C]|\x5C.)*\x22) # String Literal - Double Quoted
|
||||
| (?s:\x22(?:[^\x22\x5C]|\x5C.)*\x22) # String Literal - Double Quoted
|
||||
| (?s:\x27(?:[^\x27\x5C]|\x5C.)*\x27) # String Literal - Single Quoted
|
||||
| (?: # Here Document
|
||||
\x3C{3}(?'HDID'[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]*)[^\r\n]*(?:\r?\n|\n?\r)
|
||||
(?s:.*?)
|
||||
(?:\r?\n|\n?\r)\k'HDID' # close with exactly the same identifier, in the first column
|
||||
)
|
||||
| (?: # Now Document
|
||||
\x3C{3}\x27(?'NDID'[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]*)\x27[^\r\n]*(?:\r?\n|\n?\r)
|
||||
(?s:.*?)
|
||||
(?:\r?\n|\n?\r)\k'NDID' # close with exactly the same identifier, in the first column
|
||||
)
|
||||
"
|
||||
>
|
||||
<classRange
|
||||
mainExpr ="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
(?(DEFINE) # definition of sub-routines
|
||||
(?'VALID_ID'
|
||||
\b(?!(?-i: # keywords (case-sensitive), not to be used as identifier
|
||||
a(?:bstract|nd|rray|s)
|
||||
| b(?:ool|reak)
|
||||
| c(?:a(?:llable|se|tch)|l(?:ass|one)|on(?:st|tinue))
|
||||
| d(?:e(?:clare|fault)|ie|o)
|
||||
| e(?:cho|lse(?:if)?|mpty|nd(?:declare|for(?:each)?|if|switch|while)|val|x(?:it|tends))
|
||||
| f(?:alse|loat|inal|or(?:each)?|unction)
|
||||
| g(?:lobal|oto)
|
||||
| i(?:f|mplements|n(?:clude(?:_once)?|st(?:anceof|eadof)|t(?:erface)?)|sset)
|
||||
| list
|
||||
| mixed
|
||||
| n(?:amespace|ew|u(?:ll|meric))
|
||||
| o(?:r|bject)
|
||||
| p(?:r(?:i(?:nt|vate)|otected)|ublic)
|
||||
| re(?:quire(?:_once)?|turn)
|
||||
| s(?:t(?:atic|ring)|witch)
|
||||
| t(?:hrow|r(?:ait|ue|y))
|
||||
| u(?:nset|se)
|
||||
| var
|
||||
| while
|
||||
| xor
|
||||
| __(?:halt_compiler|(?:CLASS|DIR|F(?:ILE|UNCTION)|LINE|METHOD|NAMESPACE|TRAIT)__)
|
||||
)\b)
|
||||
[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]* # valid character combination for identifiers
|
||||
)
|
||||
(?'INTERFACE_LIST'
|
||||
\s+(?:\x5C|(?&VALID_ID))+
|
||||
(?:
|
||||
\s*,
|
||||
\s*(?:\x5C|(?&VALID_ID))+
|
||||
)*
|
||||
)
|
||||
)
|
||||
(?m-i) # ^ and $ match at line-breaks, case-sensitive
|
||||
^\h* # optional leading white-space at start-of-line
|
||||
(?:
|
||||
(?:(?-i:abstract|final)\s+)? # optional class entry type
|
||||
(?-i:class)\s+
|
||||
\K # discard text matched so far
|
||||
(?&VALID_ID) # identifier used as class name
|
||||
(?: # optional extends-from-class
|
||||
\s+(?-i:extends)
|
||||
\s+(?:\x5C|(?&VALID_ID))+
|
||||
)?
|
||||
(?: # optional implements-class/interfaces
|
||||
\s+(?-i:implements)
|
||||
(?&INTERFACE_LIST)
|
||||
)?
|
||||
|
|
||||
(?-i:interface)\s+
|
||||
\K # discard text matched so far
|
||||
(?&VALID_ID) # identifier used as interface name
|
||||
(?: # optional extends-from list
|
||||
\s+(?-i:extends)
|
||||
(?&INTERFACE_LIST)
|
||||
)?
|
||||
|
|
||||
(?-i:trait)\s+
|
||||
\K # discard text matched so far
|
||||
(?&VALID_ID) # identifier used as trait name
|
||||
)
|
||||
\s*\{
|
||||
"
|
||||
openSymbole ="\{"
|
||||
closeSymbole="\}"
|
||||
>
|
||||
<className>
|
||||
<nameExpr expr="[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]*" />
|
||||
</className>
|
||||
<function
|
||||
mainExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
(?m-i) # ^ and $ match at line-breaks, case-sensitive
|
||||
^\h* # optional leading white-space at start-of-line
|
||||
(?:(?-i: # field modifiers
|
||||
p(?:r(?:ivate|otected)|ublic) # - access modifiers
|
||||
| abstract|final|static # - ...
|
||||
)\s+)* # require a white-space separator
|
||||
(?-i:function)\s+
|
||||
\K # discard text matched so far
|
||||
(?:\x26\s*)? # optionally a reference
|
||||
(?'VALID_ID' # valid identifier, use as subroutine
|
||||
\b(?!(?-i: # keywords (case-sensitive), not to be used as identifier
|
||||
a(?:bstract|nd|rray|s)
|
||||
| b(?:ool|reak)
|
||||
| c(?:a(?:llable|se|tch)|l(?:ass|one)|on(?:st|tinue))
|
||||
| d(?:e(?:clare|fault)|ie|o)
|
||||
| e(?:cho|lse(?:if)?|mpty|nd(?:declare|for(?:each)?|if|switch|while)|val|x(?:it|tends))
|
||||
| f(?:alse|loat|inal|or(?:each)?|unction)
|
||||
| g(?:lobal|oto)
|
||||
| i(?:f|mplements|n(?:clude(?:_once)?|st(?:anceof|eadof)|t(?:erface)?)|sset)
|
||||
| list
|
||||
| mixed
|
||||
| n(?:amespace|ew|u(?:ll|meric))
|
||||
| o(?:r|bject)
|
||||
| p(?:r(?:i(?:nt|vate)|otected)|ublic)
|
||||
| re(?:quire(?:_once)?|turn)
|
||||
| s(?:t(?:atic|ring)|witch)
|
||||
| t(?:hrow|r(?:ait|ue|y))
|
||||
| u(?:nset|se)
|
||||
| var
|
||||
| while
|
||||
| xor
|
||||
| __(?:halt_compiler|(?:CLASS|DIR|F(?:ILE|UNCTION)|LINE|METHOD|NAMESPACE|TRAIT)__)
|
||||
)\b)
|
||||
[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]* # valid character combination for identifiers
|
||||
) # identifier used as method name
|
||||
\s*\( # start of function parameters
|
||||
(?:[^{;]*(?:\{|;)) # start of function body or abstract function without body
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<funcNameExpr expr="(?:\x26\s*)?[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]*\s*\((?:[^/{]|/(?![*/]))*" />
|
||||
<!-- comment out the following node to display the method with parameters -->
|
||||
<funcNameExpr expr="(?:\x26\s*)?[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]*" />
|
||||
</functionName>
|
||||
</function>
|
||||
</classRange>
|
||||
<function
|
||||
mainExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
(?m-i) # ^ and $ match at line-breaks, case-sensitive
|
||||
^\h* # optional leading white-space at start-of-line
|
||||
(?-i:function)\s+
|
||||
\K # discard text matched so far
|
||||
(?:\x26\s*)? # optionally a reference
|
||||
(?'VALID_ID' # valid identifier, use as subroutine
|
||||
\b(?!(?-i: # keywords (case-sensitive), not to be used as identifier
|
||||
a(?:bstract|nd|rray|s)
|
||||
| b(?:ool|reak)
|
||||
| c(?:a(?:llable|se|tch)|l(?:ass|one)|on(?:st|tinue))
|
||||
| d(?:e(?:clare|fault)|ie|o)
|
||||
| e(?:cho|lse(?:if)?|mpty|nd(?:declare|for(?:each)?|if|switch|while)|val|x(?:it|tends))
|
||||
| f(?:alse|loat|inal|or(?:each)?|unction)
|
||||
| g(?:lobal|oto)
|
||||
| i(?:f|mplements|n(?:clude(?:_once)?|st(?:anceof|eadof)|t(?:erface)?)|sset)
|
||||
| list
|
||||
| mixed
|
||||
| n(?:amespace|ew|u(?:ll|meric))
|
||||
| o(?:r|bject)
|
||||
| p(?:r(?:i(?:nt|vate)|otected)|ublic)
|
||||
| re(?:quire(?:_once)?|turn)
|
||||
| s(?:t(?:atic|ring)|witch)
|
||||
| t(?:hrow|r(?:ait|ue|y))
|
||||
| u(?:nset|se)
|
||||
| var
|
||||
| while
|
||||
| xor
|
||||
| __(?:halt_compiler|(?:CLASS|DIR|F(?:ILE|UNCTION)|LINE|METHOD|NAMESPACE|TRAIT)__)
|
||||
)\b)
|
||||
[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]* # valid character combination for identifiers
|
||||
) # identifier used as function name
|
||||
\s*\( # start of function parameters
|
||||
[^{]*\{ # start of function body
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr="(?:\x26\s*)?[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]*\s*\((?:[^/{]|/(?![*/]))*" />
|
||||
<!-- comment out the following node to display the function with its parameters -->
|
||||
<!-- <nameExpr expr="(?:\x26\s*)?[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]*" /> -->
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
44
bin/notepad++/functionList/powershell.xml
Normal file
44
bin/notepad++/functionList/powershell.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ================================================== [ PowerShell ] -->
|
||||
|
||||
<parser
|
||||
displayName="PowerShell"
|
||||
id ="powershell_function"
|
||||
commentExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?s:\x3C\x23(?:[^\x23]|\x23[^\x3E])*\x23\x3E) # Multi Line Comment
|
||||
| (?m-s:\x23.*$) # Single Line Comment
|
||||
"
|
||||
>
|
||||
<function
|
||||
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
\b
|
||||
(?:function|filter)
|
||||
\s+
|
||||
(?:
|
||||
[A-Za-z_]\w*
|
||||
:
|
||||
)?
|
||||
[A-Za-z_][\w\-]*
|
||||
\s*
|
||||
[({]
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr="[A-Za-z_][\w\-]*(?=\s*[({])" />
|
||||
</functionName>
|
||||
<className>
|
||||
<nameExpr expr="[A-Za-z_]\w*(?=:)" />
|
||||
</className>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
41
bin/notepad++/functionList/python.xml
Normal file
41
bin/notepad++/functionList/python.xml
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ====================================================== [ Python ] -->
|
||||
|
||||
<parser
|
||||
displayName="Python"
|
||||
id ="python_syntax"
|
||||
commentExpr="(?s:'''.*?''')|(?m-s:#.*?$)"
|
||||
>
|
||||
<classRange
|
||||
mainExpr ="^class\x20\K.*?(?=\n\S|\Z)"
|
||||
>
|
||||
<className>
|
||||
<nameExpr expr="\w+(?=\s*[\(|:])" />
|
||||
</className>
|
||||
<function
|
||||
mainExpr="\s(async )?def\x20\K.+?(?=(:$|,$|:\s*#))"
|
||||
>
|
||||
<functionName>
|
||||
<funcNameExpr expr=".*" />
|
||||
</functionName>
|
||||
</function>
|
||||
</classRange>
|
||||
<function
|
||||
mainExpr="^(async )?def\x20\K.+?(?=(:$|,$|:\s*#))"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr=".*" />
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
39
bin/notepad++/functionList/raku.xml
Normal file
39
bin/notepad++/functionList/raku.xml
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ======================================================== [ Raku ] -->
|
||||
|
||||
<parser
|
||||
displayName="Raku"
|
||||
id ="raku_function"
|
||||
commentExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?m-s:\x23.*$) # Single Line Comment
|
||||
"
|
||||
>
|
||||
<function
|
||||
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
sub
|
||||
\s+
|
||||
[A-Za-z_]\w*
|
||||
(\s*\([^()]*\))? # prototype or signature
|
||||
(\s*\:\s*[^{]+)? # attributes
|
||||
\s*\{ # start of class body
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr="(?:sub\s+)?\K[A-Za-z_]\w*" />
|
||||
</functionName>
|
||||
<className>
|
||||
<nameExpr expr="[A-Za-z_]\w*(?=\s*:{2})" />
|
||||
</className>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
42
bin/notepad++/functionList/ruby.xml
Normal file
42
bin/notepad++/functionList/ruby.xml
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ======================================================== [ Ruby ] -->
|
||||
|
||||
<parser
|
||||
displayName="Ruby"
|
||||
id ="ruby_syntax"
|
||||
>
|
||||
<!-- within a class-->
|
||||
<classRange
|
||||
mainExpr ="^class\x20\K.*?(?=\n\S|\Z)"
|
||||
>
|
||||
<className>
|
||||
<nameExpr expr="\w+" />
|
||||
</className>
|
||||
<function
|
||||
mainExpr="^\s*def\s+\w+"
|
||||
>
|
||||
<functionName>
|
||||
<funcNameExpr expr="def\s\K\w+" />
|
||||
</functionName>
|
||||
</function>
|
||||
</classRange>
|
||||
<!-- without class-->
|
||||
<function
|
||||
mainExpr="^\s*def\s+\w+"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr="def\s\K\w+" />
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
46
bin/notepad++/functionList/rust.xml
Normal file
46
bin/notepad++/functionList/rust.xml
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- =========================================================== [ C ] -->
|
||||
<parser
|
||||
displayName="Rust"
|
||||
id ="rust_function"
|
||||
commentExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?s:\x2F\x2A.*?\x2A\x2F) # Multi Line Comment
|
||||
| (?m-s:\x2F{2}.*$) # Single Line Comment
|
||||
"
|
||||
>
|
||||
<function
|
||||
mainExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
^\h* # optional leading whitespace at start-of-line
|
||||
(?:
|
||||
(?-i:
|
||||
async
|
||||
| const
|
||||
| (?-i:extern\s+(?s:\x22(?:[^\x22\x5C]|\x5C.)*\x22))
|
||||
| unsafe
|
||||
)
|
||||
\s+
|
||||
)*
|
||||
(?-i:fn)\s+
|
||||
\K # discard text matched so far
|
||||
(?:[a-zA-Z][a-zA-Z0-9_]*|_[a-zA-Z0-9_]+) # valid character combination for identifiers
|
||||
(?:<.*$gt;)? # optional generic params
|
||||
(?:\s*\([^()]*\))? # optional parameter list
|
||||
"
|
||||
>
|
||||
<!-- comment out the following node to display the method with its parameters -->
|
||||
<functionName>
|
||||
<nameExpr expr="\w+" />
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
29
bin/notepad++/functionList/sinumerik.xml
Normal file
29
bin/notepad++/functionList/sinumerik.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- =================================================== [ Sinumerik ] -->
|
||||
<!-- Sinumerik - Siemens Numeric Control -->
|
||||
|
||||
<!--
|
||||
| https://notepad-plus-plus.org/community/topic/12520/function-list-for-simatic
|
||||
| 20161113: Added `(?!\$PATH)` to get around restriction/bug of
|
||||
| two characters required before comment.
|
||||
\-->
|
||||
<parser
|
||||
displayName="Sinumerik"
|
||||
id ="sinumerik_function"
|
||||
commentExpr="(?m-s:;(?!\$PATH).*?$)"
|
||||
>
|
||||
<function
|
||||
mainExpr="(?m)^%_N_\K[A-Za-z_]\w*"
|
||||
/>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
25
bin/notepad++/functionList/sql.xml
Normal file
25
bin/notepad++/functionList/sql.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ========================================================= [ PL/SQL ] -->
|
||||
<parser id="plsql_function" displayName="PL/SQL" commentExpr="((/\*.*?\*)/|(//.*?$))">
|
||||
<function
|
||||
mainExpr="^[ \t]*((PROCEDURE)|(FUNCTION))[\s]+[A-Za-z][\w_]*([\s]*(?'open'\().*?(\)))?(([\s]*;)|([\s]*([ia]s)\s)|([\s]+(RETURN)([\s]+[\w%\.]+)+(([\s]*;)|([\s]+([ia]s)\s))))"
|
||||
displayMode="$className->$functionName"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr="[\s]+[A-Za-z][\w_]*([\s]*(?'open'\().*?(\)))?(([\s]*;)|([\s]*([ia]s)\s)|([\s]+(RETURN)([\s]+[\w%\.]+)+(([\s]*;)|([\s]+([ia]s)\s))))"/>
|
||||
<nameExpr expr="[A-Za-z][\w_]*([\s]*(?'open'\().*?(\)))?(([\s]*;)|([\s]*([ia]s)\s)|([\s]+(RETURN)([\s]+[\w%\.]+)+(([\s]*;)|([\s]+([ia]s)\s))))"/>
|
||||
<nameExpr expr="[A-Za-z][\w_]*([\s]*\([^\)]*\))?(([\s]+(RETURN)([\s]+[\w%\.]+)+))*"/>
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
32
bin/notepad++/functionList/tex.xml
Normal file
32
bin/notepad++/functionList/tex.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link: https://npp-user-manual.org/docs/function-list/
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<parser
|
||||
displayName="TeX Syntax"
|
||||
id ="tex_function"
|
||||
commentExpr="(?x)
|
||||
(%.*?$) # Comment
|
||||
"
|
||||
|
||||
>
|
||||
<function
|
||||
mainExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
(?im-s) # ignore case, ^ and $ match start/end of line, dot doesn't match newline
|
||||
\\(begin|
|
||||
part\*?|
|
||||
chapter\*?|
|
||||
section\*?|
|
||||
subsection\*?|
|
||||
subsubsection\*?|
|
||||
paragraph\*?|
|
||||
subparagraph\*?)
|
||||
{.*}"
|
||||
>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
30
bin/notepad++/functionList/toml.xml
Normal file
30
bin/notepad++/functionList/toml.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ========================================= [ Initialisation File ] -->
|
||||
<!-- File format used for TOML -->
|
||||
|
||||
<parser
|
||||
displayName="TOML Table"
|
||||
id ="toml_table"
|
||||
commentExpr="(?x)
|
||||
(?m-s:[#].*$) # Single Line Comment
|
||||
"
|
||||
>
|
||||
<function
|
||||
mainExpr="^\h*[\[[\w\."\-']+\]"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr="[\w\."\-']+" />
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
32
bin/notepad++/functionList/typescript.xml
Normal file
32
bin/notepad++/functionList/typescript.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ================================================ [ TypeScript ] -->
|
||||
|
||||
<parser
|
||||
displayName="TypeScript"
|
||||
id ="typescript_function"
|
||||
commentExpr="(?s:/\*.*?\*/)|(?m-s://.*?$)"
|
||||
>
|
||||
<function
|
||||
mainExpr="((^|\s+|[;\}\.])([A-Za-z_$][\w$]*\.)*[A-Za-z_$][\w$]*\s*[=:]|^|[\s;\}]+)\s*function(\s+[A-Za-z_$][\w$]*)?\s*\([^\)\(]*\)[\n\s]*\{"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr="[A-Za-z_$][\w$]*\s*[=:]|[A-Za-z_$][\w$]*\s*\(" />
|
||||
<nameExpr expr="[A-Za-z_$][\w$]*" />
|
||||
</functionName>
|
||||
<className>
|
||||
<nameExpr expr="([A-Za-z_$][\w$]*\.)*[A-Za-z_$][\w$]*\." />
|
||||
<nameExpr expr="([A-Za-z_$][\w$]*\.)*[A-Za-z_$][\w$]*" />
|
||||
</className>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
43
bin/notepad++/functionList/universe_basic.xml
Normal file
43
bin/notepad++/functionList/universe_basic.xml
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ============================================== [ UniVerse BASIC ] -->
|
||||
|
||||
<!--
|
||||
| Based on:
|
||||
| https://notepad-plus-plus.org/community/topic/12742/functionlist-different-results-with-different-line-endings
|
||||
\-->
|
||||
<parser
|
||||
displayName="UniVerse BASIC"
|
||||
id ="universe_basic"
|
||||
commentExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?m-s:
|
||||
(?:^|;) # at start-of-line or after end-of-statement
|
||||
\h* # optional leading whitespace
|
||||
(?-i:REM\b|\x24\x2A|[\x21\x2A]) # Single Line Comment 1..4
|
||||
.*$ # whatever, until end-of-line
|
||||
)
|
||||
| (?:\x22[^\x22\r\n]*\x22) # String Literal - Double Quoted
|
||||
| (?:\x27[^\x27\r\n]*\x27) # String Literal - Single Quoted
|
||||
| (?:\x5C[^\x5C\r\n]*\x5C) # String Literal - Backslash Quoted
|
||||
"
|
||||
>
|
||||
<function
|
||||
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?m-i)^ # case-sensitive, NO leading whitespace
|
||||
(?:
|
||||
\d+\b(?=:?) # completely numeric label, colon optional + discarded
|
||||
| [A-Za-z_][\w.$%]*(?=:) # alphanumeric label, colon required + discarded
|
||||
)
|
||||
"
|
||||
/>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
39
bin/notepad++/functionList/vhdl.xml
Normal file
39
bin/notepad++/functionList/vhdl.xml
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ======================================================== [ VHDL ] -->
|
||||
<!--
|
||||
| Derived from :
|
||||
| https://community.notepad-plus-plus.org/topic/11554/function-list-for-vhdl
|
||||
\-->
|
||||
<parser
|
||||
displayName="VHDL"
|
||||
id ="vhdl_syntax"
|
||||
>
|
||||
<function
|
||||
mainExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`)
|
||||
^ # match at beginning of line
|
||||
\h* # optional leading whitespace
|
||||
(\w+\h*:)? # ID of process
|
||||
(?:\h(?!END)\w+\h)* # make sure this is not the end of a module
|
||||
\h*
|
||||
(?(1)(?:ENTITY|BLOCK|PROCESS)| # keywords if ':' was detected before
|
||||
(?:ENTITY|COMPONENT|ARCHITECTURE)) # keywords else
|
||||
[\h\(]+ # expect at least one blank or parentheses
|
||||
[A-Za-z0-9_\(\)., ]+ # ID or sensitivity list
|
||||
(?!\;)"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr=".*" />
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
45
bin/notepad++/functionList/xml.xml
Normal file
45
bin/notepad++/functionList/xml.xml
Normal file
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- ==========================================================================\
|
||||
|
|
||||
| To learn how to make your own language parser, please check the following
|
||||
| link:
|
||||
| https://npp-user-manual.org/docs/function-list/
|
||||
|
|
||||
\=========================================================================== -->
|
||||
<NotepadPlus>
|
||||
<functionList>
|
||||
<!-- ========================================================= [ XML ] -->
|
||||
<!-- XML - eXtensible Markup Language -->
|
||||
|
||||
<parser
|
||||
displayName="XML Node"
|
||||
id ="xml_node"
|
||||
commentExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
(?:\x3C!--(?:[^\-]|-(?!-\x3E))*--\x3E) # Multi Line Comment
|
||||
"
|
||||
>
|
||||
<function
|
||||
mainExpr="(?x) # Utilize inline comments (see `RegEx - Pattern Modifiers`)
|
||||
\x3C # begin of node
|
||||
(?:
|
||||
(?-i:\?XML) # only name of root node is allowed to start with a question mark
|
||||
| \w+(?::\w+)? # a node name can contain a colon e.g. `xs:schema`
|
||||
)
|
||||
(?: # match attributes
|
||||
\s+ # at least one whitespace before attribute-name
|
||||
\w+(?::\w+)? # an attribute name can contain a colon e.g. `xmlns:xs`
|
||||
\h*=\h* # name-value separator can be surrounded by blanks
|
||||
(?: # quoted attribute value, embedded escaped quotes allowed...
|
||||
\x22(?:[^\x22\x5C]|\x5C.)*?\x22 # ...double quoted...
|
||||
| \x27(?:[^\x27\x5C]|\x5C.)*?\x27 # ...single quoted
|
||||
)
|
||||
)+ # only match nodes with at least one attribute
|
||||
"
|
||||
>
|
||||
<functionName>
|
||||
<nameExpr expr="[^\x3C]*" />
|
||||
</functionName>
|
||||
</function>
|
||||
</parser>
|
||||
</functionList>
|
||||
</NotepadPlus>
|
||||
Reference in New Issue
Block a user