BNF expression of MPSL productions



next up previous contents
Next: MPSL Error Messages Up: BNF Productions Previous: BNF Productions

BNF expression of MPSL productions

An MPSL algorithm consists of a translation symbol assignment block, followed by the algorithm itself. Include the Yacc special symbol 'error' for error handling.

strt            : transl_list alg

A translation block is composed of, either nothing (its optional) or a list of translation variable assignment statements.

transl_list     :  

                | transl_list transl_asgn

A translation variable assignment statement is an uninstantiated translation variable followed by a ':' followed by a quoted string literal (LITERALs are guaranteed to be <= 60 chars.

transl_asgn     : TRNVAR ':' LITERAL

A transgressive algorithm is an Algorithm Processor assignment, an algorithm name assignment, followed by a list of one or more beampath transgressives.

alg             : ap_asgn alg_asgn mmode_asgn beam_trnsg_list

An MPS Micro assignment is the AP keyword, followed by assignment, followed by a micro name.

ap_asgn         : AP '=' APNAME

An algorithm name assignment is either empty (its optional) or the name assignment keyword, followed by the assignment operator, followed by a literal.

alg_asgn        : 

                | ALG '=' LITERAL

A machine modes assignment is optional. If given, it is the Global Machine Modes list keyword, followed by an assignment operator, followed by a machine mode disjunction.

mmode_asgn      : 

                | GLOBMMODE '=' mmode_disj

A machine mode disjunction is a list of 1 or more global machine mode names.

mmode_disj      : LITERAL 
                        
                | mmode_disj '|' LITERAL

A beam path transgressive list, is a list of one or more beampath transgressives.

beam_trnsg_list : beam_trnsg      
                        
                | beam_trnsg_list beam_trnsg

A beampath transgressive is a beampath assignment followed by an ex rate transgressive list.

beam_trnsg      : beam_asgn exrate_trnsg_list

A beampath assignment is the BEAM keyword, followed by an assignment operator, followed by a list of BGRPs.

beam_asgn       : BEAM '=' beam_path

A beampath is a BGRP identifier or a disjunction of BGRP identifiers.

beam_path       : LITERAL      
                        
                | beam_path '|' LITERAL

An ex rate group transgressive list is a list of one or more existing rate group transgressives.

exrate_trnsg_list : exrate_trnsg      

                  | exrate_trnsg_list exrate_trnsg

An exrate transgressive is an disjunction of existing rates assignment, followed by the list of stopper transgressives for that existing rate group.

exrate_trnsg      : exrate_asgn stop_trnsg_list

An ex rate group assignment is a RATE keyword, followed by an assignment operator, followed by a disjunction of rates.

exrate_asgn       : RATE '=' rate_disj
A rate disjunction is a list of one or more rates, to be treated as logically ORed.

rate_disj      : LITERAL

               | rate_disj '|' LITERAL

A stopper transgressive list, is a list of 1 or more stopper transgressives.

stop_trnsg_list : stop_trnsg      
                        
               | stop_trnsg_list stop_trnsg

A stopper transgressive is a list of stopper configurations (or `groups') followed by all the result conditions applicable to any of those configs.

stop_trnsg     : stop_asgn rate_trnsg_list

A stopper group assignment is the STOPCNF keyword, a '=' character followed by a stop_disj.

stop_asgn      : STOPCNF '=' stop_disj

A stopper disjunction (or ``group") is a list of one or more stopper conjunctions (or ``configs"). Ie., each element of the list should be interpreted as ORed with the others.

stop_disj      : stop_confsinglet
                        
               | stop_disj '|' stop_confsinglet

A stopper configuration singlet is a stopper conjunction plus an (optional) translation.

stop_confsinglet : stop_conj trn
                        
                 | NONE trn

A stopper configuration is a list of one or more operand equalities, logically ANDed. The operands will be database "addresses" with MPST primary, micro AP92.

stop_conj      : '(' stop_conj ')'

               | OP_COMP_EQ   

               | stop_conj '&' stop_conj

A rate transgressive list is a list of one or more ``rate_trnsg" transgressives. ie At least 1 rate assignment, followed by a transgressive expression.

rate_trnsg_list : rate_trnsg      
                        
                | rate_trnsg_list rate_trnsg

A rate transgressive is a rate identification and the transgressive expression for that rate (the expression which must be true in order to evaluate the next (higher) rate, and if false, requires the adoption of the rate specified in the rate identification.

rate_trnsg     : rate_asgn transgressive

A result assignment is the keyword expressing a target rate, followed by '=' followed by an literal, being the target rate to go to.

rate_asgn      : NEWRATE '=' LITERAL

A transgressive expression is either empty, being the statement that nothing need be satisfied to adopt this rate, or a device value expression; terminated by a ';'.

transgressive  : ';'  empty  
                        
               | expr ';'

A device value expression is a list of one or more conjunctions, logically ORed together.

expr           : conj

               | expr '|' conj

A conjunction is a list of one or more operandsinglets logically ANDed together. Parentheses are checked for correct placement, but cannot be used to override the order of evaluation.

conj           : operandsinglet
                        
               | conj '&' operandsinglet
                        
               | '(' conj ')'

An operandsinglet is an Operand comparison (a device and its value in equality (==) or in inequality (!=)) followed by an optional translation string.

operandsinglet : OP_COMP_EQ trn

               | OP_COMP_NE trn

A translation string is either nothing (making it optional), or either one of a quoted string (being the translation itself) or the name of a variable which has been assigned a translation string.

trn            :  

               | '{' TRNVAR '}' 

               | '{' LITERAL '}'



next up previous contents
Next: MPSL Error Messages Up: BNF Productions Previous: BNF Productions



SLAC Controls Software
Fri Nov 4 11:47:17 PST 1994