Warning, /frameworks/syntax-highlighting/data/syntax/vhdl.xml is written in an unsupported language. File is not indexed.
0001 <?xml version="1.0" encoding="UTF-8"?> 0002 <!DOCTYPE language [ 0003 <!ENTITY varname "[A-Za-z_][A-Za-z0-9_]*"> 0004 <!ENTITY identifier "(?:\b&varname;\b|\\[^\\]*\\)"> 0005 <!ENTITY designator "(?:\b&varname;\b|\\[^\\]*\\|"[^"]*")"> 0006 <!ENTITY label "\b&varname;(?=\s*:(?!=))"> 0007 <!ENTITY bos "\b"> <!-- bol or space following --> 0008 ]> 0009 <language name="VHDL" version="16" kateversion="5.62" section="Hardware" extensions="*.vhdl;*.vhd" mimetype="text/x-vhdl" author="Rocky Scaletta (rocky@purdue.edu), Stefan Endrullis (stefan@endrullis.de), Florent Ouchet (outchy@users.sourceforge.net), Chris Higgs (chiggs.99@gmail.com), Jan Michel (jan@mueschelsoft.de), Luigi Calligaris (luigi.calligaris@stfc.ac.uk)"> 0010 <!-- BNF: https://github.com/antlr/grammars-v4/blob/master/vhdl/vhdl.g4 (VHDL-2005) --> 0011 <!-- Based on VHDL-2008 --> 0012 <highlighting> 0013 <list name="keywordsToplevel"> 0014 <item>file</item> 0015 <item>library</item> 0016 <item>use</item> 0017 <item>with</item> 0018 </list> 0019 0020 <list name="keywords"> 0021 <item>access</item> 0022 <item>after</item> 0023 <item>alias</item> 0024 <item>all</item> 0025 <item>array</item> 0026 <item>assert</item> 0027 <item>assume</item> 0028 <item>assume_guarantee</item> 0029 <item>attribute</item> 0030 <item>begin</item> 0031 <item>block</item> 0032 <item>body</item> 0033 <item>bus</item> 0034 <item>case</item> 0035 <item>component</item> 0036 <item>constant</item> 0037 <item>context</item> 0038 <item>cover</item> 0039 <item>default</item> 0040 <item>disconnect</item> 0041 <item>downto</item> 0042 <item>else</item> 0043 <item>elsif</item> 0044 <item>end</item> 0045 <item>fairness</item> 0046 <item>falling_edge</item> 0047 <item>false</item> 0048 <item>file</item> 0049 <item>for</item> 0050 <item>force</item> 0051 <item>function</item> 0052 <item>generate</item> 0053 <item>generic</item> 0054 <item>group</item> 0055 <item>guarded</item> 0056 <item>if</item> 0057 <item>impure</item> 0058 <item>inertial</item> 0059 <item>is</item> 0060 <item>label</item> 0061 <item>linkage</item> 0062 <item>literal</item> 0063 <item>map</item> 0064 <item>new</item> 0065 <item>null</item> 0066 <item>of</item> 0067 <item>on</item> 0068 <item>open</item> 0069 <item>others</item> 0070 <item>package</item> 0071 <item>parameter</item> 0072 <item>port</item> 0073 <item>postponed</item> 0074 <item>procedure</item> 0075 <item>process</item> 0076 <item>property</item> 0077 <item>protected</item> 0078 <item>pure</item> 0079 <item>range</item> 0080 <item>record</item> 0081 <item>register</item> 0082 <item>reject</item> 0083 <item>release</item> 0084 <item>report</item> 0085 <item>rising_edge</item> 0086 <item>select</item> 0087 <item>sequence</item> 0088 <item>severity</item> 0089 <item>signal</item> 0090 <item>shared</item> 0091 <item>strong</item> 0092 <item>subtype</item> 0093 <item>then</item> 0094 <item>to</item> 0095 <item>transport</item> 0096 <item>true</item> 0097 <item>type</item> 0098 <item>use</item> 0099 <item>unaffected</item> 0100 <item>units</item> 0101 <item>until</item> 0102 <item>variable</item> 0103 <item>view</item> 0104 <item>vmode</item> 0105 <item>vprop</item> 0106 <item>vunit</item> 0107 <item>wait</item> 0108 <item>when</item> 0109 <item>with</item> 0110 <item>note</item> 0111 <item>warning</item> 0112 <item>error</item> 0113 <item>failure</item> 0114 <item>in</item> 0115 <item>inout</item> 0116 <item>out</item> 0117 <item>buffer</item> 0118 <item>and</item> 0119 <item>abs</item> 0120 <item>or</item> 0121 <item>xor</item> 0122 <item>xnor</item> 0123 <item>not</item> 0124 <item>mod</item> 0125 <item>nand</item> 0126 <item>nor</item> 0127 <item>rem</item> 0128 <item>rol</item> 0129 <item>ror</item> 0130 <item>sla</item> 0131 <item>sra</item> 0132 <item>sll</item> 0133 <item>srl</item> 0134 </list> 0135 0136 <list name="controls"> 0137 <item>exit</item> 0138 <item>next</item> 0139 <item>return</item> 0140 </list> 0141 0142 <list name="signals"> 0143 <item>signal</item> 0144 <item>variable</item> 0145 <item>constant</item> 0146 <item>type</item> 0147 <item>attribute</item> 0148 </list> 0149 0150 <list name="range"> 0151 <item>to</item> 0152 <item>downto</item> 0153 <item>others</item> 0154 </list> 0155 0156 <list name="timeunits"> 0157 <item>fs</item> 0158 <item>ps</item> 0159 <item>ns</item> 0160 <item>us</item> 0161 <item>ms</item> 0162 <item>sec</item> 0163 <item>min</item> 0164 <item>hr</item> 0165 </list> 0166 0167 <list name="types"> 0168 <item>bit</item> 0169 <item>bit_vector</item> 0170 <item>character</item> 0171 <item>boolean</item> 0172 <item>boolean_vector</item> 0173 <item>integer</item> 0174 <item>integer_vector</item> 0175 <item>real</item> 0176 <item>real_vector</item> 0177 <item>time</item> 0178 <item>time_vector</item> 0179 <item>delay_length</item> 0180 <item>string</item> 0181 <item>severity_level</item> 0182 <item>positive</item> 0183 <item>natural</item> 0184 <item>file_open_kind</item> 0185 <item>file_open_status</item> 0186 <item>signed</item> 0187 <item>unsigned</item> 0188 <item>unresolved_unsigned</item> 0189 <item>unresolved_signed</item> 0190 <item>line</item> 0191 <item>text</item> 0192 <item>side</item> 0193 <item>width</item> 0194 <item>std_logic</item> 0195 <item>std_logic_vector</item> 0196 <item>std_ulogic</item> 0197 <item>std_ulogic_vector</item> 0198 <item>x01</item> 0199 <item>x01z</item> 0200 <item>ux01</item> 0201 <item>ux01z</item> 0202 <item>qsim_state</item> 0203 <item>qsim_state_vector</item> 0204 <item>qsim_12state</item> 0205 <item>qsim_12state_vector</item> 0206 <item>qsim_strength</item> 0207 <item>mux_bit</item> 0208 <item>mux_vector</item> 0209 <item>reg_bit</item> 0210 <item>reg_vector</item> 0211 <item>wor_bit</item> 0212 <item>wor_vector</item> 0213 </list> 0214 0215 <list name="instantiated"> 0216 <item>configuration</item> 0217 <item>component</item> 0218 <item>entity</item> 0219 </list> 0220 0221 <contexts> 0222 0223 0224 <!-- start / global environment --> 0225 <context name="start" attribute="Normal Text" lineEndContext="#stay"> 0226 <IncludeRules context="preExpression"/> 0227 0228 <WordDetect attribute="Control" context="entity" insensitive="1" String="entity"/> 0229 <WordDetect attribute="Control" context="configuration" insensitive="1" String="configuration"/> 0230 <WordDetect attribute="Control" context="architecture" insensitive="1" String="architecture"/> 0231 <WordDetect attribute="Control" context="package" insensitive="1" String="package"/> 0232 <WordDetect attribute="Keyword" context="context" insensitive="1" String="context"/> 0233 0234 <keyword attribute="Keyword" context="#stay" String="keywordsToplevel"/> 0235 0236 <WordDetect attribute="Signal" context="type" insensitive="1" String="type"/> 0237 <WordDetect attribute="Redirection" context="function" insensitive="1" String="function"/> 0238 <WordDetect attribute="Keyword" context="procedure" insensitive="1" String="procedure" beginRegion="ProcedureRegion1"/> 0239 <WordDetect attribute="Control" context="component" insensitive="1" String="component"/> 0240 <WordDetect attribute="Keyword" context="view" insensitive="1" String="view" beginRegion="sig"/> 0241 <keyword attribute="Data Type" context="#stay" String="types"/> 0242 <keyword attribute="Data Type" context="#stay" String="timeunits"/> 0243 <keyword attribute="Range" context="#stay" String="range"/> 0244 <keyword attribute="Signal" context="signal" String="signals"/> 0245 <keyword attribute="Keyword" context="#stay" String="keywords"/> 0246 <keyword attribute="Control" context="#stay" String="controls"/> 0247 <DetectIdentifier attribute="Normal Text"/> 0248 </context> 0249 0250 <!-- 0251 package ::= 0252 *package* identifier *is* *new* name 0253 [ *generic* *map* ( association_list ) ] ; 0254 0255 | *package* identifier *is* 0256 [ *generic* ( interface_list ) ; 0257 [ *generic* *map* ( association_list ) ; ] ] 0258 { package_declarative_item } 0259 *end* [ *package* ] [ identifier ] ; 0260 0261 | *package *body* identifier *is* 0262 { process_declarative_item } 0263 *end* [ *package* *body* ] [ identifier ] ; 0264 --> 0265 <context name="package" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop"> 0266 <IncludeRules context="blank"/> 0267 <WordDetect attribute="Control" context="#pop!packagebody" insensitive="true" String="body"/> 0268 <RegExpr attribute="Name" context="package_main" beginRegion="PackageRegion1" 0269 String="(&identifier;)"/> 0270 </context> 0271 0272 <context name="package_main" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="package_is"> 0273 <RegExpr attribute="Control" context="#pop#pop" dynamic="1" insensitive="1" 0274 String="&bos;end(\s+package\b)?(\s+%1)?\s*;" endRegion="PackageRegion1"/> 0275 <WordDetect attribute="Error" context="#pop#pop!expressionError" insensitive="true" 0276 String="end" endRegion="PackageRegion1"/> 0277 </context> 0278 0279 <context name="package_is" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!package_decl"> 0280 <IncludeRules context="blank"/> 0281 <WordDetect attribute="Keyword" insensitive="1" String="is"/> 0282 <WordDetect attribute="Keyword" insensitive="1" String="new" context="#pop#pop#pop!package_is_new"/> 0283 </context> 0284 0285 <context name="package_is_new" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!package_is_new_main"> 0286 <IncludeRules context="blank"/> 0287 <IncludeRules context="pop_end"/> 0288 <DetectIdentifier attribute="Name" context="#pop!package_is_new_main"/> 0289 <RangeDetect attribute="Name" context="#pop!package_is_new_main" char=""" char1="""/> 0290 <RangeDetect attribute="Name" context="#pop!package_is_new_main" char="\" char1="\"/> 0291 </context> 0292 0293 <context name="package_is_new_main" attribute="Normal Text" lineEndContext="#stay"> 0294 <IncludeRules context="blank"/> 0295 <DetectChar attribute="Normal Text" context="#pop" char=";" endRegion="PackageRegion1"/> 0296 <DetectChar attribute="Operator" char="."/> 0297 <IncludeRules context="pop_end"/> 0298 <IncludeRules context="find_instantiated_map"/> 0299 </context> 0300 0301 <context name="package_decl" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!package_declarative_list"> 0302 <IncludeRules context="blank"/> 0303 <DetectChar attribute="Normal Text" char=";"/> 0304 <IncludeRules context="enclosed_interface_list"/> 0305 <IncludeRules context="find_instantiated_map"/> 0306 <WordDetect attribute="Control" insensitive="true" String="generic"/> 0307 </context> 0308 0309 <context name="package_declarative_list" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="sequential_stmt_expr"> 0310 <IncludeRules context="blank"/> 0311 <IncludeRules context="package_declarative_start_expr"/> 0312 <IncludeRules context="start_simple_expr"/> 0313 </context> 0314 0315 <!-- package body environment --> 0316 0317 <context name="packagebody" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop"> 0318 <IncludeRules context="blank"/> 0319 <RegExpr attribute="Name" context="packagebody_main" beginRegion="PackageBodyRegion1" 0320 String="(&identifier;)"/> 0321 </context> 0322 0323 <context name="packagebody_main" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="packagebody_is"> 0324 <RegExpr attribute="Control" context="#pop#pop" dynamic="1" insensitive="1" 0325 String="&bos;end(\s+package\s+body\b)?(\s+%1)?\s*;" endRegion="PackageBodyRegion1"/> 0326 <WordDetect attribute="Error" context="#pop#pop!expressionError" insensitive="true" 0327 String="end" endRegion="PackageBodyRegion1"/> 0328 </context> 0329 0330 <context name="packagebody_is" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!package_declarative_list"> 0331 <IncludeRules context="blank"/> 0332 <WordDetect attribute="Keyword" context="#pop!package_declarative_list" insensitive="1" String="is"/> 0333 </context> 0334 0335 <!-- 0336 architecture ::= 0337 *architecture* identifier *of* name *is* 0338 { block_declarative_item } 0339 *begin* 0340 { concurrent_statement } 0341 *end* [ *architecture* ] [ identifier ] ; 0342 --> 0343 <context name="architecture" attribute="Normal Text" lineEndContext="#stay"> 0344 <IncludeRules context="blank"/> 0345 <RegExpr attribute="Name" context="arch_end" beginRegion="ArchitectureRegion1" 0346 String="(&identifier;)"/> 0347 </context> 0348 0349 <context name="arch_end" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="arch_of"> 0350 <RegExpr attribute="Control" context="#pop#pop" insensitive="1" dynamic="1" 0351 String="&bos;end(\s+architecture\b)?(\s+%1)?\s*;" endRegion="ArchitectureRegion1"/> 0352 <WordDetect attribute="Error" context="#pop#pop!expressionError" insensitive="1" 0353 String="end" endRegion="ArchitectureRegion1"/> 0354 </context> 0355 0356 <context name="arch_of" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!block_declarative_stmt"> 0357 <IncludeRules context="blank"/> 0358 <WordDetect attribute="Keyword" context="#pop!arch_ref" insensitive="1" String="of"/> 0359 </context> 0360 0361 <context name="arch_ref" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!block_declarative_stmt"> 0362 <IncludeRules context="blank"/> 0363 <WordDetect attribute="Keyword" context="#pop!block_declarative_stmt" insensitive="1" String="is" /> 0364 <IncludeRules context="reference"/> 0365 </context> 0366 0367 <context name="reference" attribute="Normal Text" lineEndContext="#stay"> 0368 <DetectIdentifier attribute="Reference"/> 0369 <RangeDetect attribute="Reference" char=""" char1="""/> 0370 <RangeDetect attribute="Reference" char="\" char1="\"/> 0371 <DetectChar attribute="Reference" char="."/> 0372 </context> 0373 0374 <!-- { block_declarative_item } --> 0375 <context name="block_declarative_stmt" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="sequential_stmt_expr"> 0376 <IncludeRules context="blank"/> 0377 <IncludeRules context="block_declarative_start_expr"/> 0378 <WordDetect attribute="Control" context="#pop!concurrent_stmt" insensitive="1" String="begin"/> 0379 <IncludeRules context="start_simple_expr"/> 0380 </context> 0381 0382 <context name="block_declarative_start_expr" attribute="Normal Text" lineEndContext="#stay"> 0383 <IncludeRules context="package_declarative_start_expr"/> 0384 <WordDetect attribute="Control" context="for_block_decl" insensitive="1" String="for" beginRegion="LoopRegion1"/> 0385 </context> 0386 0387 <context name="package_declarative_start_expr" attribute="Normal Text" lineEndContext="#stay"> 0388 <WordDetect attribute="Control" context="component" insensitive="1" String="component"/> 0389 <IncludeRules context="process_declarative_start_expr"/> 0390 </context> 0391 0392 <context name="process_declarative_start_expr" attribute="Normal Text" lineEndContext="#stay"> 0393 <WordDetect attribute="Control" context="package" insensitive="1" String="package"/> 0394 <WordDetect attribute="Signal" context="type" insensitive="1" String="type"/> 0395 <WordDetect attribute="Redirection" context="function" insensitive="1" String="function"/> 0396 <WordDetect attribute="Keyword" context="procedure" insensitive="1" String="procedure" beginRegion="ProcedureRegion1"/> 0397 <!-- *shared* *variable* ... --> 0398 <WordDetect attribute="Keyword" insensitive="1" String="shared"/> 0399 <!-- *impure* *function* ... --> 0400 <WordDetect attribute="Keyword" insensitive="1" String="impure"/> 0401 <!-- *pure* *function* ... --> 0402 <WordDetect attribute="Keyword" insensitive="1" String="pure"/> 0403 <WordDetect attribute="Keyword" context="view" insensitive="1" String="view" beginRegion="sig"/> 0404 <keyword attribute="Signal" context="signal" String="signals"/> 0405 </context> 0406 0407 <context name="start_simple_expr" attribute="Normal Text" lineEndContext="#stay"> 0408 <IncludeRules context="pop_end"/> 0409 <keyword attribute="Keyword" context="sequential_stmt_expr" String="keywords"/> 0410 <DetectIdentifier attribute="Normal Text" context="sequential_stmt_expr"/> 0411 </context> 0412 0413 <context name="start_simple_expr_then_pop" attribute="Normal Text" lineEndContext="#stay"> 0414 <IncludeRules context="pop_end"/> 0415 <keyword attribute="Keyword" context="#pop!sequential_stmt_expr" String="keywords"/> 0416 <DetectIdentifier attribute="Normal Text" context="#pop!sequential_stmt_expr"/> 0417 </context> 0418 0419 <!-- { concurrent_statement } --> 0420 <context name="concurrent_stmt" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="concurrent_stmt_item"> 0421 <IncludeRules context="blank"/> 0422 <IncludeRules context="pop_end"/> 0423 <IncludeRules context="concurrent_label"/> 0424 </context> 0425 0426 <context name="concurrent_label" attribute="Normal Text" lineEndContext="#stay"> 0427 <RegExpr attribute="Name" context="concurrent_stmt_label" String="\b(?!(process|constant|signal|variable)\b)&label;"/> 0428 </context> 0429 0430 <context name="concurrent_stmt_label" attribute="Normal Text" lineEndContext="#stay"> 0431 <DetectChar attribute="Operator" context="#pop!concurrent_stmt_labelized_item" char=":"/> 0432 <DetectSpaces attribute="Normal Text"/> 0433 </context> 0434 0435 <context name="concurrent_stmt_labelized_item" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!sequential_stmt_expr"> 0436 <IncludeRules context="blank"/> 0437 <WordDetect attribute="Control" context="#pop!case_generate" insensitive="1" String="case" beginRegion="CaseRegion1"/> 0438 <WordDetect attribute="Control" context="#pop!for_generate" insensitive="1" String="for" beginRegion="LoopRegion1"/> 0439 <WordDetect attribute="Control" context="#pop!if_generate" insensitive="1" String="if" beginRegion="IfRegion1"/> 0440 <keyword attribute="Keyword" context="#pop!instantiated_unit" String="instantiated"/> 0441 <IncludeRules context="concurrent_stmt_item_start"/> 0442 <IncludeRules context="instantiated_unit_name"/> 0443 <DetectIdentifier attribute="Normal Text" context="#pop!sequential_stmt_expr"/> 0444 </context> 0445 0446 <context name="concurrent_stmt_item" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!sequential_stmt_expr"> 0447 <IncludeRules context="blank"/> 0448 <IncludeRules context="concurrent_stmt_item_start"/> 0449 <DetectIdentifier attribute="Normal Text" context="#pop!sequential_stmt_expr"/> 0450 </context> 0451 0452 <context name="concurrent_stmt_item_start" attribute="Normal Text" lineEndContext="#stay"> 0453 <WordDetect attribute="Keyword" context="#stay" insensitive="1" String="postponed"/> 0454 <WordDetect attribute="Control" context="#pop!package" insensitive="1" String="package"/> 0455 <WordDetect attribute="Signal" context="#pop!type" insensitive="1" String="type"/> 0456 <WordDetect attribute="Redirection" context="#pop!function" insensitive="1" String="function"/> 0457 <WordDetect attribute="Keyword" context="#pop!procedure" insensitive="1" String="procedure" beginRegion="ProcedureRegion1"/> 0458 <WordDetect attribute="Process" context="#pop!process" insensitive="1" String="process" beginRegion="ProcessRegion1"/> 0459 <WordDetect attribute="Control" context="#pop!block" insensitive="1" String="block" beginRegion="BlockRegion1"/> 0460 <WordDetect attribute="Keyword" context="#pop!view" insensitive="1" String="view"/> 0461 <keyword attribute="Signal" context="#pop!signal" String="signals" beginRegion="sig"/> 0462 <IncludeRules context="sequential_stmt_item_start"/> 0463 <keyword attribute="Keyword" context="#pop!sequential_stmt_expr" String="keywords"/> 0464 </context> 0465 0466 <!-- 0467 block_declarative_item_for ::= 0468 *for* instantiation_list : name 0469 [ *use* entity_aspect ] 0470 [ generic_map_aspect ] 0471 [ port_map_aspect ] ; 0472 [ block_declarative_item_for_end ] 0473 0474 block_declarative_item_for ::= 0475 [ *use* *vunit* name_list ; 0476 { *use* *vunit* name_list ; } ] 0477 *end* *for* ; 0478 | *end* *for* ; 0479 --> 0480 <context name="for_block_decl" attribute="Normal Text" lineEndContext="#stay"> 0481 <IncludeRules context="preExpression"/> 0482 <DetectChar attribute="Normal Text" context="#pop!for_block_unit" char=";" endRegion="InstanceRegion1"/> 0483 <WordDetect context="#pop!expressionError" insensitive="1" String="end"/> 0484 <IncludeRules context="find_instantiated_map"/> 0485 <IncludeRules context="postExpression"/> 0486 </context> 0487 0488 <context name="for_block_unit" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!for_block_end_region"> 0489 <IncludeRules context="blank"/> 0490 <WordDetect context="sequential_stmt_expr" insensitive="1" String="use"/> 0491 <WordDetect context="for_block_end" insensitive="1" String="end"/> 0492 </context> 0493 0494 <context name="for_block_end" attribute="Normal Text" lineEndContext="#stay"> 0495 <RegExpr attribute="Control" context="#pop#pop" insensitive="1" 0496 String="&bos;end\s+for\s*;" endRegion="LoopRegion1"/> 0497 <WordDetect attribute="Error" context="#pop#pop!expressionError" insensitive="1" 0498 String="end" endRegion="LoopRegion1"/> 0499 </context> 0500 0501 <context name="for_block_end_region" attribute="Normal Text" lineEndContext="#stay"> 0502 <RegExpr context="#pop" String="." lookAhead="1" endRegion="LoopRegion1"/> 0503 </context> 0504 0505 <!-- 0506 instantiated ::= 0507 instantiated_unit 0508 instantiated_unit_decl 0509 0510 instantiated_unit ::= 0511 [ *component* ] name 0512 | *entity* name [ ( identifier ) ] 0513 | *configuration* name 0514 0515 instantiated_unit_decl ::= 0516 [ generic_map_aspect ] [ port_map_aspect ] ; 0517 0518 port_map_aspect ::= 0519 *port* *map* ( association_list ) 0520 0521 generic_map_aspect ::= 0522 *generic* *map* ( association_list ) 0523 --> 0524 <context name="instantiated_unit" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!instantiated_unit_decl"> 0525 <IncludeRules context="blank"/> 0526 <IncludeRules context="instantiated_unit_name"/> 0527 </context> 0528 0529 <context name="instantiated_unit_name" attribute="Normal Text" lineEndContext="#stay"> 0530 <RegExpr attribute="Reference" context="#pop!instantiated_unit_decl" String="&varname;(\s*\.\s*&varname;)?" beginRegion="InstanceRegion1"/> 0531 </context> 0532 0533 <context name="instantiated_unit_decl" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!end_instance_region"> 0534 <IncludeRules context="blank"/> 0535 <DetectChar attribute="Normal Text" context="#pop" char=";" endRegion="InstanceRegion1"/> 0536 <!-- *entity* name ( identifier ) --> 0537 <!-- ^_____________ --> 0538 <DetectChar attribute="Normal Text" context="instantiated_unit_identifier" char="("/> 0539 <IncludeRules context="find_instantiated_map"/> 0540 </context> 0541 0542 <context name="find_instantiated_map" attribute="Normal Text" lineEndContext="#stay"> 0543 <RegExpr attribute="Keyword" context="instance_map_start" insensitive="true" String="&bos;(port|generic)\s+map\b\s*"/> 0544 </context> 0545 0546 <context name="instantiated_unit_identifier" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop#pop!end_instance_region"> 0547 <IncludeRules context="blank"/> 0548 <DetectChar attribute="Error" context="#pop" char=")"/> 0549 <RegExpr attribute="Normal Text" context="#pop!instantiated_unit_identifier_end" String="&identifier;"/> 0550 </context> 0551 <context name="instantiated_unit_identifier_end" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop#pop!end_instance_region"> 0552 <IncludeRules context="blank"/> 0553 <DetectChar attribute="Normal Text" context="#pop" char=")"/> 0554 </context> 0555 0556 <context name="end_instance_region" attribute="Normal Text" lineEndContext="#stay"> 0557 <WordDetect context="#pop" insensitive="1" String="end" lookAhead="1" endRegion="InstanceRegion1"/> 0558 <DetectIdentifier context="#pop" lookAhead="1" endRegion="InstanceRegion1"/> 0559 <RegExpr context="#pop" String="." lookAhead="1" endRegion="InstanceRegion1"/> 0560 </context> 0561 0562 <context name="instance_map_start" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop"> 0563 <IncludeRules context="blank"/> 0564 <DetectChar attribute="Normal Text" context="#pop!instance_map" char="(" beginRegion="InstanceMapRegion"/> 0565 </context> 0566 0567 <!-- Inside a port or generic map --> 0568 <context name="instance_map" attribute="Normal Text" lineEndContext="#stay"> 0569 <AnyChar attribute="Error" context="#stay" String="<;:"/> 0570 <IncludeRules context="preExpression"/> 0571 <DetectChar attribute="Normal Text" context="#pop" char=")" endRegion="InstanceMapRegion"/> 0572 <IncludeRules context="enclosed_association_list"/> 0573 <IncludeRules context="postExpression"/> 0574 </context> 0575 0576 <!-- 0577 if ::= 0578 *if* expression *then* 0579 { sequential_statement } 0580 { *elsif* expression *then* 0581 { sequential_statement } } 0582 [ *else* 0583 { sequential_statement } ] 0584 *end* *if* [ label ] ; 0585 --> 0586 <context name="if_start" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="if_expr"> 0587 <RegExpr attribute="Control" context="#pop" insensitive="true" endRegion="IfRegion1" 0588 String="&bos;end\s+if(\s+&varname;)?\s*;"/> 0589 <WordDetect attribute="Error" context="#pop!expressionError" insensitive="true" 0590 String="end" endRegion="IfRegion1"/> 0591 </context> 0592 0593 <context name="if_expr" attribute="Normal Text" lineEndContext="#stay"> 0594 <IncludeRules context="preExpression"/> 0595 <IncludeRules context="pop_end"/> 0596 <WordDetect attribute="Control" context="if_body" insensitive="true" String="then"/> 0597 <IncludeRules context="postExpression"/> 0598 </context> 0599 0600 <context name="if_body" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="sequential_stmt_item"> 0601 <IncludeRules context="blank"/> 0602 <WordDetect attribute="Control" context="#pop" insensitive="true" String="elsif"/> 0603 <WordDetect attribute="Control" context="#pop#pop!sequential_stmt" insensitive="true" String="else"/> 0604 <WordDetect attribute="Control" context="#pop#pop" insensitive="true" String="end" lookAhead="1"/> 0605 <IncludeRules context="sequential_label"/> 0606 </context> 0607 0608 <!-- 0609 case ::= 0610 *case* [ ? ] expression *is* 0611 *when* choices => { sequential_statement } 0612 { *when* choices => { sequential_statement } } 0613 *end* *case* [ ? ] [ label ] ; 0614 --> 0615 <context name="case" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="case_expr"> 0616 <RegExpr attribute="Control" context="#pop" insensitive="true" endRegion="CaseRegion1" 0617 String="&bos;end\s+case(\s*[?])?(?:\s*\b&varname;)?\s*;"/> 0618 <WordDetect attribute="Error" context="#pop!expressionError" insensitive="true" 0619 String="end" endRegion="CaseRegion1"/> 0620 </context> 0621 0622 <context name="case_expr" attribute="Normal Text" lineEndContext="#stay"> 0623 <IncludeRules context="preExpression"/> 0624 <IncludeRules context="pop_end"/> 0625 <WordDetect attribute="Keyword" context="#pop!case_is" insensitive="true" String="is"/> 0626 <DetectChar char=";" attribute="Normal Text" context="#pop!case_body" beginRegion="CaseWhenRegion1"/> 0627 <IncludeRules context="postExpression"/> 0628 </context> 0629 0630 <context name="case_is" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!case_when"> 0631 <IncludeRules context="blank"/> 0632 <WordDetect attribute="Control" context="#pop!case_when" insensitive="true" String="when"/> 0633 </context> 0634 0635 <context name="case_when" attribute="Normal Text" lineEndContext="#stay"> 0636 <Detect2Chars char="=" char1=">" attribute="Operator" context="#pop!case_body" beginRegion="CaseWhenRegion1"/> 0637 <IncludeRules context="preExpression"/> 0638 <DetectChar char=";" attribute="Normal Text" context="#pop!case_body" beginRegion="CaseWhenRegion1"/> 0639 <IncludeRules context="case_when_post_expr"/> 0640 </context> 0641 0642 <context name="case_when_post_expr" attribute="Normal Text" lineEndContext="#stay"> 0643 <WordDetect attribute="Keyword" insensitive="1" String="others"/> 0644 <IncludeRules context="pop_end"/> 0645 <IncludeRules context="keywordExpression"/> 0646 <DetectIdentifier attribute="Name"/> 0647 </context> 0648 0649 <context name="case_body" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="sequential_stmt_item"> 0650 <IncludeRules context="blank"/> 0651 <WordDetect attribute="Control" context="#pop!case_when" insensitive="1" String="when" endRegion="CaseWhenRegion1"/> 0652 <WordDetect context="#pop" insensitive="1" String="end" lookAhead="1" endRegion="CaseWhenRegion1"/> 0653 <IncludeRules context="sequential_label"/> 0654 </context> 0655 <!-- 'when' and 'end case' are checked at the beginning of the line for better code folding --> 0656 0657 <!-- 0658 while ::= 0659 *while* expression *loop* 0660 { sequential_statement } 0661 *end* *loop* [ label ] ; 0662 0663 for ::= 0664 *for* identifier *in* discrete_range *loop* 0665 { sequential_statement } 0666 *end* *loop* [ label ] ; 0667 --> 0668 <context name="while" attribute="Normal Text" lineEndContext="#stay"> 0669 <IncludeRules context="preExpression"/> 0670 <WordDetect attribute="Control" context="#pop!loop" insensitive="true" String="loop" beginRegion="LoopRegion1"/> 0671 <IncludeRules context="pop_end"/> 0672 <IncludeRules context="postExpression"/> 0673 </context> 0674 0675 <!-- 0676 loop ::= 0677 *loop* 0678 { sequential_statement } 0679 *end* *loop* [ label ] ; 0680 --> 0681 <context name="loop" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="sequential_stmt"> 0682 <RegExpr attribute="Control" context="#pop" insensitive="true" endRegion="LoopRegion1" 0683 String="&bos;end\s+loop(\s+&varname;)?\s*;"/> 0684 <WordDetect attribute="Error" context="#pop!expressionError" insensitive="true" 0685 String="end" endRegion="LoopRegion1"/> 0686 </context> 0687 0688 <!--====declare ===============--> 0689 <context name="declare" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="block_body"> 0690 <RegExpr attribute="Keyword" context="#pop" insensitive="true" endRegion="DeclareRegion1" 0691 String="&bos;end(\s+declare)?\s*;"/> 0692 <WordDetect attribute="Error" context="#pop!expressionError" insensitive="true" 0693 String="end" endRegion="DeclareRegion1"/> 0694 </context> 0695 0696 <!-- 0697 entity ::= 0698 *entity* identifier *is* 0699 [ entity_header ] 0700 { entity_declarative_item } 0701 [ *begin* 0702 { entity_statement } ] 0703 *end* [ *entity* ] [ identifier ] ; 0704 0705 entity_header ::= 0706 [ *generic* ( interface_list ) ; ] 0707 [ *port* ( interface_list ) ; ] 0708 --> 0709 <context name="entity" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop"> 0710 <IncludeRules context="blank"/> 0711 <RegExpr attribute="Name" context="entity_main" beginRegion="EntityRegion1" 0712 String="(&identifier;)"/> 0713 </context> 0714 0715 <context name="entity_main" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="entity_header"> 0716 <RegExpr attribute="Control" context="#pop#pop" dynamic="1" insensitive="1" 0717 String="&bos;end(\s+entity)?(\s+%1)?\s*;" endRegion="EntityRegion1"/> 0718 <WordDetect attribute="Error" context="#pop#pop!expressionError" insensitive="true" 0719 String="end" endRegion="EntityRegion1"/> 0720 </context> 0721 0722 <context name="entity_header" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!entity_decl"> 0723 <IncludeRules context="blank"/> 0724 <IncludeRules context="enclosed_interface_list"/> 0725 <DetectChar attribute="Normal Text" char=";"/> 0726 <WordDetect attribute="Control" insensitive="true" String="generic"/> 0727 <WordDetect attribute="Control" insensitive="true" String="port"/> 0728 <WordDetect attribute="Keyword" insensitive="true" String="is"/> 0729 </context> 0730 0731 <context name="entity_decl" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="sequential_stmt_expr"> 0732 <IncludeRules context="blank"/> 0733 <IncludeRules context="process_declarative_start_expr"/> 0734 <WordDetect attribute="Keyword" context="#pop!entity_stmt" insensitive="1" String="begin"/> 0735 <IncludeRules context="start_simple_expr"/> 0736 </context> 0737 0738 <context name="entity_stmt" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="entity_stmt_item"> 0739 <IncludeRules context="blank"/> 0740 <IncludeRules context="pop_end"/> 0741 <RegExpr attribute="Name" context="entity_stmt_label" String="&label;"/> 0742 </context> 0743 0744 <context name="entity_stmt_label" attribute="Normal Text" lineEndContext="#stay"> 0745 <DetectChar attribute="Operator" context="#pop!entity_stmt_item" char=":"/> 0746 <DetectSpaces attribute="Normal Text"/> 0747 </context> 0748 0749 <context name="entity_stmt_item" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!sequential_stmt_expr"> 0750 <IncludeRules context="blank"/> 0751 <WordDetect attribute="Keyword" context="#stay" insensitive="1" String="postponed"/> 0752 <WordDetect attribute="Process" context="#pop!process" insensitive="1" String="process" beginRegion="ProcessRegion1"/> 0753 <IncludeRules context="start_simple_expr_then_pop"/> 0754 </context> 0755 0756 <!-- 0757 configuration ::= 0758 *configuration* identifier *of* name *is* 0759 { configuration_declarative_item } 0760 { verification_unit_binding_indication ; } 0761 *for* block_specification 0762 { use_clause } 0763 { configuration_item } 0764 *end* *for* ; 0765 *end* [ *configuration* ] [ identifier ] ; 0766 --> 0767 <context name="configuration" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop"> 0768 <IncludeRules context="blank"/> 0769 <RegExpr attribute="Name" context="conf_of" beginRegion="ConfigurationRegion1" 0770 String="(&identifier;)"/> 0771 </context> 0772 0773 <context name="conf_of" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="conf_is"> 0774 <IncludeRules context="blank"/> 0775 <WordDetect attribute="Keyword" context="conf_ref" insensitive="1" String="of"/> 0776 <RegExpr attribute="Control" context="#pop#pop" insensitive="1" dynamic="1" 0777 String="&bos;end(\s+configuration\b)?(\s+%1)?\s*;" endRegion="ConfigurationRegion1"/> 0778 <WordDetect attribute="Error" context="#pop#pop!expressionError" insensitive="1" 0779 String="end" endRegion="ConfigurationRegion1"/> 0780 </context> 0781 0782 <context name="conf_ref" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!conf_decl"> 0783 <IncludeRules context="blank"/> 0784 <WordDetect attribute="Keyword" context="#pop!conf_decl" insensitive="1" String="is" /> 0785 <IncludeRules context="reference"/> 0786 </context> 0787 0788 <context name="conf_is" attribute="Control" lineEndContext="#stay" fallthroughContext="#pop#pop#pop"> 0789 <IncludeRules context="blank"/> 0790 <WordDetect attribute="Keyword" context="#pop!conf_decl" insensitive="1" String="is" /> 0791 </context> 0792 0793 <context name="conf_decl" attribute="Normal Text" lineEndContext="#stay"> 0794 <IncludeRules context="preExpression"/> 0795 <WordDetect attribute="Control" context="conf_for" insensitive="1" String="for" beginRegion="LoopRegion1"/> 0796 <IncludeRules context="pop_end"/> 0797 <IncludeRules context="postExpression"/> 0798 </context> 0799 0800 <context name="conf_for" attribute="Normal Text" lineEndContext="#stay"> 0801 <IncludeRules context="preExpression"/> 0802 <WordDetect attribute="Control" context="conf_for" insensitive="1" String="for" beginRegion="LoopRegion1"/> 0803 <WordDetect attribute="Control" context="conf_for_end" insensitive="1" lookAhead="1" String="end" endRegion="LoopRegion1"/> 0804 <IncludeRules context="postExpression"/> 0805 </context> 0806 0807 <context name="conf_for_end" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop#pop!expressionError"> 0808 <RegExpr attribute="Control" context="#pop#pop" insensitive="true" String="&bos;end(\s+for\b)?\s*;"/> 0809 </context> 0810 0811 <!-- 0812 context ::= 0813 *context* identifier *is* 0814 { context_item } 0815 *end* [ *context* ] [ identifier ] ; 0816 0817 | *context* selected_name { , selected_name } ; 0818 0819 context_item ::= 0820 *library* identifier { , identifier } ; 0821 | *use* selected_name { , selected_name } ; 0822 | *context* selected_name { , selected_name } ; 0823 0824 selected_name ::= prefix . suffix 0825 --> 0826 <context name="context" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!sequential_stmt_expr"> 0827 <IncludeRules context="blank"/> 0828 <RegExpr attribute="Name" context="#pop!context_main" beginRegion="ContextRegion1" 0829 String="(&identifier;)(?!\.)"/> 0830 </context> 0831 0832 <context name="context_main" attribute="Control" lineEndContext="#stay" fallthroughContext="context_decl"> 0833 <RegExpr attribute="Keyword" context="#pop" dynamic="1" insensitive="1" 0834 String="&bos;end(\s+context)?(\s+%1)?\s*;" endRegion="ContextRegion1"/> 0835 <WordDetect attribute="Error" context="#pop!expressionError" insensitive="1" 0836 String="end" endRegion="ContextRegion1"/> 0837 </context> 0838 0839 <context name="context_decl" attribute="Normal Text" lineEndContext="#stay"> 0840 <IncludeRules context="preExpression"/> 0841 <keyword attribute="Keyword" context="sequential_stmt_expr" String="keywordsToplevel"/> 0842 <IncludeRules context="pop_end"/> 0843 <IncludeRules context="postExpression"/> 0844 </context> 0845 0846 0847 <!--====Basic Stuff ===============--> 0848 <!-- comment and spaces --> 0849 <context name="blank" attribute="Normal Text" lineEndContext="#stay"> 0850 <DetectSpaces attribute="Normal Text" context="#stay"/> 0851 <Detect2Chars attribute="Comment" context="comment" char="-" char1="-"/> 0852 <Detect2Chars attribute="Comment" context="block_comment" char="/" char1="*"/> 0853 </context> 0854 0855 <!-- 0856 abstract_literal ::= 0857 integer [ . integer ] [ exponent ] 0858 | base # based_integer [ . based_integer ] # [ exponent ] 0859 0860 base ::= integer 0861 integer ::= digit { [ _ ] digit } 0862 exponent ::= E [ + ] integer | E – integer 0863 based_integer ::= extended_digit { [ _ ] extended_digit } 0864 extended_digit ::= digit | letter 0865 --> 0866 <context name="abstract_literal" attribute="Integer" lineEndContext="#pop" fallthroughContext="exponent"> 0867 <DetectChar attribute="Operator" char="."/> 0868 <DetectChar attribute="Operator" context="based_integer" char="#"/> 0869 <RegExpr attribute="Integer" context="exponent" String="_?[0-9]++(_[0-9]+)*"/> 0870 </context> 0871 <context name="exponent" attribute="Integer" lineEndContext="#pop#pop" fallthroughContext="#pop#pop"> 0872 <RegExpr attribute="Exponent" context="#pop#pop" String="[eE][+-]?[0-9]++(_[0-9]+)*+"/> 0873 <AnyChar attribute="Error" context="#pop#pop" String="eE_"/> 0874 </context> 0875 <context name="based_integer" attribute="Integer" lineEndContext="#pop#pop" fallthroughContext="#pop#pop"> 0876 <DetectChar attribute="Operator" char="."/> 0877 <DetectChar attribute="Error" char="_"/> 0878 <DetectChar attribute="Operator" context="#pop!exponent" char="#"/> 0879 <RegExpr attribute="Based Integer" String="[0-9a-fA-F]++(_[0-9a-fA-F]+)*"/> 0880 </context> 0881 0882 <!-- 0883 external_name ::= 0884 << *constant* external_pathname : subtype_indication >> 0885 | << *signal* external_pathname : subtype_indication >> 0886 | << *variable* external_pathname : subtype_indication >> 0887 --> 0888 <context name="external_name" attribute="Integer" lineEndContext="#stay" fallthroughContext="#pop"> 0889 <IncludeRules context="blank"/> 0890 <!-- back to expression context --> 0891 <keyword attribute="Signal" context="#pop" String="signals"/> 0892 </context> 0893 0894 <!-- 0895 interface_list ::= 0896 interface_element { ; interface_element } 0897 0898 interface_element ::= 0899 [ *constant* ] identifier_list : [ *in* ] subtype_indication [ := expression ] 0900 | [ *signal* ] identifier_list : [ *in* | *out* ] subtype_indication [ *bus* ] [ := expression ] 0901 | [ *variable* ] identifier_list : [ *in* | *out* ] subtype_indication [ := expression ] 0902 | *file* identifier_list : subtype_indication 0903 | *type* identifier 0904 | interface_subprogram_specification [ *is* name ] 0905 | interface_subprogram_specification [ *is* <> ] 0906 | *package* identifier *is* *new* name *generic* *map* ( association_list ) 0907 | *package* identifier *is* *new* name *generic* *map* ( <> ) 0908 | *package* identifier *is* *new* name *generic* *map* ( *default* ) 0909 0910 interface_subprogram_specification ::= 0911 *procedure* designator [ [ *parameter* ] ( interface_list ) ] 0912 | [ *pure* | *impure* ] *function* designator 0913 [ [ *parameter* ] ( interface_list ) ] *return* name 0914 0915 designator ::= identifier | string_literal 0916 --> 0917 <context name="enclosed_interface_list" attribute="Normal Text" lineEndContext="#stay"> 0918 <DetectChar attribute="Normal Text" context="interface_list" char="("/> 0919 </context> 0920 0921 <context name="interface_list" attribute="Normal Text" lineEndContext="#stay"> 0922 <IncludeRules context="preExpression"/> 0923 <IncludeRules context="pop_end"/> 0924 <keyword attribute="Signal" String="signals"/> 0925 <IncludeRules context="postExpression"/> 0926 <DetectChar attribute="Normal Text" context="#pop" char=")"/> 0927 <IncludeRules context="enclosed_association_list"/> 0928 </context> 0929 0930 <!-- 0931 association_list ::= 0932 association_element { , association_element } 0933 0934 association_element ::= 0935 [ name [ ( name ) ] => ] actual_part 0936 0937 actual_part ::= 0938 actual_designator 0939 | name ( actual_designator ) 0940 0941 actual_designator ::= 0942 [ *inertial* ] expression 0943 | name 0944 | subtype_indication 0945 | *open* 0946 --> 0947 <context name="enclosed_association_list" attribute="Normal Text" lineEndContext="#stay"> 0948 <DetectChar attribute="Normal Text" context="association_list" char="("/> 0949 </context> 0950 0951 <context name="association_list" attribute="Normal Text" lineEndContext="#stay"> 0952 <IncludeRules context="preExpression"/> 0953 <IncludeRules context="pop_end"/> 0954 <IncludeRules context="postExpression"/> 0955 <DetectChar attribute="Normal Text" context="#pop" char=")"/> 0956 <IncludeRules context="enclosed_association_list"/> 0957 <DetectChar context="#pop" char=";" lookAhead="1"/> 0958 </context> 0959 0960 0961 <!-- sequential statement --> 0962 <context name="sequential_stmt" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="sequential_stmt_item"> 0963 <IncludeRules context="blank"/> 0964 <IncludeRules context="pop_end"/> 0965 <IncludeRules context="sequential_label"/> 0966 </context> 0967 0968 <context name="sequential_label" attribute="Normal Text" lineEndContext="#stay"> 0969 <RegExpr attribute="Name" context="sequential_stmt_label" String="&label;"/> 0970 </context> 0971 0972 <context name="sequential_stmt_label" attribute="Normal Text" lineEndContext="#stay"> 0973 <DetectChar attribute="Operator" context="#pop!sequential_stmt_item" char=":"/> 0974 <DetectSpaces attribute="Normal Text"/> 0975 </context> 0976 0977 <context name="sequential_stmt_item" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!sequential_stmt_expr"> 0978 <IncludeRules context="blank"/> 0979 <DetectChar attribute="Normal Text" context="#pop" char=";"/> 0980 <IncludeRules context="sequential_stmt_item_start"/> 0981 <IncludeRules context="start_simple_expr_then_pop"/> 0982 </context> 0983 0984 <context name="sequential_stmt_item_start" attribute="Normal Text" lineEndContext="#stay"> 0985 <WordDetect attribute="Control" context="#pop!if_start" insensitive="1" String="if" beginRegion="IfRegion1"/> 0986 <WordDetect attribute="Control" context="#pop!case" insensitive="1" String="case" beginRegion="CaseRegion1"/> 0987 <WordDetect attribute="Control" context="#pop!while" insensitive="1" String="for"/> 0988 <WordDetect attribute="Control" context="#pop!while" insensitive="1" String="while"/> 0989 <WordDetect attribute="Control" context="#pop!loop" insensitive="1" String="loop" beginRegion="LoopRegion1"/> 0990 <WordDetect attribute="Keyword" context="#pop!declare" insensitive="1" String="declare" beginRegion="DeclareRegion1"/> 0991 <keyword attribute="Control" context="#pop!sequential_stmt_expr" String="controls"/> 0992 </context> 0993 0994 <context name="sequential_stmt_expr" attribute="Normal Text" lineEndContext="#stay"> 0995 <IncludeRules context="preExpression"/> 0996 <DetectChar attribute="Normal Text" context="#pop" char=";"/> 0997 <IncludeRules context="pop_end"/> 0998 <IncludeRules context="postExpression"/> 0999 </context> 1000 1001 <!-- 1002 if_generate ::= 1003 *if* [ alternative_label : ] expression *generate* 1004 generate_statement_body 1005 { *elsif* [ alternative_label : ] expression *generate* 1006 generate_statement_body } 1007 [ *else* [ alternative_label : ] *generate* 1008 generate_statement_body ] 1009 *end* *generate* [ label ] ; 1010 1011 generate_statement_body ::= 1012 generate_body 1013 [ *end* [ alternative_label ] ; ] 1014 --> 1015 <context name="if_generate" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="if_generate_label"> 1016 <RegExpr attribute="Control" context="#pop" insensitive="1" endRegion="IfRegion1" 1017 String="&bos;end\s+generate(\s+&varname;)?\s*;"/> 1018 <WordDetect attribute="Error" context="#pop!expressionError" insensitive="1" 1019 String="end" endRegion="IfRegion1"/> 1020 </context> 1021 1022 <context name="if_generate_label" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!if_generate_expr"> 1023 <IncludeRules context="blank"/> 1024 <RegExpr attribute="Name" context="if_generate_after_label" String="&label;"/> 1025 </context> 1026 1027 <context name="if_generate_after_label" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop#pop!if_generate_expr"> 1028 <DetectChar attribute="Operator" context="#pop#pop!if_generate_expr" char=":"/> 1029 <DetectSpaces attribute="Normal Text"/> 1030 </context> 1031 1032 <context name="if_generate_expr" attribute="Normal Text" lineEndContext="#stay"> 1033 <IncludeRules context="preExpression"/> 1034 <IncludeRules context="pop_end"/> 1035 <WordDetect attribute="Control" context="#pop!if_generate_body" insensitive="1" String="generate"/> 1036 <IncludeRules context="postExpression"/> 1037 </context> 1038 1039 <context name="if_generate_body" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="sequential_stmt_expr"> 1040 <IncludeRules context="blank"/> 1041 <IncludeRules context="generate_body_pre_start"/> 1042 <WordDetect attribute="Control" context="#pop!if_generate_label" insensitive="1" String="elsif"/> 1043 <WordDetect attribute="Control" context="#pop!if_generate_label" insensitive="1" String="else"/> 1044 <WordDetect context="if_generate_body_end" insensitive="1" String="end" lookAhead="1"/> 1045 <IncludeRules context="generate_body_post_start"/> 1046 </context> 1047 1048 <context name="if_generate_body_end" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!expressionError"> 1049 <RegExpr context="#pop#pop" insensitive="1" String="end\s+generate\b" lookAhead="1"/> 1050 <RegExpr attribute="Control" context="#pop" insensitive="1" String="end(\s+&varname;)?\s*;"/> 1051 </context> 1052 1053 <!-- 1054 generate_body ::= 1055 [ { block_declarative_item } 1056 *begin* ] 1057 { concurrent_statement } 1058 --> 1059 <context name="generate_body" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="sequential_stmt_expr"> 1060 <IncludeRules context="blank"/> 1061 <IncludeRules context="generate_body_pre_start"/> 1062 <IncludeRules context="pop_end"/> 1063 <IncludeRules context="generate_body_post_start"/> 1064 </context> 1065 1066 <context name="generate_body_pre_start" attribute="Normal Text" lineEndContext="#stay"> 1067 <IncludeRules context="block_declarative_start_expr"/> 1068 1069 <!-- concurrent_stmt_item --> 1070 <WordDetect attribute="Keyword" context="#stay" insensitive="1" String="postponed"/> 1071 <WordDetect attribute="Process" context="process" insensitive="1" String="process" beginRegion="ProcessRegion1"/> 1072 <WordDetect attribute="Control" context="block" insensitive="1" String="block" beginRegion="BlockRegion1"/> 1073 1074 <!-- sequential_stmt_item --> 1075 <WordDetect attribute="Control" context="if_start" insensitive="1" String="if" beginRegion="IfRegion1"/> 1076 <WordDetect attribute="Control" context="case" insensitive="1" String="case" beginRegion="CaseRegion1"/> 1077 <WordDetect attribute="Control" context="while" insensitive="1" String="while"/> 1078 <WordDetect attribute="Control" context="loop" insensitive="1" String="loop" beginRegion="LoopRegion1"/> 1079 <WordDetect attribute="Keyword" context="declare" insensitive="1" String="declare" beginRegion="DeclareRegion1"/> 1080 <keyword attribute="Control" context="sequential_stmt_expr" String="controls"/> 1081 1082 <WordDetect attribute="Control" insensitive="1" String="begin"/> 1083 </context> 1084 1085 <context name="generate_body_post_start" attribute="Normal Text" lineEndContext="#stay"> 1086 <keyword attribute="Keyword" context="sequential_stmt_expr" String="keywords"/> 1087 <IncludeRules context="concurrent_label"/> 1088 <DetectIdentifier attribute="Normal Text" context="sequential_stmt_expr"/> 1089 </context> 1090 1091 <!-- 1092 case_generate ::= 1093 *case* expression *generate* 1094 *when* [ label : ] choices => generate_statement_body 1095 { *when* [ label : ] choices => generate_statement_body } 1096 *end* *generate* [ label ] ; 1097 1098 generate_statement_body ::= 1099 generate_body 1100 [ *end* [ alternative_label ] ; ] 1101 --> 1102 <context name="case_generate" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="case_generate_expr"> 1103 <RegExpr attribute="Control" context="#pop" insensitive="1" endRegion="CaseRegion1" 1104 String="&bos;end\s+generate(\s+&varname;)?\s*;"/> 1105 <WordDetect attribute="Error" context="#pop!expressionError" insensitive="1" 1106 String="end" endRegion="CaseRegion1"/> 1107 </context> 1108 1109 <context name="case_generate_expr" attribute="Normal Text" lineEndContext="#stay"> 1110 <IncludeRules context="preExpression"/> 1111 <IncludeRules context="pop_end"/> 1112 <WordDetect attribute="Control" context="#pop!case_generate_is" insensitive="1" String="generate"/> 1113 <!-- fallback to case ... is --> 1114 <WordDetect attribute="Keyword" context="#pop!case_is" insensitive="1" String="is"/> 1115 <IncludeRules context="postExpression"/> 1116 </context> 1117 1118 <context name="case_generate_is" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!case_generate_when"> 1119 <IncludeRules context="blank"/> 1120 <WordDetect attribute="Control" context="case_generate_when" insensitive="1" String="when"/> 1121 </context> 1122 1123 <context name="case_generate_when" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!case_generate_when_expr"> 1124 <IncludeRules context="blank"/> 1125 <RegExpr attribute="Name" context="case_generate_when_label" String="&label;"/> 1126 </context> 1127 1128 <context name="case_generate_when_label" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop#pop!case_generate_when_expr"> 1129 <DetectChar attribute="Operator" context="#pop#pop!case_generate_when_expr" char=":"/> 1130 <DetectSpaces attribute="Normal Text"/> 1131 </context> 1132 1133 <context name="case_generate_when_expr" attribute="Normal Text" lineEndContext="#stay"> 1134 <Detect2Chars char="=" char1=">" attribute="Operator" context="#pop!case_generate_body" beginRegion="CaseWhenRegion1"/> 1135 <IncludeRules context="preExpression"/> 1136 <DetectChar char=";" attribute="Normal Text" context="#pop!case_generate_body" beginRegion="CaseWhenRegion1"/> 1137 <IncludeRules context="case_when_post_expr"/> 1138 </context> 1139 1140 <context name="case_generate_body" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="sequential_stmt_expr"> 1141 <IncludeRules context="blank"/> 1142 <IncludeRules context="generate_body_pre_start"/> 1143 <WordDetect attribute="Control" context="#pop!case_generate_when" insensitive="1" String="when" endRegion="CaseWhenRegion1"/> 1144 <WordDetect context="#pop!if_generate_body_end" insensitive="1" String="end" lookAhead="1" endRegion="CaseWhenRegion1"/> 1145 <IncludeRules context="generate_body_post_start"/> 1146 </context> 1147 1148 <!-- 1149 for_generate ::= 1150 *for* parameter_specification *generate* 1151 generate_body 1152 *end* *generate* [ label ] ; 1153 --> 1154 <context name="for_generate" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="for_generate_expr"> 1155 <RegExpr attribute="Control" context="#pop" insensitive="1" endRegion="LoopRegion1" 1156 String="&bos;end\s+generate(\s+&varname;)?\s*;"/> 1157 <WordDetect attribute="Error" context="#pop!expressionError" insensitive="1" 1158 String="end" endRegion="LoopRegion1"/> 1159 </context> 1160 1161 <context name="for_generate_expr" attribute="Normal Text" lineEndContext="#stay"> 1162 <IncludeRules context="preExpression"/> 1163 <IncludeRules context="pop_end"/> 1164 <WordDetect attribute="Control" context="#pop!generate_body" insensitive="1" String="generate"/> 1165 <IncludeRules context="postExpression"/> 1166 </context> 1167 1168 <!-- 1169 block ::= 1170 *block* [ ( condition ) ] [ *is* ] 1171 [ generic_clause 1172 [ generic_map_aspect ; ] ] 1173 [ port_clause 1174 [ port_map_aspect ; ] ] 1175 { block_declarative_item } 1176 *begin* 1177 { concurrent_statement } 1178 *end* *block* [ block_label ] ; 1179 --> 1180 <context name="block" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="block_cont"> 1181 <RegExpr attribute="Control" context="#pop" insensitive="1" 1182 String="&bos;end\s+block(\s+&varname;)?\s*;" endRegion="BlockRegion1"/> 1183 <WordDetect attribute="Error" context="#pop!expressionError" insensitive="true" 1184 String="end" endRegion="BlockRegion1"/> 1185 </context> 1186 1187 <context name="block_cont" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!block_is"> 1188 <IncludeRules context="blank"/> 1189 <IncludeRules context="enclosed_association_list"/> 1190 <WordDetect attribute="Keyword" context="#pop!block_is" insensitive="true" String="is"/> 1191 </context> 1192 1193 <context name="block_is" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!block_body"> 1194 <IncludeRules context="blank"/> 1195 <IncludeRules context="enclosed_interface_list"/> 1196 <DetectChar attribute="Normal Text" char=";"/> 1197 <IncludeRules context="find_instantiated_map"/> 1198 <WordDetect attribute="Control" insensitive="true" String="generic"/> 1199 <WordDetect attribute="Control" insensitive="true" String="port"/> 1200 </context> 1201 1202 <!-- as block_declarative_stmt but with begin as Keyword --> 1203 <context name="block_body" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="sequential_stmt_expr"> 1204 <IncludeRules context="blank"/> 1205 <IncludeRules context="block_declarative_start_expr"/> 1206 <WordDetect attribute="Keyword" context="#pop!concurrent_stmt" insensitive="1" String="begin"/> 1207 <IncludeRules context="start_simple_expr"/> 1208 </context> 1209 1210 <!-- 1211 process ::= 1212 *process* [ ( *all* | name_list ) ] [ *is* ] 1213 { process_declarative_item } 1214 *begin* 1215 { sequential_statement } 1216 *end* [ *postponed* ] *process* [ label ] ; 1217 --> 1218 <context name="process" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="process_params"> 1219 <RegExpr attribute="Process" context="#pop" insensitive="1" 1220 String="&bos;end(\s+postponed)?(\s+process\b)?(\s+&varname;)?\s*;" endRegion="ProcessRegion1"/> 1221 <WordDetect attribute="Error" context="#pop!expressionError" insensitive="true" 1222 String="end" endRegion="ProcessRegion1"/> 1223 </context> 1224 1225 <context name="process_params" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!process_decl"> 1226 <IncludeRules context="blank"/> 1227 <IncludeRules context="enclosed_association_list"/> 1228 <WordDetect attribute="Keyword" context="#pop!process_decl" String="is"/> 1229 </context> 1230 1231 <context name="process_decl" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="sequential_stmt_expr"> 1232 <IncludeRules context="blank"/> 1233 <IncludeRules context="process_declarative_start_expr"/> 1234 <WordDetect attribute="Process" context="#pop!sequential_stmt" insensitive="true" String="begin"/> 1235 <IncludeRules context="start_simple_expr"/> 1236 </context> 1237 1238 <!-- expression --> 1239 <context name="preExpression" attribute="Normal Text" lineEndContext="#stay"> 1240 <IncludeRules context="blank"/> 1241 <Detect2Chars attribute="Operator" context="external_name" char="<" char1="<"/> 1242 <AnyChar attribute="Operator" context="#stay" String="[]&><=:+-*/|`.,?@"/> 1243 <DetectChar attribute="Vector" context="string" char="""/> 1244 <DetectChar attribute="Attribute" context="attribute" char="'"/> 1245 <Int attribute="Integer" context="abstract_literal"/> 1246 </context> 1247 1248 <context name="postExpression" attribute="Normal Text" lineEndContext="#stay"> 1249 <IncludeRules context="keywordExpression"/> 1250 <DetectIdentifier attribute="Normal Text"/> 1251 </context> 1252 1253 <context name="keywordExpression" attribute="Normal Text" lineEndContext="#stay"> 1254 <keyword attribute="Data Type" context="#stay" String="types"/> 1255 <keyword attribute="Data Type" context="#stay" String="timeunits"/> 1256 <keyword attribute="Range" context="#stay" String="range"/> 1257 <keyword attribute="Keyword" context="#stay" String="keywords"/> 1258 </context> 1259 1260 <!-- expression error --> 1261 <context name="expressionError" attribute="Error" lineEndContext="#pop"> 1262 <Detect2Chars attribute="Comment" context="comment" char="-" char1="-"/> 1263 <DetectChar attribute="Error" context="#pop" char=";"/> 1264 </context> 1265 1266 <!-- other environments --> 1267 <context name="comment" attribute="Comment" lineEndContext="#pop"> 1268 <DetectSpaces/> 1269 <IncludeRules context="##Comments"/> 1270 </context> 1271 1272 <context name="block_comment" attribute="Comment" lineEndContext="#stay"> 1273 <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/"/> 1274 <IncludeRules context="comment"/> 1275 </context> 1276 1277 <context name="string" attribute="Vector" lineEndContext="#stay"> 1278 <DetectChar attribute="Vector" context="#pop" char="""/> 1279 </context> 1280 1281 <context name="attribute" attribute="Attribute" lineEndContext="#pop"> 1282 <!-- character_literal or end attribute --> 1283 <RegExpr attribute="Attribute" context="#pop" String="[^']?'"/> 1284 <DetectIdentifier attribute="Attribute"/> 1285 <DetectChar attribute="Attribute" context="quot in att" char="""/> 1286 <DetectChar attribute="Attribute" context="par in att" char="("/> 1287 <DetectSpaces attribute="Normal Text" context="#pop"/> 1288 <AnyChar attribute="Attribute" context="#pop" String=")=<>;" lookAhead="true" /> 1289 </context> 1290 1291 <context name="quot in att" attribute="Attribute" lineEndContext="#stay"> 1292 <DetectChar attribute="Attribute" context="#pop" char="""/> 1293 </context> 1294 <context name="par in att" attribute="Attribute" lineEndContext="#stay"> 1295 <DetectChar attribute="Attribute" context="#pop" char=")"/> 1296 </context> 1297 1298 <context name="signal" attribute="Normal Text" lineEndContext="#stay"> 1299 <IncludeRules context="preExpression"/> 1300 <DetectChar attribute="Normal Text" context="#pop" char=";"/> 1301 <IncludeRules context="pop_end"/> 1302 <IncludeRules context="postExpression"/> 1303 </context> 1304 1305 <!-- 1306 type ::= *type* identifier [ *is* type_definition ] ; 1307 1308 type_definition ::= 1309 type_definition_range 1310 | type_definition_record 1311 | type_definition_protected 1312 | ...... 1313 --> 1314 <context name="type" attribute="Normal Text" lineEndContext="#stay"> 1315 <IncludeRules context="blank"/> 1316 <DetectChar attribute="Normal Text" context="#pop" char=";"/> 1317 <WordDetect attribute="Signal" context="type_is" insensitive="1" String="is"/> 1318 <DetectIdentifier attribute="Normal Text"/> 1319 </context> 1320 1321 <context name="type_is" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop#pop!signal"> 1322 <IncludeRules context="blank"/> 1323 <WordDetect attribute="Keyword" context="#pop#pop!type_record" insensitive="1" String="record" beginRegion="sig"/> 1324 <WordDetect attribute="Keyword" context="#pop#pop!type_range" insensitive="1" String="range"/> 1325 <WordDetect attribute="Keyword" context="#pop#pop!type_protected" insensitive="1" String="protected" beginRegion="BlockRegion1"/> 1326 </context> 1327 1328 <!-- type range 1329 1330 type_definition_range ::= 1331 *range* range 1332 [ *units* 1333 identifier 1334 { identifier = physical_literal ; } 1335 *end* *units* [ identifier ] ] 1336 1337 range ::= 1338 attribute_name 1339 | simple_expression direction simple_expression 1340 1341 attribute_name ::= 1342 prefix [ signature ] ' identifier [ ( expression ) ] 1343 --> 1344 <context name="type_range" attribute="Normal Text" lineEndContext="#stay"> 1345 <IncludeRules context="preExpression"/> 1346 <DetectChar attribute="Normal Text" context="#pop" char=";"/> 1347 <WordDetect attribute="Control" context="#pop!type_range_units" insensitive="1" String="units" beginRegion="UnitRegion1"/> 1348 <IncludeRules context="postExpression"/> 1349 </context> 1350 1351 <context name="type_range_units" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="type_body"> 1352 <RegExpr attribute="Control" context="#pop" insensitive="1" 1353 String="&bos;end\s+units(\s+&identifier;)?\s*;" endRegion="UnitRegion1"/> 1354 <WordDetect attribute="Error" context="#pop!expressionError" insensitive="true" 1355 String="end" endRegion="UnitRegion1"/> 1356 </context> 1357 1358 <context name="type_body" attribute="Normal Text" lineEndContext="#stay"> 1359 <IncludeRules context="preExpression"/> 1360 <IncludeRules context="pop_end"/> 1361 <IncludeRules context="postExpression"/> 1362 </context> 1363 1364 <!-- type record 1365 1366 type_definition_record ::= 1367 *record* 1368 element_declaration 1369 { element_declaration } 1370 *end* *record* [ identifier ] 1371 --> 1372 <context name="type_record" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="type_body"> 1373 <RegExpr attribute="Keyword" context="#pop" insensitive="1" 1374 String="&bos;end\s+record(\s+&identifier;)?\s*;" endRegion="sig"/> 1375 <WordDetect attribute="Error" context="#pop!expressionError" insensitive="true" 1376 String="end" endRegion="sig"/> 1377 </context> 1378 1379 <!-- type protected 1380 1381 type_definition_protected ::= 1382 *protected* 1383 { protected_type_declarative_item } 1384 *end* *protected* [ identifier ] 1385 | *protected* *body* 1386 { process_declarative_item } 1387 *end *protected* *body* [ simple name ] 1388 --> 1389 <context name="type_protected" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="type_protected_stmt"> 1390 <IncludeRules context="blank"/> 1391 <WordDetect attribute="Keyword" context="type_protected_stmt" insensitive="1" String="body"/> 1392 <RegExpr attribute="Keyword" context="#pop" insensitive="1" 1393 String="&bos;end\s+protected(\s+body)?(\s+&identifier;)?\s*;" endRegion="BlockRegion1"/> 1394 <WordDetect attribute="Error" context="#pop!expressionError" insensitive="true" 1395 String="end" endRegion="BlockRegion1"/> 1396 </context> 1397 1398 <context name="type_protected_stmt" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="sequential_stmt_expr"> 1399 <IncludeRules context="blank"/> 1400 <IncludeRules context="process_declarative_start_expr"/> 1401 <IncludeRules context="start_simple_expr"/> 1402 </context> 1403 1404 <!-- 1405 view ::= 1406 *view* identifier *of* name *is* 1407 element_declaration 1408 { element_declaration } 1409 *end* *view* [ identifier ] ; 1410 --> 1411 <context name="view" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="type_body"> 1412 <RegExpr attribute="Keyword" context="#pop" insensitive="1" 1413 String="&bos;end\s+view(\s+&identifier;)?\s*;" endRegion="sig"/> 1414 <WordDetect attribute="Error" context="#pop!expressionError" insensitive="true" 1415 String="end" endRegion="sig"/> 1416 </context> 1417 1418 <!-- 1419 function ::= 1420 *function* designator 1421 [ *generic* ( interface_list ) 1422 [ generic_map_aspect ] ] 1423 [ [ *parameter* ] ( interface_list ) ] *return* name ; 1424 1425 | *function* identifier *is* *new* name 1426 [ name_list ] 1427 [ *return* name ] 1428 [ generic_map_aspect ] ; 1429 1430 | *function* identifier *is* 1431 { process_declarative_item } 1432 *begin* 1433 { sequential_statement } 1434 *end* [ *function* ] [ designator ] ; 1435 --> 1436 <context name="function" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="function_name"> 1437 <IncludeRules context="blank"/> 1438 <DetectIdentifier attribute="Name" context="function_name"/> 1439 <RangeDetect attribute="Vector" context="function_name" char=""" char1="""/> 1440 <RangeDetect attribute="Name" context="function_name" char="\" char1="\"/> 1441 </context> 1442 1443 <context name="function_name" attribute="Normal Text" lineEndContext="#stay"> 1444 <IncludeRules context="blank"/> 1445 <DetectChar attribute="Normal Text" context="function_params" char="("/> 1446 <DetectChar attribute="Normal Text" context="#pop#pop" char=";"/> 1447 <WordDetect attribute="Control" context="function_return" insensitive="1" String="return"/> 1448 <WordDetect attribute="Keyword" context="#pop#pop!function_is" insensitive="1" String="is" beginRegion="FunctionRegion1"/> 1449 <keyword attribute="Keyword" context="#stay" String="keywords"/> 1450 </context> 1451 1452 <context name="function_params" attribute="Normal Text" lineEndContext="#stay"> 1453 <IncludeRules context="preExpression"/> 1454 <DetectChar attribute="Normal Text" context="#pop" char=")"/> 1455 <IncludeRules context="pop_end"/> 1456 <DetectChar attribute="Normal Text" context="function_params_recursive" char="("/> 1457 <WordDetect attribute="Error" context="#pop!function_return" insensitive="1" String="return"/> 1458 <keyword attribute="Signal" String="signals"/> 1459 <IncludeRules context="postExpression"/> 1460 </context> 1461 <context name="function_params_recursive" attribute="Normal Text" lineEndContext="#stay"> 1462 <IncludeRules context="preExpression"/> 1463 <DetectChar attribute="Normal Text" context="#pop" char=")"/> 1464 <DetectChar attribute="Normal Text" context="function_params_recursive" char="("/> 1465 <WordDetect context="#pop" insensitive="1" String="return" lookAhead="1"/> 1466 <IncludeRules context="postExpression"/> 1467 </context> 1468 1469 <context name="function_return" attribute="Normal Text" lineEndContext="#stay"> 1470 <IncludeRules context="preExpression"/> 1471 <DetectChar attribute="Normal Text" context="#pop#pop#pop" char=";"/> 1472 <WordDetect attribute="Keyword" context="#pop#pop#pop!function_is" insensitive="1" String="is" beginRegion="FunctionRegion1"/> 1473 <IncludeRules context="postExpression"/> 1474 </context> 1475 1476 <context name="function_is" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!function_decl"> 1477 <IncludeRules context="blank"/> 1478 <WordDetect attribute="Keyword" context="#pop!function_new" insensitive="1" String="new"/> 1479 </context> 1480 1481 <context name="function_new" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!sequential_stmt_expr"> 1482 <IncludeRules context="blank"/> 1483 <WordDetect attribute="Control" context="#pop!sequential_stmt_expr" insensitive="1" String="return"/> 1484 <IncludeRules context="start_simple_expr_then_pop"/> 1485 </context> 1486 1487 <context name="function_decl" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="sequential_stmt_expr"> 1488 <IncludeRules context="blank"/> 1489 <IncludeRules context="process_declarative_start_expr"/> 1490 <WordDetect attribute="Redirection" context="#pop!function_begin" insensitive="true" String="begin"/> 1491 <IncludeRules context="start_simple_expr"/> 1492 </context> 1493 1494 <context name="function_begin" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="sequential_stmt"> 1495 <RegExpr attribute="Redirection" context="#pop" insensitive="1" 1496 String="&bos;end(\s+function\b)?(\s+&designator;)?\s*;" endRegion="FunctionRegion1"/> 1497 <WordDetect attribute="Error" context="#pop!expressionError" insensitive="true" 1498 String="end" endRegion="FunctionRegion1"/> 1499 </context> 1500 1501 <!-- 1502 procedure ::= 1503 *procedure* designator 1504 [ *generic* ( interface_list ) 1505 [ generic_map_aspect ] ] 1506 [ [ *parameter* ] ( interface_list ) ] ; 1507 1508 | *procedure* identifier *is* *new* name 1509 [ name_list ] 1510 [ *return* name ] 1511 [ generic_map_aspect ] ; 1512 1513 | *procedure* designator 1514 [ [ *parameter* ] ( interface_list ) ] *is* 1515 { process_declarative_item } 1516 *begin* 1517 { sequential_statement } 1518 *end* [ *procedure* ] [ designator ] ; 1519 --> 1520 <context name="procedure" attribute="Normal Text" lineEndContext="#stay"> 1521 <IncludeRules context="blank"/> 1522 <DetectIdentifier attribute="Name" context="procedure_name"/> 1523 <RangeDetect attribute="Vector" context="procedure_name" char=""" char1="""/> 1524 <RangeDetect attribute="Name" context="procedure_name" char="\" char1="\"/> 1525 </context> 1526 1527 <context name="procedure_name" attribute="Normal Text" lineEndContext="#stay"> 1528 <IncludeRules context="blank"/> 1529 <IncludeRules context="enclosed_interface_list"/> 1530 <DetectChar attribute="Normal Text" context="#pop#pop" char=";" endRegion="ProcedureRegion1"/> 1531 <WordDetect attribute="Control" context="#pop#pop!procedure_is" insensitive="true" String="is"/> 1532 <!-- ghdl extension ? 1533 procedure readline (variable f: in text; l: inout line) <- no ; 1534 procedure readline (file f: text; l: inout line) 1535 is ... 1536 --> 1537 <WordDetect attribute="Keyword" context="#pop" insensitive="true" String="procedure" endRegion="ProcedureRegion1" beginRegion="ProcedureRegion1"/> 1538 <keyword attribute="Keyword" context="#stay" String="keywords"/> 1539 </context> 1540 1541 <context name="procedure_is" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!procedure_is2"> 1542 <IncludeRules context="function_is"/> 1543 </context> 1544 1545 <!-- ghdl extension ? 1546 *procedure* designator 1547 (...) is 1548 (...) is <- here 1549 begin ... 1550 --> 1551 <context name="procedure_is2" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!procedure_decl"> 1552 <IncludeRules context="blank"/> 1553 <IncludeRules context="enclosed_interface_list"/> 1554 <WordDetect attribute="Control" context="#pop!procedure_is" insensitive="true" String="is"/> 1555 <WordDetect attribute="Keyword" insensitive="true" String="parameter"/> 1556 </context> 1557 1558 <context name="procedure_decl" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="sequential_stmt_expr"> 1559 <IncludeRules context="blank"/> 1560 <IncludeRules context="process_declarative_start_expr"/> 1561 <WordDetect attribute="Keyword" context="#pop!procedure_begin" insensitive="true" String="begin" endRegion="ProcedureRegion1" beginRegion="ProcedureRegion1"/> 1562 <IncludeRules context="start_simple_expr"/> 1563 </context> 1564 1565 <context name="procedure_begin" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="sequential_stmt"> 1566 <RegExpr attribute="Keyword" context="#pop" insensitive="1" 1567 String="&bos;end(\s+procedure)?(\s+&designator;)?\s*;" endRegion="ProcedureRegion1"/> 1568 <WordDetect attribute="Error" context="#pop!expressionError" insensitive="true" 1569 String="end" endRegion="ProcedureRegion1"/> 1570 </context> 1571 1572 <!-- 1573 component ::= 1574 *component* identifier [ *is* ] 1575 entity_header 1576 *end* *component* [ identifier ] ; 1577 --> 1578 <context name="component" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop"> 1579 <IncludeRules context="blank"/> 1580 <RegExpr attribute="Name" context="component_main" beginRegion="ComponentRegion1" 1581 String="(&identifier;)"/> 1582 </context> 1583 1584 <context name="component_main" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="component_body"> 1585 <RegExpr attribute="Control" context="#pop#pop" dynamic="1" insensitive="1" 1586 String="&bos;end\s+component\b(\s+%1)?\s*;" endRegion="ComponentRegion1"/> 1587 <WordDetect attribute="Error" context="#pop#pop!expressionError" insensitive="true" 1588 String="end" endRegion="ComponentRegion1"/> 1589 </context> 1590 1591 <context name="component_body" attribute="Normal Text" lineEndContext="#stay"> 1592 <IncludeRules context="entity_header"/> 1593 <IncludeRules context="pop_end"/> 1594 <DetectIdentifier attribute="Error"/> 1595 </context> 1596 1597 <context name="pop_end" attribute="Normal Text" lineEndContext="#stay"> 1598 <WordDetect context="#pop" insensitive="1" String="end" lookAhead="1"/> 1599 </context> 1600 1601 </contexts> 1602 <itemDatas> 1603 <itemData name="Normal Text" defStyleNum="dsNormal"/> 1604 <itemData name="Keyword" defStyleNum="dsKeyword"/> 1605 <itemData name="Data Type" defStyleNum="dsDataType"/> 1606 <itemData name="Comment" defStyleNum="dsComment"/> 1607 <itemData name="Integer" defStyleNum="dsDecVal"/> 1608 <itemData name="Exponent" defStyleNum="dsFloat"/> 1609 <itemData name="Based Integer" defStyleNum="dsBaseN"/> 1610 <itemData name="Reference" defStyleNum="dsFunction"/> 1611 <itemData name="Error" defStyleNum="dsError" bold="1"/> 1612 <itemData name="Vector" defStyleNum="dsString"/> 1613 <itemData name="Operator" defStyleNum="dsOthers"/> 1614 <itemData name="Attribute" defStyleNum="dsBaseN"/> 1615 <itemData name="Signal" defStyleNum="dsOthers"/> 1616 <itemData name="Range" defStyleNum="dsOthers"/> 1617 <itemData name="Redirection" defStyleNum="dsAttribute" bold="1"/> <!-- #223388 --> 1618 <itemData name="Process" defStyleNum="dsSpecialChar" bold="1"/> <!-- #0099AA --> 1619 <itemData name="Control" defStyleNum="dsControlFlow"/> <!-- #223388 --> 1620 <itemData name="Name" defStyleNum="dsDecVal" bold="1"/> <!-- #bb6600 --> 1621 </itemDatas> 1622 </highlighting> 1623 <general> 1624 <comments> 1625 <comment name="singleLine" start="--" position="afterwhitespace"/> 1626 </comments> 1627 <keywords casesensitive="0"/> 1628 </general> 1629 </language> 1630 <!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->