Following is a portion of the LL(1) grammar for a GUI file. Only the picture button and text button widgets are shown but the others are similar. <x> means that x is a non-terminal symbol. ABC means that abc is a terminal symbol.
<name> is a string
<action> is an Ada command surrounded by quotation marks
<width>, <height>, <underline>, <x>, <y> are integers
<picture> is the name of a GIF file
<accel_key> is a string that represents a keyboard shortcut (e.g.
Ctrl+X)
^ represents the empty string
<window> is the starting symbol for the grammar.
<window> ::= WINDOW <name> <width> <height> <menubar>
<widgets> ENDOF WINDOW
<menubar> ::= MENUBAR <menulist> ENDOF MENUBAR | ^
<menulist> ::= MENU <submenuinfo> <menulist> ENDOF MENU
| ITEM <iteminfo> <menulist> | ^
<submenuinfo> ::= <name> <underline> <possible_action>
<possible_action> ::= <action> | ^
<iteminfo> ::= <name> <underline> <action> <accelerator>
<accelerator> ::= <accel_key> | ^
<widgets> ::= WIDGETS <widgetlist> ENDOF WIDGETS | ^
<widgetlist> ::= <widget> <widgetlist> | ^
<widget> ::= <picturebutton>|<textbutton>|…
<picturebutton> ::= PICTUREBUTTON <name> <x> <y> <width>
<height> <action> <picture>
<textbutton> ::= TEXTBUTTON <name> <x> <y> <width> <height>
<action> <font> <text>
<font> ::= ! <family> <style> <size> | ^
<family> ::= Sans_Serif|Serif|Monospaced
<Style> ::= Bold|Bold_Italic|Italic|Plain
<Size> ::= 8|9|10|...