Grammar AnalyseurSyn ANTLR-generated HTML file from grammaire.g
Terence Parr, MageLang Institute
|
Definition of parser AnalyseurSyn, which is a subclass of LLkParser. noeud : MOT ; service : prototype specification ; prototype : MOT DEB_PAR liste_param FIN_PAR ; specification : "SPEC" DEB_BLOCK noeud_initial noeud_final liste_trans FIN_BLOCK ; liste_param : parametre ( VIRGULE parametre )* | ; parametre : MOT DEUX_PT MOT ; noeud_initial : "init" noeud PT_VIRGULE ; noeud_final : "final" noeud PT_VIRGULE ; liste_trans : transition ( VIRGULE transition )* ; transition : noeud ( DEB_FLECHE regle FIN_FLECHE noeud | liste_service ) ; regle : garde | elementaire_appel_communication | block ; liste_service : appel_service ( PT_VIRGULE appel_service )* ; appel_service : "<" MOT ">" ; garde : DEB_CROCHET condition FIN_CROCHET action ; elementaire_appel_communication : MOT ( elementaire | appel_communication | fin_fonction ) | appel_communication ; block : DEB_BLOCK liste_actions FIN_BLOCK ; elementaire : ( POINT MOT | ) ( AFFECTE ( element_nombre ( OPERATEUR element_nombre )* | string ( "+" string )* ) | ( INCR | DEB_FLECHE ) ) ; appel_communication : PT_INTERROG prototype | PT_EXCLAM appel_comm ; fin_fonction : DEB_PAR liste_attribut FIN_PAR ; element_nombre : element | NOMBRE ; string : DOUBLE_COTE ( ~DOUBLE_COTE )* DOUBLE_COTE ; element : MOT ( POINT MOT | fin_fonction | ) ; element_nombre_string : string | element_nombre ; condition : "not" condition | DEB_PAR condition FIN_PAR | element_nombre ( ( OP_COMP | ">" ) element_nombre | ) ( OP_LOGIC condition | ) ; action : elementaire_appel_communication | block ; appel_comm : fonction | PT_EXCLAM fonction ; fonction : MOT fin_fonction ; liste_attribut : ( element_nombre_string ( VIRGULE element_nombre_string )* | ) ; liste_actions : action ( PT_VIRGULE action )* ;