| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!-- ==========================================================================\
- |
- | To learn how to make your own language parser, please check the following
- | link:
- | http://notepad-plus-plus.org/features/function-list.html
- |
- \=========================================================================== -->
- <NotepadPlus>
- <functionList>
- <associationMap>
- <!--
- langID:
- Don't use L_JS (19) use L_JAVASCRIPT (58) instead!
- Don't use L_USER and L_EXTERNAL, use extension or UDL name association instead!
- L_ADA = 42 | L_DIFF = 33 | L_LISP = 30 | L_SCHEME = 31
- L_ASCII = 14 | L_EXTERNAL = 60 | L_LUA = 23 | L_SEARCHRESULT = 47
- L_ASM = 32 | L_FLASH = 27 | L_MAKEFILE = 10 | L_SMALLTALK = 37
- L_ASP = 16 | L_FORTRAN = 25 | L_MATLAB = 44 | L_SQL = 17
- L_AU3 = 40 | L_FORTRAN_77 = 59 | L_NSIS = 28 | L_TCL = 29
- L_BASH = 26 | L_GUI4CLI = 51 | L_OBJC = 5 | L_TEX = 24
- L_BATCH = 12 | L_HASKELL = 45 | L_PASCAL = 11 | L_TEXT = 0
- L_C = 2 | L_HTML = 8 | L_PERL = 21 | L_USER = 15
- L_CAML = 41 | L_INI = 13 | L_PHP = 1 | L_VB = 18
- L_CMAKE = 48 | L_INNO = 46 | L_POWERSHELL = 53 | L_VERILOG = 43
- L_COBOL = 50 | L_JAVA = 6 | L_PROPS = 34 | L_VHDL = 38
- L_COFFEESCRIPT = 56 | L_JAVASCRIPT = 58 | L_PS = 35 | L_XML = 9
- L_CPP = 3 | L_JS = 19 | L_PYTHON = 22 | L_YAML = 49
- L_CS = 4 | L_JSON = 57 | L_R = 54 |
- L_CSS = 20 | L_JSP = 55 | L_RC = 7 |
- L_D = 52 | L_KIX = 39 | L_RUBY = 36 |
- 0 = L_TEXT | 16 = L_ASP | 32 = L_ASM | 48 = L_CMAKE
- 1 = L_PHP | 17 = L_SQL | 33 = L_DIFF | 49 = L_YAML
- 2 = L_C | 18 = L_VB | 34 = L_PROPS | 50 = L_COBOL
- 3 = L_CPP | 19 = L_JS | 35 = L_PS | 51 = L_GUI4CLI
- 4 = L_CS | 20 = L_CSS | 36 = L_RUBY | 52 = L_D
- 5 = L_OBJC | 21 = L_PERL | 37 = L_SMALLTALK | 53 = L_POWERSHELL
- 6 = L_JAVA | 22 = L_PYTHON | 38 = L_VHDL | 54 = L_R
- 7 = L_RC | 23 = L_LUA | 39 = L_KIX | 55 = L_JSP
- 8 = L_HTML | 24 = L_TEX | 40 = L_AU3 | 56 = L_COFFEESCRIPT
- 9 = L_XML | 25 = L_FORTRAN | 41 = L_CAML | 57 = L_JSON
- 10 = L_MAKEFILE | 26 = L_BASH | 42 = L_ADA | 58 = L_JAVASCRIPT
- 11 = L_PASCAL | 27 = L_FLASH | 43 = L_VERILOG | 59 = L_FORTRAN_77
- 12 = L_BATCH | 28 = L_NSIS | 44 = L_MATLAB | 60 = L_EXTERNAL
- 13 = L_INI | 29 = L_TCL | 45 = L_HASKELL |
- 14 = L_ASCII | 30 = L_LISP | 46 = L_INNO |
- 15 = L_USER | 31 = L_SCHEME | 47 = L_SEARCHRESULT |
- if langID cannot be found above, you can set the file extensions ...
- <association id="my_parser_id" ext=".my_parser_ext1" />
- <association id="my_parser_id" ext=".my_parser_ext2" />
- and for User Defined Languages (UDL's) use ...
- <association id="my_parser_id" userDefinedLangName="My UDL Name" />
- Note(s):
- Not required, just a guide.
- Suffix Indicates
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- _class parser has a class part only
- _function parser has a function part only
- _syntax parser has both a class and function part
- -->
- <!-- ======================================================================== -->
- <!-- ___ parserID -->
- <!-- V -->
- <association id= "php_syntax" langID= "1" />
- <association id= "c_function" langID= "2" />
- <association id= "cplusplus_syntax" langID= "3" />
- <association id= "csharp_class" langID= "4" />
- <association id= "java_syntax" langID= "6" />
- <association id= "xml_node" langID= "9" />
- <association id= "batch_label" langID="12" />
- <association id= "ini_section" langID="13" />
- <association id= "perl_function" langID="21" />
- <association id= "python_syntax" langID="22" />
- <association id= "bash_function" langID="26" />
- <association id= "nsis_syntax" langID="28" />
- <association id= "assembly_subroutine" langID="32" />
- <association id= "ruby_syntax" langID="36" />
- <association id= "autoit3_function" langID="40" />
- <association id= "innosetup_syntax" langID="46" />
- <association id= "powershell_function" langID="53" />
- <association id= "javascript_function" langID="58" />
- <!-- ======================================================================== -->
- <association id= "baanc_section" langID="60" />
- <!-- ======================================================================== -->
- <association id= "krl_function" userDefinedLangName="KRL" />
- <association id= "krl_function" ext=".src" />
- <association id= "krl_function" ext=".sub" />
- <!-- ======================================================================== -->
- <association id= "sinumerik_function" userDefinedLangName="Sinumerik" />
- <association id= "sinumerik_function" ext=".arc" />
- <!-- ======================================================================== -->
- <association id= "universe_basic" userDefinedLangName="UniVerse BASIC" />
- <association id= "universe_basic" ext=".bas" />
- <!-- ======================================================================== -->
- </associationMap>
- <parsers>
- <!-- ========================================================= [ PHP ] -->
- <!-- PHP - Personal Home Page / PHP Hypertext Preprocessor -->
- <parser
- id ="php_syntax"
- displayName="PHP"
- commentExpr="(?s:/\*.*?\*/)|(?m-s://.*?$)"
- >
- <classRange
- mainExpr ="^\s*(class|abstract\s+class|final\s+class|interface|trait)[\t\x20]+[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]*(\s*|\s*(extends|implements|(extends\s+(\\|[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]*)+\s+implements))\s+(\,\s*|(\\|[A-Za-z_\x7F-\xFF][\w\x7F-\xFF]*))+\s*)?\{"
- openSymbole ="\{"
- closeSymbole="\}"
- >
- <className>
- <nameExpr expr="(class|abstract\s+class|final\s+class|interface|trait)\s+\w+" />
- <nameExpr expr="\s+\w+\Z" />
- <nameExpr expr="\w+\Z" />
- </className>
- <function
- mainExpr="^\s*((static|public|protected|private|final)*(\s+(static|public|protected|private|final))+\s+)?(function\s+)+(\w+(\s+\w+)?(\s+|\*\s+|\s+\*|\s+\*\s+))?(\w+\s*::)?(?!(if|while|for|switch))[\w~]+\s*\([^\{]*\{"
- >
- <functionName>
- <funcNameExpr expr="(?!(if|while|for|switch))\w+\s*\([^\{]*" />
- <!-- comment out the following node to display the method with parameters -->
- <funcNameExpr expr="(?!(if|while|for|switch))\w+" />
- </functionName>
- </function>
- </classRange>
- <function
- mainExpr="^\s*function\s+\w+\s*\("
- >
- <functionName>
- <nameExpr expr="(?!(if|while|for))\w+\s*\(" />
- <nameExpr expr="(?!(if|while|for))\w+" />
- </functionName>
- <className>
- <nameExpr expr="\w+(?=\s*::)" />
- </className>
- </function>
- </parser>
- <!-- =========================================================== [ 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>
- <!-- ========================================================= [ C++ ] -->
- <parser
- displayName="C++"
- id ="cplusplus_syntax"
- commentExpr="(?s:/\*.*?\*/)|(?m-s://.*?$)"
- >
- <classRange
- mainExpr ="^[\t\x20]*(class|struct)[\t\x20]+\w+\s*(final)?\s*(:\s*(public|protected|private)\s+\w+\s*)?\{"
- openSymbole ="\{"
- closeSymbole="\}"
- >
- <className>
- <nameExpr expr="(class|struct)[\t\x20]+\w+" />
- <nameExpr expr="[\t\x20]+\w+" />
- <nameExpr expr="\w+" />
- </className>
- <function
- mainExpr="^[\t\x20]*((static|const|virtual)\s+)?(\w+(\s+\w+)?(\s+|(\*|\*\*|&)\s+|\s+(\*|\*\*|&)|\s+(\*|\*\*|&)\s+))?(\w+\s*::)?(?!(if|while|for|switch))[\w~]+\s*\([^\)\(]*\)(\s*const\s*)?(\s*(final|override|final\s*override|override\s*final)\s*)?[\n\s]*\{"
- >
- <functionName>
- <funcNameExpr expr="(?!(if|while|for|switch))[\w~]+\s*\(" />
- <funcNameExpr expr="(?!(if|while|for|switch))[\w~]+" />
- </functionName>
- </function>
- </classRange>
- <function
- mainExpr="^[\t\x20]*((static|const|virtual)\s+)?\w+(\s+\w+)?(\s+|(\*|\*\*|&)\s+|\s+(\*|\*\*|&)|\s+(\*|\*\*|&)\s+)(\w+\s*::)?(?!(if|while|for))\w+\s*\([^\)\(]*\)(\s*const\s*)?[\n\s]*\{"
- >
- <functionName>
- <nameExpr expr="(?!(if|while|for))\w+\s*\(" />
- <nameExpr expr="(?!(if|while|for))\w+" />
- </functionName>
- <className>
- <nameExpr expr="\w+(?=\s*::)" />
- </className>
- </function>
- </parser>
- <!-- ========================================================== [ 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>
- <!-- ======================================================== [ 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>
- <!-- ========================================================= [ 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>
-
- <!-- ================================ [ 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>
- <!-- ========================================= [ 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>
- <!-- ======================================================== [ 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*
- \(
- [^()]*
- \)
- \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>
- <!-- ====================================================== [ Python ] -->
- <parser
- displayName="Python"
- id ="python_syntax"
- commentExpr="(?s:'''.*?''')|(?m-s:#.*?$)"
- >
- <classRange
- mainExpr ="(?<=^class\x20).*?(?=\n\S|\Z)"
- >
- <className>
- <nameExpr expr="\w+(?=[\(|:])" />
- </className>
- <function
- mainExpr="(?<=def\x20).+?(?=:)"
- >
- <functionName>
- <funcNameExpr expr=".*" />
- </functionName>
- </function>
- </classRange>
- <function
- mainExpr="(?<=def\x20).+?(?=:)"
- >
- <functionName>
- <nameExpr expr=".*" />
- </functionName>
- </function>
- </parser>
- <!-- ======================================================== [ 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>
- <!-- ======================================================== [ 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>
- <!-- ==================================================== [ 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>
- <!-- ======================================================== [ Ruby ] -->
- <parser
- displayName="Ruby"
- id ="ruby_syntax"
- >
- <!-- within a class-->
- <classRange
- mainExpr ="(?<=^class\x20).*?(?=\n\S|\Z)"
- >
- <className>
- <nameExpr expr="\w+" />
- </className>
- <function
- mainExpr="^\s*def\s+\w+"
- >
- <functionName>
- <funcNameExpr expr="(?<=def\s)\w+" />
- </functionName>
- </function>
- </classRange>
- <!-- without class-->
- <function
- mainExpr="^\s*def\s+\w+"
- >
- <functionName>
- <nameExpr expr="(?<=def\s)\w+" />
- </functionName>
- </function>
- </parser>
- <!-- ===================================================== [ 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>
- <!-- ================================================== [ 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>
- <!-- ================================================== [ 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>
- <!-- ================================================ [ J(ava)Script ] -->
- <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>
- <!-- ========================================================= [ 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>
- <!-- =================================================== [ 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>
- <!-- ============================================== [ 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>
-
- <!-- ======================================================= [ 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>
- <!-- ================================================================= -->
- </parsers>
- </functionList>
- </NotepadPlus>
|