Advertisement
Guest User

Untitled

a guest
Dec 4th, 2011
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 33.04 KB | None | 0 0
  1. // A ANTLR v3 complient version from the original ANTLR v2.7 version posted on:
  2. // http://www.antlr.org/grammar/1086696923011/vhdlams/index.html
  3.  
  4. grammar VAMS;
  5.  
  6. tokens {
  7. ARCHITECTURE='architecture';
  8. ACCESS='access';
  9. ACROSS='across';
  10. OPEN='open';
  11. ALIAS='alias';
  12. IS='is';
  13. RETURN='return';
  14. NEW='new';
  15. OF='of';
  16. BEGIN='begin';
  17. END='end';
  18. BLOCK='block';
  19. POSTPONED='postponed';
  20. PROCESS='process';
  21. ASSERT='assert';
  22. ARRAY='array';
  23. REPORT='report';
  24. SEVERITY='severity';
  25. ATTRIBUTE='attribute';
  26. RANGETOK='range';
  27. USE='use';
  28. FOR='for';
  29. SHARED='shared';
  30. VARIABLE='variable';
  31. GROUP='group';
  32. QUANTITY='quantity';
  33. BREAK='break';
  34. WHEN='when';
  35. CASE='case';
  36. OTHERS='others';
  37. COMPONENT='component';
  38. UNTIL='until';
  39. ELSE='else';
  40. CONFIGURATION='configuration';
  41. CONSTANT='constant';
  42. TRANSPORT='transport';
  43. REJECT='reject';
  44. INERTIAL='inertial';
  45. TO='to';
  46. DOWNTO='downto';
  47. DISCONNECT='disconnect';
  48. AFTER='after';
  49. ENTITY='entity';
  50. PROCEDURE='procedure';
  51. FUNCTION='function';
  52. PACKAGE='package';
  53. TYPE='type';
  54. SUBTYPE='subtype';
  55. SIGNAL='signal';
  56. LABEL='label';
  57. LITERAL='literal';
  58. UNITS='units';
  59. FILE='file';
  60. NATURE='nature';
  61. SUBNATURE='subnature';
  62. TERMINAL='terminal';
  63. ALL='all';
  64. EXIT='exit';
  65. ABS='abs';
  66. NOT='not';
  67. GENERATE='generate';
  68. IF='if';
  69. GENERIC='generic';
  70. MAP='map';
  71. THEN='then';
  72. ELSIF='elsif';
  73. IN='in';
  74. OUT='out';
  75. BUS='bus';
  76. WHILE='while';
  77. LIBRARY='library';
  78. NULLTOK='null';
  79. AND='and';
  80. OR='or';
  81. NAND='nand';
  82. NOR='nor';
  83. XOR='xor';
  84. XNOR='xnor';
  85. LOOP='loop';
  86. INOUT='inout';
  87. BUFFER='buffer';
  88. LINKAGE='linkage';
  89. MOD='mod';
  90. REM='rem';
  91. NEXT='next';
  92. GUARDED='guarded';
  93. BODY='body';
  94. PORT='port';
  95. RECORD='record';
  96. THROUGH='through';
  97. WITH='with';
  98. SELECT='select';
  99. ON='on';
  100. WAIT='wait';
  101. SLL='sll';
  102. SRL='srl';
  103. SLA='sla';
  104. SRA='sra';
  105. ROL='rol';
  106. ROR='ror';
  107. REGISTER='register';
  108. PROCEDURAL='procedural';
  109. SPECTRUM='spectrum';
  110. NOISE='noise';
  111. LIMIT='limit';
  112. TOLERANCE='tolerance';
  113. PURE='pure';
  114. IMPURE='impure';
  115. UNAFFECTED='unaffected';
  116. REFERENCE='reference';
  117. }
  118.  
  119. abstract_literal
  120. : DECIMAL_LITERAL
  121. | BASED_LITERAL
  122. ;
  123.  
  124. access_type_definition
  125. : ACCESS subtype_indication
  126. ;
  127.  
  128. across_aspect
  129. : identifier_list ( tolerance_aspect )? ( VARASGN expression )? ACROSS
  130. ;
  131.  
  132. actual_designator
  133. : expression
  134. | OPEN
  135. ;
  136.  
  137. actual_parameter_part
  138. : association_list
  139. ;
  140.  
  141. actual_part
  142. : (name LPAREN)=> name LPAREN actual_designator RPAREN
  143. | actual_designator
  144. ;
  145.  
  146. adding_operator
  147. : PLUS
  148. | MINUS
  149. | AMPERSAND
  150. ;
  151.  
  152. aggregate
  153. : LPAREN element_association ( COMMA element_association )* RPAREN
  154. ;
  155.  
  156. alias_declaration
  157. : ALIAS alias_designator ( COLON alias_indication )? IS
  158. name ( signature )? SEMI
  159. ;
  160.  
  161. alias_designator
  162. : identifier
  163. | CHARACTER_LITERAL
  164. | STRING_LITERAL
  165. ;
  166.  
  167. alias_indication
  168. : (subnature_indication)=> subnature_indication
  169. | subtype_indication
  170. ;
  171.  
  172. allocator
  173. : NEW ( (name APOSTROPHE)=> qualified_expression | subtype_indication )
  174. ;
  175.  
  176. architecture_body
  177. : ARCHITECTURE identifier OF name IS
  178. architecture_declarative_part
  179. BEGIN
  180. architecture_statement_part
  181. END ( ARCHITECTURE )? ( identifier )? SEMI
  182. ;
  183.  
  184. architecture_declarative_part
  185. : ( block_declarative_item )*
  186. ;
  187.  
  188. architecture_statement
  189. : block_statement
  190. | (( label_colon )? ( POSTPONED )? PROCESS)=>
  191. process_statement
  192. | (( label_colon )? ( POSTPONED )? procedure_call SEMI)=>
  193. concurrent_procedure_call_statement
  194. | (( label_colon )? ( POSTPONED )? ASSERT)=>
  195. concurrent_assertion_statement
  196. | (( label_colon )? ( POSTPONED )?
  197. ( conditional_signal_assignment | selected_signal_assignment ))=>
  198. concurrent_signal_assignment_statement
  199. | (label_colon instantiated_unit)=>
  200. component_instantiation_statement
  201. | (label_colon generation_scheme GENERATE)=>
  202. generate_statement
  203. | (( label_colon )? BREAK ( break_list )? ( sensitivity_clause )?)=>
  204. concurrent_break_statement
  205. | simultaneous_statement
  206. ;
  207.  
  208. architecture_statement_part
  209. : ( architecture_statement )*
  210. ;
  211.  
  212. array_nature_definition
  213. : (ARRAY LPAREN index_subtype_definition)=> unconstrained_nature_definition
  214. | constrained_nature_definition
  215. ;
  216.  
  217. array_type_definition
  218. : (unconstrained_array_definition)=> unconstrained_array_definition
  219. | constrained_array_definition
  220. ;
  221.  
  222. assertion
  223. : ASSERT condition ( REPORT expression )? ( SEVERITY expression )?
  224. ;
  225.  
  226. assertion_statement
  227. : ( label_colon )? assertion SEMI
  228. ;
  229.  
  230. association_element
  231. : ( (formal_part ARROW)=> formal_part ARROW )? actual_part
  232. ;
  233.  
  234. association_list
  235. : association_element ( COMMA association_element )*
  236. ;
  237.  
  238. attribute_declaration
  239. : ATTRIBUTE label_colon name SEMI
  240. ;
  241.  
  242. // Need to add several tokens here, for they are both, VHDLAMS reserved words
  243. // and attribute names.
  244. // (25.2.2004, e.f.)
  245. attribute_designator
  246. : identifier
  247. | RANGETOK
  248. | ACROSS
  249. | THROUGH
  250. | REFERENCE
  251. | TOLERANCE
  252. ;
  253.  
  254. attribute_specification
  255. : ATTRIBUTE attribute_designator OF entity_specification IS expression SEMI
  256. ;
  257.  
  258. base_unit_declaration
  259. : identifier SEMI
  260. ;
  261.  
  262. binding_indication
  263. : ( USE entity_aspect )? ( generic_map_aspect )? ( port_map_aspect )?
  264. ;
  265.  
  266. block_configuration
  267. : FOR block_specification
  268. ( use_clause )*
  269. ( configuration_item )*
  270. END FOR SEMI
  271. ;
  272.  
  273. block_declarative_item
  274. : (subprogram_declaration)=> subprogram_declaration
  275. | subprogram_body
  276. | type_declaration
  277. | subtype_declaration
  278. | constant_declaration
  279. | signal_declaration
  280. | variable_declaration
  281. | file_declaration
  282. | alias_declaration
  283. | component_declaration
  284. | attribute_declaration
  285. | attribute_specification
  286. | configuration_specification
  287. | disconnection_specification
  288. | step_limit_specification
  289. | use_clause
  290. | group_template_declaration
  291. | group_declaration
  292. | nature_declaration
  293. | subnature_declaration
  294. | quantity_declaration
  295. | terminal_declaration
  296. ;
  297.  
  298. block_declarative_part
  299. : ( block_declarative_item )*
  300. ;
  301.  
  302. block_header
  303. : ( generic_clause ( generic_map_aspect SEMI )? )?
  304. ( port_clause ( port_map_aspect SEMI )? )?
  305. ;
  306.  
  307. block_specification
  308. : (identifier)=> identifier ( LPAREN index_specification RPAREN )?
  309. | name
  310. ;
  311.  
  312. block_statement
  313. : label_colon BLOCK ( LPAREN expression RPAREN )? ( IS )?
  314. block_header
  315. block_declarative_part BEGIN
  316. block_statement_part
  317. END BLOCK ( identifier )? SEMI
  318. ;
  319.  
  320. block_statement_part
  321. : ( architecture_statement )*
  322. ;
  323.  
  324. branch_quantity_declaration
  325. : QUANTITY ( (across_aspect)=> across_aspect )?
  326. ( through_aspect )? terminal_aspect SEMI
  327. ;
  328.  
  329. break_element
  330. : ( break_selector_clause )? name ARROW expression
  331. ;
  332.  
  333. break_list
  334. : break_element ( COMMA break_element )*
  335. ;
  336.  
  337. break_selector_clause
  338. : FOR name USE
  339. ;
  340.  
  341. break_statement
  342. : ( label_colon )? BREAK ( break_list )? ( WHEN condition )? SEMI
  343. ;
  344.  
  345. case_statement
  346. : ( label_colon )? CASE expression IS
  347. ( case_statement_alternative )+
  348. END CASE ( identifier )? SEMI
  349. ;
  350.  
  351. case_statement_alternative
  352. : WHEN choices ARROW sequence_of_statements
  353. ;
  354.  
  355. choice
  356. : (identifier)=> identifier
  357. | (discrete_range)=> discrete_range
  358. | simple_expression
  359. | OTHERS
  360. ;
  361.  
  362. choices
  363. : choice ( BAR choice )*
  364. ;
  365.  
  366. component_configuration
  367. : FOR component_specification
  368. ( binding_indication SEMI )?
  369. ( block_configuration )?
  370. END FOR SEMI
  371. ;
  372.  
  373. component_declaration
  374. : COMPONENT identifier ( IS )?
  375. ( generic_clause )?
  376. ( port_clause )?
  377. END COMPONENT ( identifier )? SEMI
  378. ;
  379.  
  380. component_instantiation_statement
  381. : label_colon instantiated_unit
  382. ( generic_map_aspect )?
  383. ( port_map_aspect )? SEMI
  384. ;
  385.  
  386. component_specification
  387. : instantiation_list COLON name
  388. ;
  389.  
  390. composite_nature_definition
  391. : array_nature_definition
  392. | record_nature_definition
  393. ;
  394.  
  395. composite_type_definition
  396. : array_type_definition
  397. | record_type_definition
  398. ;
  399.  
  400. concurrent_assertion_statement
  401. : ( label_colon )? ( POSTPONED )? assertion SEMI
  402. ;
  403.  
  404. concurrent_break_statement
  405. : ( label_colon )? BREAK ( break_list )? ( sensitivity_clause )?
  406. ( WHEN condition )? SEMI
  407. ;
  408.  
  409. concurrent_procedure_call_statement
  410. : ( label_colon )? ( POSTPONED )? procedure_call SEMI
  411. ;
  412.  
  413. concurrent_signal_assignment_statement
  414. : ( label_colon )? ( POSTPONED )?
  415. ( conditional_signal_assignment | selected_signal_assignment )
  416. ;
  417.  
  418. condition
  419. : expression
  420. ;
  421.  
  422. condition_clause
  423. : UNTIL condition
  424. ;
  425.  
  426. conditional_signal_assignment
  427. : target LE opts conditional_waveforms SEMI
  428. ;
  429.  
  430. conditional_waveforms
  431. : waveform ( (WHEN condition ELSE)=> conditional_waveforms_bi )?
  432. ( WHEN condition )?
  433. ;
  434. conditional_waveforms_bi
  435. : WHEN condition ELSE waveform
  436. ( (WHEN condition ELSE)=> conditional_waveforms_bi )?
  437. ;
  438.  
  439. configuration_declaration
  440. : CONFIGURATION identifier OF name IS
  441. configuration_declarative_part
  442. block_configuration
  443. END ( CONFIGURATION )? ( identifier )? SEMI
  444. ;
  445.  
  446. configuration_declarative_item
  447. : use_clause
  448. | attribute_specification
  449. | group_declaration
  450. ;
  451.  
  452. configuration_declarative_part
  453. : ( configuration_declarative_item )*
  454. ;
  455.  
  456. configuration_item
  457. : block_configuration
  458. | component_configuration
  459. ;
  460.  
  461. configuration_specification
  462. : FOR component_specification binding_indication SEMI
  463. ;
  464.  
  465. constant_declaration
  466. : CONSTANT identifier_list COLON subtype_indication
  467. ( VARASGN expression )? SEMI
  468. ;
  469.  
  470. constrained_array_definition
  471. : ARRAY index_constraint OF subtype_indication
  472. ;
  473.  
  474. constrained_nature_definition
  475. : ARRAY index_constraint OF subnature_indication
  476. ;
  477.  
  478. constraint
  479. : range_constraint
  480. | index_constraint
  481. ;
  482.  
  483. context_clause
  484. : ( context_item )*
  485. ;
  486.  
  487. context_item
  488. : library_clause
  489. | use_clause
  490. ;
  491.  
  492. delay_mechanism
  493. : TRANSPORT
  494. | ( REJECT expression )? INERTIAL
  495. ;
  496.  
  497. design_file
  498. : ( design_unit )* EOF
  499. ;
  500.  
  501. design_unit
  502. : context_clause library_unit
  503. ;
  504.  
  505. designator
  506. : identifier
  507. | STRING_LITERAL
  508. ;
  509.  
  510. direction
  511. : TO
  512. | DOWNTO
  513. ;
  514.  
  515. disconnection_specification
  516. : DISCONNECT guarded_signal_specification AFTER expression SEMI
  517. ;
  518.  
  519. discrete_range
  520. : (range)=> range
  521. | subtype_indication
  522. ;
  523.  
  524. element_association
  525. : ( (choices ARROW)=> choices ARROW )? expression
  526. ;
  527.  
  528. element_declaration
  529. : identifier_list COLON element_subtype_definition SEMI
  530. ;
  531.  
  532. element_subnature_definition
  533. : subnature_indication
  534. ;
  535.  
  536. element_subtype_definition
  537. : subtype_indication
  538. ;
  539.  
  540. entity_aspect
  541. : ENTITY name ( LPAREN identifier RPAREN )?
  542. | CONFIGURATION name
  543. | OPEN
  544. ;
  545.  
  546. entity_class
  547. : ENTITY
  548. | ARCHITECTURE
  549. | CONFIGURATION
  550. | PROCEDURE
  551. | FUNCTION
  552. | PACKAGE
  553. | TYPE
  554. | SUBTYPE
  555. | CONSTANT
  556. | SIGNAL
  557. | VARIABLE
  558. | COMPONENT
  559. | LABEL
  560. | LITERAL
  561. | UNITS
  562. | GROUP
  563. | FILE
  564. | NATURE
  565. | SUBNATURE
  566. | QUANTITY
  567. | TERMINAL
  568. ;
  569.  
  570. entity_class_entry
  571. : entity_class ( BOX )?
  572. ;
  573.  
  574. entity_class_entry_list
  575. : entity_class_entry ( COMMA entity_class_entry )*
  576. ;
  577.  
  578. entity_declaration
  579. : ENTITY identifier IS entity_header
  580. entity_declarative_part
  581. ( BEGIN entity_statement_part )?
  582. END ( ENTITY )? ( identifier )? SEMI
  583. ;
  584.  
  585. entity_declarative_item
  586. : (subprogram_declaration)=> subprogram_declaration
  587. | subprogram_body
  588. | type_declaration
  589. | subtype_declaration
  590. | constant_declaration
  591. | signal_declaration
  592. | variable_declaration
  593. | file_declaration
  594. | alias_declaration
  595. | attribute_declaration
  596. | attribute_specification
  597. | disconnection_specification
  598. | step_limit_specification
  599. | use_clause
  600. | group_template_declaration
  601. | group_declaration
  602. | nature_declaration
  603. | subnature_declaration
  604. | quantity_declaration
  605. | terminal_declaration
  606. ;
  607.  
  608. entity_declarative_part
  609. : ( entity_declarative_item )*
  610. ;
  611.  
  612. entity_designator
  613. : entity_tag ( signature )?
  614. ;
  615.  
  616. entity_header
  617. : ( generic_clause )?
  618. ( port_clause )?
  619. ;
  620.  
  621. entity_name_list
  622. : entity_designator ( COMMA entity_designator )*
  623. | OTHERS
  624. | ALL
  625. ;
  626.  
  627. entity_specification
  628. : entity_name_list COLON entity_class
  629. ;
  630.  
  631. entity_statement
  632. : (( label_colon )? ( POSTPONED )? ASSERT)=> concurrent_assertion_statement
  633. | (( label_colon )? ( POSTPONED )? PROCESS)=> process_statement
  634. | concurrent_procedure_call_statement
  635. ;
  636.  
  637. entity_statement_part
  638. : ( entity_statement )*
  639. ;
  640.  
  641. entity_tag
  642. : identifier
  643. | CHARACTER_LITERAL
  644. | STRING_LITERAL
  645. ;
  646.  
  647. enumeration_literal
  648. : identifier
  649. | CHARACTER_LITERAL
  650. ;
  651.  
  652. enumeration_type_definition
  653. : LPAREN enumeration_literal ( COMMA enumeration_literal )* RPAREN
  654. ;
  655.  
  656. exit_statement
  657. : ( label_colon )? EXIT ( identifier )? ( WHEN condition )? SEMI
  658. ;
  659.  
  660. expression
  661. : relation ( options{greedy=true;}: logical_operator relation )*
  662. ;
  663.  
  664. factor
  665. : primary ( options{greedy=true;}: DOUBLESTAR primary )?
  666. | ABS primary
  667. | NOT primary
  668. ;
  669.  
  670. file_declaration
  671. : FILE identifier_list COLON subtype_indication
  672. ( file_open_information )? SEMI
  673. ;
  674.  
  675. file_logical_name
  676. : expression
  677. ;
  678.  
  679. file_open_information
  680. : ( OPEN expression )? IS file_logical_name
  681. ;
  682.  
  683. file_type_definition
  684. : FILE OF name
  685. ;
  686.  
  687. formal_parameter_list
  688. : interface_list
  689. ;
  690.  
  691. formal_part
  692. : name ( LPAREN name RPAREN )?
  693. ;
  694.  
  695. free_quantity_declaration
  696. : QUANTITY identifier_list COLON subtype_indication
  697. ( VARASGN expression )? SEMI
  698. ;
  699.  
  700. function_call
  701. : name ( LPAREN actual_parameter_part RPAREN )?
  702. ;
  703.  
  704. generate_statement
  705. : label_colon generation_scheme
  706. GENERATE
  707. ( ( block_declarative_item )* BEGIN )?
  708. ( architecture_statement )*
  709. END GENERATE ( identifier )? SEMI
  710. ;
  711.  
  712. generation_scheme
  713. : FOR parameter_specification
  714. | IF condition
  715. ;
  716.  
  717. generic_clause
  718. : GENERIC LPAREN generic_list RPAREN SEMI
  719. ;
  720.  
  721. generic_list
  722. : interface_list
  723. ;
  724.  
  725. generic_map_aspect
  726. : GENERIC MAP LPAREN association_list RPAREN
  727. ;
  728.  
  729. group_constituent
  730. : name
  731. | CHARACTER_LITERAL
  732. ;
  733.  
  734. group_constituent_list
  735. : group_constituent ( COMMA group_constituent )*
  736. ;
  737.  
  738. group_declaration
  739. : GROUP label_colon name
  740. LPAREN group_constituent_list RPAREN SEMI
  741. ;
  742.  
  743. group_template_declaration
  744. : GROUP identifier IS LPAREN entity_class_entry_list RPAREN SEMI
  745. ;
  746.  
  747. guarded_signal_specification
  748. : signal_list COLON name
  749. ;
  750.  
  751. identifier
  752. : BASIC_IDENTIFIER
  753. | EXTENDED_IDENTIFIER
  754. ;
  755.  
  756. identifier_list
  757. : identifier ( COMMA identifier )*
  758. ;
  759.  
  760. if_statement
  761. : ( label_colon )? IF condition THEN
  762. sequence_of_statements
  763. ( ELSIF condition THEN sequence_of_statements )*
  764. ( ELSE sequence_of_statements )?
  765. END IF ( identifier )? SEMI
  766. ;
  767.  
  768. index_constraint
  769. : LPAREN discrete_range ( COMMA discrete_range )* RPAREN
  770. ;
  771.  
  772. index_specification
  773. : (discrete_range)=> discrete_range
  774. | expression
  775. ;
  776.  
  777. index_subtype_definition
  778. : name RANGETOK BOX
  779. ;
  780.  
  781. instantiated_unit
  782. : ( COMPONENT )? name
  783. | ENTITY name ( LPAREN identifier RPAREN )?
  784. | CONFIGURATION name
  785. ;
  786.  
  787. instantiation_list
  788. : identifier ( COMMA identifier )*
  789. | OTHERS
  790. | ALL
  791. ;
  792.  
  793. interface_constant_declaration
  794. : ( CONSTANT )? identifier_list COLON ( IN )? subtype_indication
  795. ( VARASGN expression )?
  796. ;
  797.  
  798. interface_declaration
  799. : (interface_constant_declaration)=> interface_constant_declaration
  800. | (interface_signal_declaration)=> interface_signal_declaration
  801. | interface_variable_declaration
  802. | interface_file_declaration
  803. | interface_terminal_declaration
  804. | interface_quantity_declaration
  805. ;
  806.  
  807. interface_element
  808. : interface_declaration
  809. ;
  810.  
  811. interface_file_declaration
  812. : FILE identifier_list COLON subtype_indication
  813. ;
  814.  
  815. interface_list
  816. : interface_element ( SEMI interface_element )*
  817. ;
  818.  
  819. interface_quantity_declaration
  820. : QUANTITY identifier_list COLON ( IN | OUT )? subtype_indication
  821. ( VARASGN expression )?
  822. ;
  823.  
  824. interface_signal_declaration
  825. : ( SIGNAL )? identifier_list COLON ( mode )? subtype_indication
  826. ( BUS )? ( VARASGN expression )?
  827. ;
  828.  
  829. interface_terminal_declaration
  830. : TERMINAL identifier_list COLON subnature_indication
  831. ;
  832.  
  833. interface_variable_declaration
  834. : ( VARIABLE )? identifier_list COLON
  835. ( mode )? subtype_indication ( VARASGN expression )?
  836. ;
  837.  
  838. iteration_scheme
  839. : WHILE condition
  840. | FOR parameter_specification
  841. ;
  842.  
  843. label_colon
  844. : identifier COLON
  845. ;
  846.  
  847. library_clause
  848. : LIBRARY logical_name_list SEMI
  849. ;
  850.  
  851. library_unit
  852. : ( ARCHITECTURE | PACKAGE BODY )=> secondary_unit
  853. | primary_unit
  854. ;
  855.  
  856. literal
  857. : NULLTOK
  858. | BIT_STRING_LITERAL
  859. | (DBLQUOTE)=> STRING_LITERAL
  860. | (enumeration_literal)=> enumeration_literal
  861. | numeric_literal
  862. ;
  863.  
  864. logical_name
  865. : identifier
  866. ;
  867.  
  868. logical_name_list
  869. : logical_name ( COMMA logical_name )*
  870. ;
  871.  
  872. logical_operator
  873. : AND
  874. | OR
  875. | NAND
  876. | NOR
  877. | XOR
  878. | XNOR
  879. ;
  880.  
  881. loop_statement
  882. : ( label_colon )? ( iteration_scheme )?
  883. LOOP
  884. sequence_of_statements
  885. END LOOP ( identifier )? SEMI
  886. ;
  887.  
  888. mode
  889. : IN
  890. | OUT
  891. | INOUT
  892. | BUFFER
  893. | LINKAGE
  894. ;
  895.  
  896. multiplying_operator
  897. : MUL
  898. | DIV
  899. | MOD
  900. | REM
  901. ;
  902.  
  903. name
  904. : ( identifier | STRING_LITERAL )
  905. ( options{greedy=true;}:
  906. (
  907. DOT suffix
  908. | APOSTROPHE aggregate
  909. | ( signature )? APOSTROPHE attribute_designator
  910. | (LPAREN expression ( COMMA expression )* RPAREN)=>
  911. LPAREN expression ( COMMA expression )* RPAREN
  912. | (LPAREN actual_parameter_part RPAREN)=>
  913. LPAREN actual_parameter_part RPAREN
  914. | LPAREN discrete_range ( COMMA discrete_range )* RPAREN
  915. )
  916. )*
  917. ;
  918.  
  919. nature_declaration
  920. : NATURE identifier IS nature_definition SEMI
  921. ;
  922.  
  923. nature_definition
  924. : scalar_nature_definition
  925. | composite_nature_definition
  926. ;
  927.  
  928. nature_element_declaration
  929. : identifier_list COLON element_subnature_definition
  930. ;
  931.  
  932. next_statement
  933. : ( label_colon )? NEXT ( identifier )? ( WHEN condition )? SEMI
  934. ;
  935.  
  936. numeric_literal
  937. : (abstract_literal)=> abstract_literal
  938. | physical_literal
  939. ;
  940.  
  941. object_declaration
  942. : constant_declaration
  943. | signal_declaration
  944. | variable_declaration
  945. | file_declaration
  946. | terminal_declaration
  947. | quantity_declaration
  948. ;
  949.  
  950. opts
  951. : ( GUARDED )? ( delay_mechanism )?
  952. ;
  953.  
  954. package_body
  955. : PACKAGE BODY identifier IS
  956. package_body_declarative_part
  957. END ( PACKAGE BODY )? ( identifier )? SEMI
  958. ;
  959.  
  960. package_body_declarative_item
  961. : (subprogram_declaration)=> subprogram_declaration
  962. | subprogram_body
  963. | type_declaration
  964. | subtype_declaration
  965. | constant_declaration
  966. | variable_declaration
  967. | file_declaration
  968. | alias_declaration
  969. | use_clause
  970. | group_template_declaration
  971. | group_declaration
  972. ;
  973.  
  974. package_body_declarative_part
  975. : ( package_body_declarative_item )*
  976. ;
  977.  
  978. package_declaration
  979. : PACKAGE identifier IS
  980. package_declarative_part
  981. END ( PACKAGE )? ( identifier )? SEMI
  982. ;
  983.  
  984. package_declarative_item
  985. : subprogram_declaration
  986. | type_declaration
  987. | subtype_declaration
  988. | constant_declaration
  989. | signal_declaration
  990. | variable_declaration
  991. | file_declaration
  992. | alias_declaration
  993. | component_declaration
  994. | attribute_declaration
  995. | attribute_specification
  996. | disconnection_specification
  997. | use_clause
  998. | group_template_declaration
  999. | group_declaration
  1000. | nature_declaration
  1001. | subnature_declaration
  1002. | terminal_declaration
  1003. ;
  1004.  
  1005. package_declarative_part
  1006. : ( package_declarative_item )*
  1007. ;
  1008.  
  1009. parameter_specification
  1010. : identifier IN discrete_range
  1011. ;
  1012.  
  1013. physical_literal
  1014. : ( abstract_literal )? name
  1015. ;
  1016.  
  1017. physical_type_definition
  1018. : range_constraint UNITS base_unit_declaration
  1019. ( secondary_unit_declaration )*
  1020. END UNITS ( identifier )?
  1021. ;
  1022.  
  1023. port_clause
  1024. : PORT LPAREN port_list RPAREN SEMI
  1025. ;
  1026.  
  1027. port_list
  1028. : interface_list
  1029. ;
  1030.  
  1031. port_map_aspect
  1032. : PORT MAP LPAREN association_list RPAREN
  1033. ;
  1034.  
  1035. primary
  1036. : (function_call)=> function_call
  1037. | (name APOSTROPHE)=> qualified_expression
  1038. | (LPAREN expression RPAREN)=> LPAREN expression RPAREN
  1039. | literal
  1040. | allocator
  1041. | aggregate
  1042. ;
  1043.  
  1044. primary_unit
  1045. : entity_declaration
  1046. | configuration_declaration
  1047. | package_declaration
  1048. ;
  1049.  
  1050. procedural_declarative_item
  1051. : (subprogram_declaration)=> subprogram_declaration
  1052. | subprogram_body
  1053. | type_declaration
  1054. | subtype_declaration
  1055. | constant_declaration
  1056. | variable_declaration
  1057. | alias_declaration
  1058. | attribute_declaration
  1059. | attribute_specification
  1060. | use_clause
  1061. | group_template_declaration
  1062. | group_declaration
  1063. ;
  1064.  
  1065. procedural_declarative_part
  1066. : ( procedural_declarative_item )*
  1067. ;
  1068.  
  1069. procedural_statement_part
  1070. : ( sequential_statement )*
  1071. ;
  1072.  
  1073. procedure_call
  1074. : name ( LPAREN actual_parameter_part RPAREN )?
  1075. ;
  1076.  
  1077. procedure_call_statement
  1078. : ( label_colon )? procedure_call SEMI
  1079. ;
  1080.  
  1081. process_declarative_item
  1082. : (subprogram_declaration)=> subprogram_declaration
  1083. | subprogram_body
  1084. | type_declaration
  1085. | subtype_declaration
  1086. | constant_declaration
  1087. | variable_declaration
  1088. | file_declaration
  1089. | alias_declaration
  1090. | attribute_declaration
  1091. | attribute_specification
  1092. | use_clause
  1093. | group_template_declaration
  1094. | group_declaration
  1095. ;
  1096.  
  1097. process_declarative_part
  1098. : ( process_declarative_item )*
  1099. ;
  1100.  
  1101. process_statement
  1102. : ( label_colon )? ( POSTPONED )? PROCESS
  1103. ( LPAREN sensitivity_list RPAREN )? ( IS )?
  1104. process_declarative_part
  1105. BEGIN
  1106. process_statement_part
  1107. END ( POSTPONED )? PROCESS ( identifier )? SEMI
  1108. ;
  1109.  
  1110. process_statement_part
  1111. : ( sequential_statement )*
  1112. ;
  1113.  
  1114. qualified_expression
  1115. : name APOSTROPHE ( (aggregate)=> aggregate | LPAREN expression RPAREN )
  1116. ;
  1117.  
  1118. quantity_declaration
  1119. : (free_quantity_declaration)=> free_quantity_declaration
  1120. | (branch_quantity_declaration)=> branch_quantity_declaration
  1121. | source_quantity_declaration
  1122. ;
  1123.  
  1124. quantity_list
  1125. : name ( COMMA name )*
  1126. | OTHERS
  1127. | ALL
  1128. ;
  1129.  
  1130. quantity_specification
  1131. : quantity_list COLON name
  1132. ;
  1133.  
  1134. range
  1135. : (simple_expression direction simple_expression)=>
  1136. simple_expression direction simple_expression
  1137. | name
  1138. ;
  1139.  
  1140. range_constraint
  1141. : RANGETOK range
  1142. ;
  1143.  
  1144. record_nature_definition
  1145. : RECORD ( nature_element_declaration )+
  1146. END RECORD ( identifier )?
  1147. ;
  1148.  
  1149. record_type_definition
  1150. : RECORD ( element_declaration )+
  1151. END RECORD ( identifier )?
  1152. ;
  1153.  
  1154. relation
  1155. : shift_expression
  1156. ( options{greedy=true;}: relational_operator shift_expression )?
  1157. ;
  1158.  
  1159. relational_operator
  1160. : EQ
  1161. | NEQ
  1162. | LOWERTHAN
  1163. | LE
  1164. | GREATERTHAN
  1165. | GE
  1166. ;
  1167.  
  1168. report_statement
  1169. : ( label_colon )? REPORT expression ( SEVERITY expression )? SEMI
  1170. ;
  1171.  
  1172. return_statement
  1173. : ( label_colon )? RETURN ( expression )? SEMI
  1174. ;
  1175.  
  1176. scalar_nature_definition
  1177. : name ACROSS name THROUGH name REFERENCE
  1178. ;
  1179.  
  1180. scalar_type_definition
  1181. : (range_constraint UNITS)=> physical_type_definition
  1182. | enumeration_type_definition
  1183. | range_constraint
  1184. ;
  1185.  
  1186. secondary_unit
  1187. : architecture_body
  1188. | package_body
  1189. ;
  1190.  
  1191. secondary_unit_declaration
  1192. : identifier EQ physical_literal SEMI
  1193. ;
  1194.  
  1195. selected_signal_assignment
  1196. : WITH expression SELECT target LE opts selected_waveforms SEMI
  1197. ;
  1198.  
  1199. selected_waveforms
  1200. : waveform WHEN choices ( COMMA waveform WHEN choices )*
  1201. ;
  1202.  
  1203. sensitivity_clause
  1204. : ON sensitivity_list
  1205. ;
  1206.  
  1207. sensitivity_list
  1208. : name ( COMMA name )*
  1209. ;
  1210.  
  1211. sequence_of_statements
  1212. : ( sequential_statement )*
  1213. ;
  1214.  
  1215. sequential_statement
  1216. : (( label_colon )? WAIT)=> wait_statement
  1217. | (( label_colon )? ASSERT)=> assertion_statement
  1218. | (( label_colon )? REPORT)=> report_statement
  1219. | (( label_colon )? target LE)=> signal_assignment_statement
  1220. | (( label_colon )? target VARASGN)=> variable_assignment_statement
  1221. | (( label_colon )? IF)=> if_statement
  1222. | (( label_colon )? CASE)=> case_statement
  1223. | (( label_colon )? ( iteration_scheme )? LOOP)=> loop_statement
  1224. | (( label_colon )? NEXT)=> next_statement
  1225. | (( label_colon )? EXIT)=> exit_statement
  1226. | (( label_colon )? RETURN)=> return_statement
  1227. | (( label_colon )? NULLTOK SEMI)=> ( label_colon )? NULLTOK SEMI
  1228. | (( label_colon )? BREAK)=> break_statement
  1229. | procedure_call_statement
  1230. ;
  1231.  
  1232. shift_expression
  1233. : simple_expression
  1234. ( options{greedy=true;}: shift_operator simple_expression )?
  1235. ;
  1236.  
  1237. shift_operator
  1238. : SLL
  1239. | SRL
  1240. | SLA
  1241. | SRA
  1242. | ROL
  1243. | ROR
  1244. ;
  1245.  
  1246. signal_assignment_statement
  1247. : ( label_colon )?
  1248. target LE ( delay_mechanism )? waveform SEMI
  1249. ;
  1250.  
  1251. signal_declaration
  1252. : SIGNAL identifier_list COLON
  1253. subtype_indication ( signal_kind )? ( VARASGN expression )? SEMI
  1254. ;
  1255.  
  1256. signal_kind
  1257. : REGISTER
  1258. | BUS
  1259. ;
  1260.  
  1261. signal_list
  1262. : name ( COMMA name )*
  1263. | OTHERS
  1264. | ALL
  1265. ;
  1266.  
  1267. signature
  1268. : LBRACKET ( name ( COMMA name )* )? ( RETURN name )? RBRACKET
  1269. ;
  1270.  
  1271. // NOTE that sign is applied to first operand only (LRM does not permit
  1272. // `a op -b' - use `a op (-b)' instead).
  1273. // (3.2.2004, e.f.)
  1274. simple_expression
  1275. : ( PLUS | MINUS )? term ( options{greedy=true;}: adding_operator term )*
  1276. ;
  1277.  
  1278. simple_simultaneous_statement
  1279. : ( label_colon )?
  1280. simple_expression ASSIGN simple_expression ( tolerance_aspect )? SEMI
  1281. ;
  1282.  
  1283. simultaneous_alternative
  1284. : WHEN choices ARROW simultaneous_statement_part
  1285. ;
  1286.  
  1287. simultaneous_case_statement
  1288. : ( label_colon )? CASE expression USE
  1289. ( simultaneous_alternative )+
  1290. END CASE ( identifier )? SEMI
  1291. ;
  1292.  
  1293. simultaneous_if_statement
  1294. : ( label_colon )? IF condition USE
  1295. simultaneous_statement_part
  1296. ( ELSIF condition USE simultaneous_statement_part )*
  1297. ( ELSE simultaneous_statement_part )?
  1298. END USE ( identifier )? SEMI
  1299. ;
  1300.  
  1301. simultaneous_procedural_statement
  1302. : ( label_colon )? PROCEDURAL ( IS )?
  1303. procedural_declarative_part BEGIN
  1304. procedural_statement_part
  1305. END PROCEDURAL ( identifier )? SEMI
  1306. ;
  1307.  
  1308. simultaneous_statement
  1309. : (( label_colon )? simple_expression ASSIGN)=> simple_simultaneous_statement
  1310. | (( label_colon )? IF condition USE)=> simultaneous_if_statement
  1311. | (( label_colon )? CASE expression USE)=> simultaneous_case_statement
  1312. | (( label_colon )? PROCEDURAL ( IS )?)=> simultaneous_procedural_statement
  1313. | ( label_colon )? NULLTOK SEMI
  1314. ;
  1315.  
  1316. simultaneous_statement_part
  1317. : ( simultaneous_statement )*
  1318. ;
  1319.  
  1320. source_aspect
  1321. : SPECTRUM simple_expression COMMA simple_expression
  1322. | NOISE simple_expression
  1323. ;
  1324.  
  1325. source_quantity_declaration
  1326. : QUANTITY identifier_list COLON subtype_indication source_aspect SEMI
  1327. ;
  1328.  
  1329. step_limit_specification
  1330. : LIMIT quantity_specification WITH expression SEMI
  1331. ;
  1332.  
  1333. subnature_declaration
  1334. : SUBNATURE identifier IS subnature_indication SEMI
  1335. ;
  1336.  
  1337. subnature_indication
  1338. : name ( index_constraint )?
  1339. ( TOLERANCE expression ACROSS expression THROUGH )?
  1340. ;
  1341.  
  1342. subprogram_body
  1343. : subprogram_specification IS
  1344. subprogram_declarative_part
  1345. BEGIN
  1346. subprogram_statement_part
  1347. END ( subprogram_kind )? ( designator )? SEMI
  1348. ;
  1349.  
  1350. subprogram_declaration
  1351. : subprogram_specification SEMI
  1352. ;
  1353.  
  1354. subprogram_declarative_item
  1355. : (subprogram_declaration)=> subprogram_declaration
  1356. | subprogram_body
  1357. | type_declaration
  1358. | subtype_declaration
  1359. | constant_declaration
  1360. | variable_declaration
  1361. | file_declaration
  1362. | alias_declaration
  1363. | attribute_declaration
  1364. | attribute_specification
  1365. | use_clause
  1366. | group_template_declaration
  1367. | group_declaration
  1368. ;
  1369.  
  1370. subprogram_declarative_part
  1371. : ( subprogram_declarative_item )*
  1372. ;
  1373.  
  1374. subprogram_kind
  1375. : PROCEDURE
  1376. | FUNCTION
  1377. ;
  1378.  
  1379. subprogram_specification
  1380. : PROCEDURE designator ( LPAREN formal_parameter_list RPAREN )?
  1381. | ( PURE | IMPURE )? FUNCTION designator
  1382. ( LPAREN formal_parameter_list RPAREN )? RETURN name
  1383. ;
  1384.  
  1385. subprogram_statement_part
  1386. : ( sequential_statement )*
  1387. ;
  1388.  
  1389. subtype_declaration
  1390. : SUBTYPE identifier IS subtype_indication SEMI
  1391. ;
  1392.  
  1393. subtype_indication
  1394. : name ( name )? ( constraint )? ( (TOLERANCE)=> tolerance_aspect )?
  1395. ;
  1396.  
  1397. suffix
  1398. : identifier
  1399. | CHARACTER_LITERAL
  1400. | STRING_LITERAL
  1401. | ALL
  1402. ;
  1403.  
  1404. target
  1405. : name
  1406. | aggregate
  1407. ;
  1408.  
  1409. term
  1410. : factor ( options{greedy=true;}: multiplying_operator factor )*
  1411. ;
  1412.  
  1413. terminal_aspect
  1414. : name ( TO name )?
  1415. ;
  1416.  
  1417. terminal_declaration
  1418. : TERMINAL identifier_list COLON subnature_indication SEMI
  1419. ;
  1420.  
  1421. through_aspect
  1422. : identifier_list ( tolerance_aspect )? ( VARASGN expression )? THROUGH
  1423. ;
  1424.  
  1425. timeout_clause
  1426. : FOR expression
  1427. ;
  1428.  
  1429. tolerance_aspect
  1430. : TOLERANCE expression
  1431. ;
  1432.  
  1433. type_declaration
  1434. : TYPE identifier ( IS type_definition )? SEMI
  1435. ;
  1436.  
  1437. type_definition
  1438. : scalar_type_definition
  1439. | composite_type_definition
  1440. | access_type_definition
  1441. | file_type_definition
  1442. ;
  1443.  
  1444. unconstrained_array_definition
  1445. : ARRAY LPAREN index_subtype_definition ( COMMA index_subtype_definition )*
  1446. RPAREN OF subtype_indication
  1447. ;
  1448.  
  1449. unconstrained_nature_definition
  1450. : ARRAY LPAREN index_subtype_definition ( COMMA index_subtype_definition )*
  1451. RPAREN OF subnature_indication
  1452. ;
  1453.  
  1454. use_clause
  1455. : USE name ( COMMA name )* SEMI
  1456. ;
  1457.  
  1458. variable_assignment_statement
  1459. : ( label_colon )? target VARASGN expression SEMI
  1460. ;
  1461.  
  1462. variable_declaration
  1463. : ( SHARED )? VARIABLE identifier_list COLON
  1464. subtype_indication ( VARASGN expression )? SEMI
  1465. ;
  1466.  
  1467. wait_statement
  1468. : ( label_colon )? WAIT ( sensitivity_clause )?
  1469. ( condition_clause )? ( timeout_clause )? SEMI
  1470. ;
  1471.  
  1472. waveform
  1473. : waveform_element ( COMMA waveform_element )*
  1474. | UNAFFECTED
  1475. ;
  1476.  
  1477. waveform_element
  1478. : expression ( AFTER expression )?
  1479. ;
  1480.  
  1481. TAB
  1482. : ( '\t' )+ // {$setType(ANTLR_USE_NAMESPACE(antlr)Token::SKIP);}
  1483. ;
  1484.  
  1485. SPACE
  1486. : ( ' ' )+ // {$setType(ANTLR_USE_NAMESPACE(antlr)Token::SKIP);}
  1487. ;
  1488.  
  1489. NEWLINE
  1490. : '\n' // {$setType(ANTLR_USE_NAMESPACE(antlr)Token::SKIP); newline();}
  1491. ;
  1492.  
  1493. COMMENT
  1494. : '--' ( ~'\n' )* // {$setType(ANTLR_USE_NAMESPACE(antlr)Token::SKIP);}
  1495. ;
  1496.  
  1497. DOUBLESTAR
  1498. : '**'
  1499. ;
  1500.  
  1501. ASSIGN
  1502. : '=='
  1503. ;
  1504.  
  1505. LE
  1506. : '<='
  1507. ;
  1508.  
  1509. GE
  1510. : '>='
  1511. ;
  1512.  
  1513. ARROW
  1514. : '=>'
  1515. ;
  1516.  
  1517. NEQ
  1518. : '/='
  1519. ;
  1520.  
  1521. VARASGN
  1522. : ':='
  1523. ;
  1524.  
  1525. BOX
  1526. : '<>'
  1527. ;
  1528.  
  1529. DBLQUOTE
  1530. : '"'
  1531. ;
  1532.  
  1533. SEMI
  1534. : ';'
  1535. ;
  1536.  
  1537. COMMA
  1538. : ','
  1539. ;
  1540.  
  1541. AMPERSAND
  1542. : '&'
  1543. ;
  1544.  
  1545. APOSTROPHE
  1546. : '\''
  1547. (
  1548. (( 'a'..'z' | '0'..'9' | '&' | '\'' | '(' | ')'
  1549. | '+' | ',' | '-' | '.' | '/' | ':' | ';' | '<' | '=' | '>' | '|'
  1550. | ' ' | OTHER_SPECIAL_CHARACTER | '\\'
  1551. | '#' | '[' | ']' | '_' | '*' | '"' ) '\'')=>
  1552. ( 'a'..'z' | '0'..'9' | '&' | '\'' | '(' | ')'
  1553. | '+' | ',' | '-' | '.' | '/' | ':' | ';' | '<' | '=' | '>' | '|'
  1554. | ' ' | OTHER_SPECIAL_CHARACTER | '\\'
  1555. | '#' | '[' | ']' | '_' | '*' | '"' ) '\''
  1556. //{$setType(CHARACTER_LITERAL);}
  1557. )?
  1558. ;
  1559.  
  1560. LPAREN
  1561. : '('
  1562. ;
  1563.  
  1564. RPAREN
  1565. : ')'
  1566. ;
  1567.  
  1568. LBRACKET
  1569. : '['
  1570. ;
  1571.  
  1572. RBRACKET
  1573. : ']'
  1574. ;
  1575.  
  1576. COLON
  1577. : ':'
  1578. ;
  1579.  
  1580. MUL
  1581. : '*'
  1582. ;
  1583.  
  1584. DIV
  1585. : '/'
  1586. ;
  1587.  
  1588. PLUS
  1589. : '+'
  1590. ;
  1591.  
  1592. MINUS
  1593. : '-'
  1594. ;
  1595.  
  1596. LOWERTHAN
  1597. : '<'
  1598. ;
  1599.  
  1600. GREATERTHAN
  1601. : '>'
  1602. ;
  1603.  
  1604. EQ
  1605. : '='
  1606. ;
  1607.  
  1608. BAR
  1609. : '|'
  1610. ;
  1611.  
  1612. DOT
  1613. : '.'
  1614. ;
  1615.  
  1616. BACKSLASH
  1617. : '\\'
  1618. ;
  1619.  
  1620. BASIC_IDENTIFIER
  1621. : 'a'..'z' ( 'a'..'z' | '0'..'9' | '_' )*
  1622. ;
  1623.  
  1624. EXTENDED_IDENTIFIER
  1625. : '\\' ( 'a'..'z' | '0'..'9' | '&' | '\'' | '(' | ')'
  1626. | '+' | ',' | '-' | '.' | '/' | ':' | ';' | '<' | '=' | '>' | '|'
  1627. | ' ' | OTHER_SPECIAL_CHARACTER | '\\'
  1628. | '#' | '[' | ']' | '_' )+ '\\'
  1629. ;
  1630.  
  1631. BIT_STRING_LITERAL
  1632. : ( 'b' | 'o' | 'x' ) '\"' BASED_INTEGER '\"'
  1633. ;
  1634.  
  1635. STRING_LITERAL
  1636. : '\"' ( 'a'..'z' | '0'..'9' | '&' | '\'' | '(' | ')'
  1637. | '+' | ',' | '-' | '.' | '/' | ':' | ';' | '<' | '=' | '>' | '|'
  1638. | ' ' | OTHER_SPECIAL_CHARACTER | '\\' | '""' | '*'
  1639. | '#' | '[' | ']' | '_' )* '\"'
  1640. ;
  1641.  
  1642. DECIMAL_LITERAL
  1643. : INTEGER
  1644. (
  1645. ( ( '.' INTEGER )? ( EXPONENT )? )
  1646. |
  1647. ( '#' BASED_INTEGER ( '.' BASED_INTEGER )? '#' ( EXPONENT )? )
  1648. //{$setType(BASED_LITERAL);}
  1649. )
  1650. ;
  1651.  
  1652. CR
  1653. : '\r' //{$setType(ANTLR_USE_NAMESPACE(antlr)Token::SKIP);}
  1654. ;
  1655.  
  1656. fragment
  1657. OTHER_SPECIAL_CHARACTER
  1658. : '!' | '$' | '%' | '@' | '?' | '^' | '`' | '{' | '}' | '~'
  1659. | ' ' | '¡' | '¢' | '£' | '€' | '¥' | 'Š' | '§'
  1660. | 'š' | '©' | 'ª' | '«' | '¬' | '­' | '®' | '¯'
  1661. | '°' | '±' | '²' | '³' | 'Ž' | 'µ' | '¶' | '·'
  1662. | 'ž' | '¹' | 'º' | '»' | 'Œ' | 'œ' | 'Ÿ' | '¿'
  1663. | 'À' | 'Á' | 'Â' | 'Ã' | 'Ä' | 'Å' | 'Æ' | 'Ç'
  1664. | 'È' | 'É' | 'Ê' | 'Ë' | 'Ì' | 'Í' | 'Î' | 'Ï'
  1665. | 'Ð' | 'Ñ' | 'Ò' | 'Ó' | 'Ô' | 'Õ' | 'Ö' | '×'
  1666. | 'Ø' | 'Ù' | 'Ú' | 'Û' | 'Ü' | 'Ý' | 'Þ' | 'ß'
  1667. | 'à' | 'á' | 'â' | 'ã' | 'ä' | 'å' | 'æ' | 'ç'
  1668. | 'è' | 'é' | 'ê' | 'ë' | 'ì' | 'í' | 'î' | 'ï'
  1669. | 'ð' | 'ñ' | 'ò' | 'ó' | 'ô' | 'õ' | 'ö' | '÷'
  1670. | 'ø' | 'ù' | 'ú' | 'û' | 'ü' | 'ý' | 'þ' | 'ÿ'
  1671. ;
  1672.  
  1673. fragment
  1674. INTEGER
  1675. : '0'..'9' ( '_' | '0'..'9' )*
  1676. ;
  1677.  
  1678. fragment
  1679. EXPONENT
  1680. : 'e' ( '+' | '-' )? INTEGER
  1681. ;
  1682.  
  1683. fragment
  1684. BASED_INTEGER
  1685. : ( '0'..'9' | 'a'..'f' ) ( '_' | '0'..'9' | 'a'..'f' )*
  1686. ;
  1687.  
  1688. fragment CHARACTER_LITERAL : ;
  1689. fragment BASED_LITERAL : ;
  1690.  
  1691.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement