GRAMMAR OF FILE APP.LAN


 rule
number

		{ This grammar defines the language A of Thot
		  The notation used here is defined in file META.LAN
	
		   ' '  : keyword
		   [ ]  : optional part
		   < >  : optional and repeatable part
		   /    : choice
	
		   V. Quint	May 1989      }
	
    1	AppliModel = 		'APPLICATION' ElemIdent ';'
				['USES' SchemaList]
		   		['DEFAULT' EvtActionList]
		   		['ELEMENTS' ElemActionsList ]
		   		['ATTRIBUTES' AttrActionList ]
		   		['MENUS' Menus]
		   		'END' .
	
    3	SchemaList =		DocumentType < ',' DocumentType > ';' .
    4	EvtActionList =	 	EvtAction /
				'BEGIN' EvtAction < EvtAction > 'END' ';' .
    9	EvtAction = 		EvtIdent [ '.' PostPre ] '-' '>' ActionIdent ';' .
   11	PostPre =               'Post' / 'Pre' .
	
    5	ElemActionsList =	ElemActions < ElemActions > .
	
   13	ElemActions = 		[ FirstSec ] ElemIdent ':' EvtActionList .
	
   14	FirstSec =		'First' / 'Second' .
	
    6	AttrActionList =        AttrActions < AttrActions > .
	
   15	AttrActions = 		AttrIdent ':' EvtActionList .
	
    7	Menus =			[ 'Main' 'Window' ':' MenuList ]
				[ 'Document' 'Windows' ':' MenuList ]
				< DocumentType 'Windows' ':' MenuList > .
	
   17	MenuList =		'BEGIN' NewMenu < NewMenu > 'END' ';' /
				NewMenu .
	
   18	NewMenu =		[ 'view' ':' ViewNum ] MenuIdent
				[ '.' SubmenuIdent] [ ItemCascade ] ';' .
	
   22	ItemCascade =		'Separator' / 'Button' ':' ItemAction /
				'Toggle' ':' ItemAction /
				'Dynamic' ':' ItemIdent .
	
   23	ItemAction = 		ItemIdent '-' '>' ActionIdent .
	
    8	DocumentType =		NAME .
	
   20	MenuIdent = 		NAME .
	
   21	SubmenuIdent = 		NAME .
	
   24	ItemIdent = 		NAME .
	
   12	ActionIdent =		NAME .
	
    2	ElemIdent = 		NAME .
	
   10	EvtIdent = 		NAME .
	
   16	AttrIdent = 		NAME .
	
   19	ViewNum =		NUMBER .
	
	END
	


*** SHORT KEY-WORDS ***

code  character  numbers of rules using the key-word

1001      ;       1   3   4   9  17  18
1002      ,       3
1003      .       9  18
1004      -       9  23
1005      >       9  23
1006      :      13  15   7   7   7  18  22  22  22



*** LONG KEY-WORDS ***

code  key-word      numbers of rules using the key-word

1101  APPLICATION   1
1102  USES          1
1103  DEFAULT       1
1104  ELEMENTS      1
1105  ATTRIBUTES    1
1106  MENUS         1
1107  END           1   4  17
1108  BEGIN         4  17
1109  Post         11
1110  Pre          11
1111  First        14
1112  Second       14
1113  Main          7
1114  Window        7
1115  Document      7
1116  Windows       7   7
1117  view         18
1118  Separator    22
1119  Button       22
1120  Toggle       22
1121  Dynamic      22



*** TABLE OF RULES AND REFERENCES ***

The code is the code of the symbol and the code of the rule
where that symbol appears in the left part. For each symbole,
the rule numbers indicate the rules that use that symbol in
right part.

 code  symbol        rule numbers

    1  AppliModel     
    2  ElemIdent         1  13
    3  SchemaList        1
    4  EvtActionList     1  13  15
    5  ElemActionsList   1
    6  AttrActionList    1
    7  Menus             1
    8  DocumentType      3   3   7
    9  EvtAction         4   4   4
   10  EvtIdent          9
   11  PostPre           9
   12  ActionIdent       9  23
   13  ElemActions       5   5
   14  FirstSec         13
   15  AttrActions       6   6
   16  AttrIdent        15
   17  MenuList          7   7   7
   18  NewMenu          17  17  17
   19  ViewNum          18
   20  MenuIdent        18
   21  SubmenuIdent     18
   22  ItemCascade      18
   23  ItemAction       22  22
   24  ItemIdent        22  23



*** REFERENCES TO BASIC TYPES ***

Numbers of the rules using NAME
   8  20  21  24  12   2  10  16

Numbers of the rules using NUMBER
  19

Numbers of the rules using STRING

