-- wwTIP.syntax
-- last edited by Winiger, 30-Sep-81 17:17:44

TIPTable ::= Options TriggerStmt .

Options ::= empty | "OPTIONS" OptionList ;
OptionList ::= SmallOrFast | SmallOrFast , PrintOrDefaultKeys | PrintOrDefaultKeys
SmallOrFast ::= "Small" | "Fast"
PrintOrDefaultKeys ::= "PrintKeys" | "DefaultKeys"

TriggerStmt ::= "SELECT" "TRIGGER" "FROM" TriggerChoiceSeries
EnableStmt  ::= "SELECT" "ENABLE" "FROM" EnableChoiceSeries

TriggerChoiceSeries ::= TriggerChoice ; TriggerChoiceSeries
                      | TriggerChoice "ENDCASE" FinalChoice
EnableChoiceSeries  ::= EnableChoice ; EnableChoiceSeries
                      | EnableChoice "ENDCASE" FinalChoice

TriggerChoice ::= TriggerTerm Expression
EnableChoice  ::= EnableTerm Expression
		  
TriggerTerm ::= Key TimeOut | "Mouse" TimeOut
EnableTerm  ::= Key | PredicateIdent

Key     ::= KeyIdent "Up" | KeyIdent "Down"
TimeOut ::= "BEFORE" Number | "AFTER" Number

Expression ::= "AND" TriggerChoice | "WHILE" EnableChoice
	     | => Statement
Results    ::= ResultItem | ResultItem , Results
	     | ResultItem Expression
ResultItem ::= "Coords" | "Char" | String | Number | ResultIdent
	     
FinalChoice ::= empty | => Statement
Statement   ::= TriggerStmt | EnableStmt | Results