- Timestamp:
- Nov 27, 2017, 1:09:38 PM (7 years ago)
- Location:
- branches/generator
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/generator
- Property svn:ignore
-
old new 2 2 generator.lps 3 3 lib 4 heaptrclog.trc
-
- Property svn:ignore
-
branches/generator/Forms/UFormMain.lfm
r115 r117 1 1 object FormMain: TFormMain 2 Left = 6202 Left = 382 3 3 Height = 678 4 Top = 4274 Top = 195 5 5 Width = 1050 6 6 Caption = 'Language generator' -
branches/generator/Forms/UFormMain.pas
r114 r117 59 59 60 60 procedure TFormMain.ARulesExecute(Sender: TObject); 61 var 62 FormRules: TFormRules; 61 63 begin 64 FormRules := TFormRules.Create(nil); 62 65 FormRules.Rules := Core.Grammer.Rules; 63 66 FormRules.ShowModal; 64 67 MemoBNF.Lines.Text := Core.Grammer.GetBNF; 68 FreeAndNil(FormRules); 65 69 end; 66 70 -
branches/generator/Forms/UFormRule.lfm
r116 r117 9 9 ClientWidth = 663 10 10 OnCreate = FormCreate 11 OnDestroy = FormDestroy 11 12 OnShow = FormShow 12 13 LCLVersion = '1.6.4.0' -
branches/generator/Forms/UFormRule.pas
r116 r117 22 22 TabSheet2: TTabSheet; 23 23 procedure FormCreate(Sender: TObject); 24 procedure FormDestroy(Sender: TObject); 24 25 procedure FormShow(Sender: TObject); 25 26 private … … 39 40 {$R *.lfm} 40 41 41 uses42 UFormRuleItem;43 44 42 { TFormRule } 45 43 … … 55 53 FormRuleItems.Align := alClient; 56 54 FormRuleItems.Show; 55 end; 56 57 procedure TFormRule.FormDestroy(Sender: TObject); 58 begin 59 FreeAndNil(FormRuleItems); 57 60 end; 58 61 -
branches/generator/Forms/UFormRuleItem.lfm
r114 r117 1 1 object FormRuleItem: TFormRuleItem 2 2 Left = 474 3 Height = 2783 Height = 400 4 4 Top = 386 5 5 Width = 656 6 ActiveControl = EditName7 6 Caption = 'Rule item' 8 ClientHeight = 2787 ClientHeight = 400 9 8 ClientWidth = 656 9 OnClose = FormClose 10 OnCreate = FormCreate 11 OnDestroy = FormDestroy 12 OnShow = FormShow 10 13 LCLVersion = '1.6.4.0' 11 object LabelTerminal: TLabel 12 Left = 16 13 Height = 20 14 Top = 64 15 Width = 61 16 Caption = 'Terminal:' 17 ParentColor = False 18 end 19 object EditName: TEdit 20 Left = 160 21 Height = 28 22 Top = 64 23 Width = 400 14 object ButtonCancel: TButton 15 Left = 176 16 Height = 25 17 Top = 362 18 Width = 75 19 Anchors = [akLeft, akBottom] 20 Caption = 'Cancel' 21 ModalResult = 2 24 22 TabOrder = 0 25 23 end 26 object Button Cancel: TButton27 Left = 23224 object ButtonOk: TButton 25 Left = 352 28 26 Height = 25 29 Top = 20827 Top = 362 30 28 Width = 75 31 Caption = 'Cancel' 32 ModalResult = 2 33 TabOrder = 1 34 end 35 object ButtonOk: TButton 36 Left = 408 37 Height = 25 38 Top = 208 39 Width = 75 29 Anchors = [akLeft, akBottom] 40 30 Caption = 'Ok' 41 31 ModalResult = 1 42 TabOrder = 232 TabOrder = 1 43 33 end 44 34 object ComboBoxType: TComboBox … … 51 41 'Terminal' 52 42 'Non-terminal' 43 'Subitems' 53 44 ) 54 45 OnChange = ComboBoxTypeChange 55 46 Style = csDropDownList 56 TabOrder = 347 TabOrder = 2 57 48 end 58 49 object Label2: TLabel … … 64 55 ParentColor = False 65 56 end 66 object LabelNonTerminal: TLabel57 object PageControl1: TPageControl 67 58 Left = 16 68 Height = 20 69 Top = 112 70 Width = 92 71 Caption = 'Non-terminal:' 72 ParentColor = False 59 Height = 266 60 Top = 88 61 Width = 632 62 ActivePage = TabSheetSubItems 63 Anchors = [akTop, akLeft, akRight, akBottom] 64 ShowTabs = False 65 TabIndex = 2 66 TabOrder = 3 67 object TabSheetTerminal: TTabSheet 68 Caption = 'Terminal' 69 ClientHeight = 168 70 ClientWidth = 624 71 object EditName: TEdit 72 Left = 152 73 Height = 28 74 Top = 16 75 Width = 400 76 TabOrder = 0 77 end 78 object LabelTerminal: TLabel 79 Left = 8 80 Height = 20 81 Top = 24 82 Width = 61 83 Caption = 'Terminal:' 84 ParentColor = False 85 end 86 end 87 object TabSheetNonTerminal: TTabSheet 88 Caption = 'NonTerminal' 89 ClientHeight = 168 90 ClientWidth = 624 91 object ComboBoxNonTerminal: TComboBox 92 Left = 152 93 Height = 28 94 Top = 16 95 Width = 404 96 ItemHeight = 20 97 Style = csDropDownList 98 TabOrder = 0 99 end 100 object LabelNonTerminal: TLabel 101 Left = 8 102 Height = 20 103 Top = 24 104 Width = 92 105 Caption = 'Non-terminal:' 106 ParentColor = False 107 end 108 end 109 object TabSheetSubItems: TTabSheet 110 Caption = 'SubItems' 111 end 73 112 end 74 object ComboBoxNonTerminal: TComboBox 75 Left = 160 76 Height = 28 77 Top = 104 78 Width = 404 79 ItemHeight = 20 80 Style = csDropDownList 113 object CheckBoxOptional: TCheckBox 114 Left = 16 115 Height = 24 116 Top = 56 117 Width = 82 118 Caption = 'Optional' 81 119 TabOrder = 4 82 120 end 121 object CheckBoxRepetitive: TCheckBox 122 Left = 336 123 Height = 24 124 Top = 56 125 Width = 91 126 Caption = 'Repetitive' 127 TabOrder = 5 128 end 83 129 end -
branches/generator/Forms/UFormRuleItem.pas
r111 r117 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 URules;9 ComCtrls, URules; 10 10 11 11 type … … 16 16 ButtonCancel: TButton; 17 17 ButtonOk: TButton; 18 CheckBoxOptional: TCheckBox; 19 CheckBoxRepetitive: TCheckBox; 20 ComboBoxNonTerminal: TComboBox; 18 21 ComboBoxType: TComboBox; 19 ComboBoxNonTerminal: TComboBox;20 22 EditName: TEdit; 21 LabelTerminal: TLabel;22 23 Label2: TLabel; 23 24 LabelNonTerminal: TLabel; 25 LabelTerminal: TLabel; 26 PageControl1: TPageControl; 27 TabSheetTerminal: TTabSheet; 28 TabSheetNonTerminal: TTabSheet; 29 TabSheetSubItems: TTabSheet; 24 30 procedure ComboBoxTypeChange(Sender: TObject); 31 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 32 procedure FormCreate(Sender: TObject); 33 procedure FormDestroy(Sender: TObject); 34 procedure FormShow(Sender: TObject); 25 35 private 36 FormRuleItems: TForm; 26 37 procedure ReloadNonTerminals(Grammer: TGrammer); 27 38 public … … 35 46 FormRuleItem: TFormRuleItem; 36 47 48 37 49 implementation 50 51 uses 52 UCore, UFormRuleItems; 38 53 39 54 {$R *.lfm} … … 45 60 RuleItem.RuleItemType := TRuleItemType(ComboBoxType.ItemIndex); 46 61 UpdateInterface; 62 end; 63 64 procedure TFormRuleItem.FormClose(Sender: TObject; var CloseAction: TCloseAction 65 ); 66 begin 67 Core.PersistentForm1.Save(Self); 68 end; 69 70 procedure TFormRuleItem.FormCreate(Sender: TObject); 71 begin 72 FormRuleItems := TFormRuleItems.Create(nil); 73 FormRuleItems.ManualDock(TabSheetSubItems); 74 FormRuleItems.Align := alClient; 75 FormRuleItems.Show; 76 end; 77 78 procedure TFormRuleItem.FormDestroy(Sender: TObject); 79 begin 80 FreeAndNil(FormRuleItems); 81 end; 82 83 procedure TFormRuleItem.FormShow(Sender: TObject); 84 begin 85 Core.PersistentForm1.Load(Self); 47 86 end; 48 87 … … 59 98 procedure TFormRuleItem.UpdateInterface; 60 99 begin 100 PageControl1.PageIndex := Integer(RuleItem.RuleItemType); 61 101 EditName.Visible := RuleItem.RuleItemType = ritTerminal; 62 102 LabelTerminal.Visible := RuleItem.RuleItemType = ritTerminal; … … 72 112 ComboBoxNonTerminal.ItemIndex := ComboBoxNonTerminal.Items.IndexOfObject(RuleItem.NonTerminal); 73 113 EditName.Text := RuleItem.Terminal; 114 CheckBoxOptional.Checked := RuleItem.Optional; 115 CheckBoxRepetitive.Checked := RuleItem.Repetitive; 116 TFormRuleItems(FormRuleItems).LoadData(RuleItem.SubItems); 74 117 UpdateInterface; 75 118 end; … … 77 120 procedure TFormRuleItem.SaveData(RuleItem: TRuleItem); 78 121 begin 122 TFormRuleItems(FormRuleItems).SaveData(RuleItem.SubItems); 79 123 RuleItem.RuleItemType := TRuleItemType(ComboBoxType.ItemIndex); 80 124 if RuleItem.RuleItemType = ritTerminal then RuleItem.Terminal := EditName.Text 81 125 else if RuleItem.RuleItemType = ritNonTerminal then 82 126 RuleItem.NonTerminal := TRule(ComboBoxNonTerminal.Items.Objects[ComboBoxNonTerminal.ItemIndex]); 127 RuleItem.Optional := CheckBoxOptional.Checked; 128 RuleItem.Repetitive := CheckBoxRepetitive.Checked; 83 129 end; 84 130 -
branches/generator/Forms/UFormRuleItems.pas
r116 r117 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 9 Menus, ActnList, StdCtrls, URules ;9 Menus, ActnList, StdCtrls, URules, UFormRuleItem; 10 10 11 11 type … … 48 48 Selected: Boolean); 49 49 private 50 { private declarations }50 FormRuleItem: TFormRuleItem; 51 51 public 52 52 RuleItems: TRuleItems; … … 63 63 implementation 64 64 65 uses66 UFormRuleItem;67 65 68 66 {$R *.lfm} … … 84 82 NewRuleItem := TRuleItem.Create; 85 83 NewRuleItem.Grammer := RuleItems.Grammer; 84 FormRuleItem := TFormRuleItem.Create(nil); 86 85 FormRuleItem.LoadData(NewRuleItem); 87 86 if FormRuleItem.ShowModal = mrOk then begin … … 91 90 ReloadList; 92 91 end else FreeAndNil(NewRuleItem); 92 FreeAndNil(FormRuleItem); 93 93 end; 94 94 … … 98 98 begin 99 99 RuleItem := TRuleItem(ListView.Selected.Data); 100 FormRuleItem := TFormRuleItem.Create(nil); 100 101 FormRuleItem.LoadData(RuleItem); 101 102 if FormRuleItem.ShowModal = mrOk then begin … … 103 104 ReloadList; 104 105 end; 106 FreeAndNil(FormRuleItem); 105 107 end; 106 108 -
branches/generator/Forms/UFormRules.pas
r116 r117 73 73 NewRule := TRule.Create; 74 74 NewRule.Grammer := Rules.Grammer; 75 FormRule := TFormRule.Create(nil); 75 76 FormRule.LoadData(NewRule); 76 77 if FormRule.ShowModal = mrOk then begin … … 79 80 ReloadList; 80 81 end else FreeAndNil(NewRule); 82 FreeAndNil(FormRule); 81 83 end; 82 84 … … 84 86 var 85 87 Rule: TRule; 88 FormRule: TFormRule; 86 89 begin 87 90 Rule := TRule(ListView1.Selected.Data); 91 FormRule := TFormRule.Create(nil); 88 92 FormRule.LoadData(Rule); 89 93 if FormRule.ShowModal = mrOk then begin … … 91 95 ReloadList; 92 96 end; 97 FreeAndNil(FormRule); 93 98 end; 94 99 … … 118 123 Item.Caption := Rules[Item.Index].Name; 119 124 Item.Data := Rules[Item.Index]; 120 Item.SubItems.Add(Rules[Item.Index].Items.GetBNF (Rules[Item.Index].Items.RuleType));125 Item.SubItems.Add(Rules[Item.Index].Items.GetBNF); 121 126 end; 122 127 end; -
branches/generator/URules.pas
r116 r117 12 12 TRules = class; 13 13 TGrammer = class; 14 15 TRuleItemType = (ritTerminal, ritNonTerminal); 14 TRuleItems = class; 15 16 TRuleItemType = (ritTerminal, ritNonTerminal, ritSubItems); 16 17 17 18 { TRuleItem } 18 19 19 20 TRuleItem = class 20 ParentRule: TRule; 21 private 22 FGrammer: TGrammer; 23 FParentRule: TRule; 24 procedure SetGrammer(AValue: TGrammer); 25 procedure SetParentRule(AValue: TRule); 26 public 27 Optional: Boolean; 28 Repetitive: Boolean; 21 29 RuleItemType: TRuleItemType; 22 30 Terminal: string; 23 31 NonTerminalName: string; 24 32 NonTerminal: TRule; 25 Grammer: TGrammer;33 SubItems: TRuleItems; 26 34 procedure LoadFromXmlNode(Node: TDOMNode); 27 35 procedure SaveToXmlNode(Node: TDOMNode); 28 36 function GetBNF: string; 37 constructor Create; 38 destructor Destroy; override; 39 property Grammer: TGrammer read FGrammer write SetGrammer; 40 property ParentRule: TRule read FParentRule write SetParentRule; 29 41 end; 30 42 … … 34 46 35 47 TRuleItems = class(TFPGObjectList<TRuleItem>) 36 ParentRule: TRule; 48 private 49 FParentRule: TRule; 50 procedure SetParentRule(AValue: TRule); 51 public 37 52 Grammer: TGrammer; 38 53 RuleType: TRuleType; 39 54 procedure LoadFromXmlNode(Node: TDOMNode); 40 55 procedure SaveToXmlNode(Node: TDOMNode); 41 function GetBNF(RuleType: TRuleType): string; 56 procedure UpdateRuleReference; 57 function GetBNF: string; 58 property ParentRule: TRule read FParentRule write SetParentRule; 42 59 end; 43 60 … … 103 120 RulesNode: TDOMNode; 104 121 Rule: TRule; 105 RuleItem: TRuleItem;106 122 begin 107 123 Self.FileName := FileName; … … 123 139 // Update rule references 124 140 for Rule in Rules do 125 for RuleItem in Rule.Items do 126 if RuleItem.RuleItemType = ritNonTerminal then 127 RuleItem.NonTerminal := Rules.FindName(RuleItem.NonTerminalName); 141 Rule.Items.UpdateRuleReference; 128 142 end; 129 143 … … 170 184 171 185 procedure TRuleItem.SaveToXmlNode(Node: TDOMNode); 186 var 187 SubItemsNode: TDOMNode; 172 188 begin 173 189 WriteInteger(Node, 'Type', Integer(RuleItemType)); 174 if RuleItemType = ritTerminal then WriteString(Node, 'Terminal', Terminal) 175 else if RuleItemType = ritNonTerminal then WriteString(Node, 'NonTerminal', NonTerminal.Name) 190 WriteBoolean(Node, 'Optional', Optional); 191 WriteBoolean(Node, 'Repetitive', Repetitive); 192 193 case RuleItemType of 194 ritTerminal: WriteString(Node, 'Terminal', Terminal); 195 ritNonTerminal: WriteString(Node, 'NonTerminal', NonTerminal.Name); 196 ritSubItems: begin 197 SubItemsNode := Node.OwnerDocument.CreateElement('SubItems'); 198 Node.AppendChild(SubItemsNode); 199 SubItems.SaveToXmlNode(SubItemsNode); 200 end; 201 end; 176 202 end; 177 203 178 204 function TRuleItem.GetBNF: string; 179 205 begin 180 if RuleItemType = ritTerminal then Result := '"' + Terminal + '"' 181 else if RuleItemType = ritNonTerminal then Result := NonTerminal.Name; 206 case RuleItemType of 207 ritTerminal: Result := '"' + Terminal + '"'; 208 ritNonTerminal: Result := NonTerminal.Name; 209 ritSubItems: Result := '(' + SubItems.GetBNF + ')'; 210 end; 211 if Optional then Result := '+' + Result; 212 if Repetitive then Result := '*' + Result; 213 end; 214 215 constructor TRuleItem.Create; 216 begin 217 SubItems := TRuleItems.Create; 218 SubItems.Grammer := Grammer; 219 end; 220 221 destructor TRuleItem.Destroy; 222 begin 223 FreeAndNil(SubItems); 224 inherited Destroy; 225 end; 226 227 procedure TRuleItem.SetParentRule(AValue: TRule); 228 begin 229 if FParentRule = AValue then Exit; 230 FParentRule := AValue; 231 SubItems.ParentRule := AValue; 232 end; 233 234 procedure TRuleItem.SetGrammer(AValue: TGrammer); 235 begin 236 if FGrammer = AValue then Exit; 237 FGrammer := AValue; 238 SubItems.Grammer := AValue; 182 239 end; 183 240 184 241 procedure TRuleItem.LoadFromXmlNode(Node: TDOMNode); 242 var 243 SubItemsNode: TDOMNode; 185 244 begin 186 245 RuleItemType := TRuleItemType(ReadInteger(Node, 'Type', Integer(ritTerminal))); 187 if RuleItemType = ritTerminal then Terminal := ReadString(Node, 'Terminal', '') 188 else if RuleItemType = ritNonTerminal then 189 NonTerminalName := ReadString(Node, 'NonTerminal', ''); 246 Optional := ReadBoolean(Node, 'Optional', False); 247 Repetitive := ReadBoolean(Node, 'Repetitive', False); 248 case RuleItemType of 249 ritTerminal: Terminal := ReadString(Node, 'Terminal', ''); 250 ritNonTerminal: NonTerminalName := ReadString(Node, 'NonTerminal', ''); 251 ritSubItems: begin 252 SubItemsNode := Node.FindNode('SubItems'); 253 if Assigned(SubItemsNode) then SubItems.LoadFromXmlNode(SubItemsNode); 254 end; 255 end; 190 256 end; 191 257 … … 206 272 end; 207 273 208 function TRuleItems.GetBNF(RuleType: TRuleType): string; 274 procedure TRuleItems.UpdateRuleReference; 275 var 276 RuleItem: TRuleItem; 277 begin 278 for RuleItem in Self do 279 case RuleItem.RuleItemType of 280 ritNonTerminal: RuleItem.NonTerminal := Grammer.Rules.FindName(RuleItem.NonTerminalName); 281 ritSubItems: RuleItem.SubItems.UpdateRuleReference; 282 end; 283 end; 284 285 function TRuleItems.GetBNF: string; 209 286 var 210 287 Item: TRuleItem; … … 220 297 end; 221 298 299 procedure TRuleItems.SetParentRule(AValue: TRule); 300 begin 301 if FParentRule = AValue then Exit; 302 FParentRule := AValue; 303 end; 304 222 305 procedure TRuleItems.LoadFromXmlNode(Node: TDOMNode); 223 306 var … … 232 315 RuleItem := TRuleItem.Create; 233 316 RuleItem.Grammer := Grammer; 317 RuleItem.ParentRule := ParentRule; 234 318 RuleItem.LoadFromXmlNode(RuleItemNode); 235 319 Add(RuleItem); … … 254 338 function TRule.GetBNF: string; 255 339 begin 256 Result := Name + ' ::= ' + Items.GetBNF (Items.RuleType);340 Result := Name + ' ::= ' + Items.GetBNF; 257 341 end; 258 342 -
branches/generator/generator.lpi
r116 r117 6 6 <SessionStorage Value="InProjectDir"/> 7 7 <MainUnit Value="0"/> 8 <Title Value=" generator"/>8 <Title Value="Language generator"/> 9 9 <ResourceType Value="res"/> 10 10 <UseXPManifest Value="True"/> … … 165 165 </CodeGeneration> 166 166 <Linking> 167 <Debugging> 168 <UseHeaptrc Value="True"/> 169 </Debugging> 167 170 <Options> 168 171 <Win32> … … 175 178 <IgnoredMessages idx5024="True"/> 176 179 </CompilerMessages> 180 <CustomOptions Value="-dDEBUG"/> 177 181 </Other> 178 182 </CompilerOptions> -
branches/generator/generator.lpr
r116 r117 9 9 Interfaces, // this includes the LCL widgetset 10 10 Forms, UCore, URules, Common, TemplateGenerics, UFormRule, UFormMain, 11 UFormRules, UFormRuleItem, UFormRuleItems 11 UFormRules, UFormRuleItem, UFormRuleItems, SysUtils 12 12 { you can add units after this }; 13 13 14 14 {$R *.res} 15 15 16 {$IFDEF DEBUG} 17 const 18 HeapTraceLog = 'heaptrclog.trc'; 19 {$ENDIF} 20 16 21 begin 22 {$IFDEF DEBUG} 23 // Heap trace 24 DeleteFile(ExtractFilePath(ParamStr(0)) + HeapTraceLog); 25 SetHeapTraceOutput(ExtractFilePath(ParamStr(0)) + HeapTraceLog); 26 {$ENDIF} 27 28 Application.Title:='Language generator'; 17 29 RequireDerivedFormResource := True; 18 30 Application.Initialize; 19 31 Application.CreateForm(TCore, Core); 20 32 Application.CreateForm(TFormMain, FormMain); 21 Application.CreateForm(TFormRule, FormRule);22 Application.CreateForm(TFormRules, FormRules);23 Application.CreateForm(TFormRuleItem, FormRuleItem);24 Application.CreateForm(TFormRuleItems, FormRuleItems);25 33 Application.Run; 26 34 end. -
branches/generator/pascal.grm
r116 r117 8 8 <RuleItem> 9 9 <Type>0</Type> 10 <Optional>0</Optional> 11 <Repetitive>0</Repetitive> 10 12 <Terminal>begin</Terminal> 11 13 </RuleItem> 12 14 <RuleItem> 13 15 <Type>1</Type> 16 <Optional>-1</Optional> 17 <Repetitive>-1</Repetitive> 14 18 <NonTerminal>Statement</NonTerminal> 15 19 </RuleItem> 16 20 <RuleItem> 17 21 <Type>0</Type> 22 <Optional>0</Optional> 23 <Repetitive>0</Repetitive> 18 24 <Terminal>end</Terminal> 19 25 </RuleItem> … … 26 32 <RuleItem> 27 33 <Type>0</Type> 34 <Optional>0</Optional> 35 <Repetitive>0</Repetitive> 28 36 <Terminal>if</Terminal> 29 37 </RuleItem> 30 38 <RuleItem> 31 39 <Type>1</Type> 40 <Optional>0</Optional> 41 <Repetitive>0</Repetitive> 32 42 <NonTerminal>Expression</NonTerminal> 33 43 </RuleItem> 34 44 <RuleItem> 35 45 <Type>0</Type> 46 <Optional>0</Optional> 47 <Repetitive>0</Repetitive> 36 48 <Terminal>then</Terminal> 37 49 </RuleItem> 38 50 <RuleItem> 39 51 <Type>1</Type> 52 <Optional>0</Optional> 53 <Repetitive>0</Repetitive> 40 54 <NonTerminal>Statement</NonTerminal> 41 55 </RuleItem> 42 56 <RuleItem> 43 <Type>0</Type> 44 <Terminal>else</Terminal> 45 </RuleItem> 46 <RuleItem> 47 <Type>1</Type> 57 <Type>2</Type> 58 <Optional>-1</Optional> 59 <Repetitive>0</Repetitive> 60 <SubItems> 61 <Type>0</Type> 62 <RuleItem> 63 <Type>0</Type> 64 <Optional>0</Optional> 65 <Repetitive>0</Repetitive> 66 <Terminal>else</Terminal> 67 </RuleItem> 68 <RuleItem> 69 <Type>1</Type> 70 <Optional>0</Optional> 71 <Repetitive>0</Repetitive> 72 <NonTerminal>Statement</NonTerminal> 73 </RuleItem> 74 </SubItems> 75 </RuleItem> 76 </RuleItems> 77 </Rule> 78 <Rule> 79 <Name>WhileDo</Name> 80 <RuleItems> 81 <Type>0</Type> 82 <RuleItem> 83 <Type>0</Type> 84 <Optional>0</Optional> 85 <Repetitive>0</Repetitive> 86 <Terminal>while</Terminal> 87 </RuleItem> 88 <RuleItem> 89 <Type>1</Type> 90 <Optional>0</Optional> 91 <Repetitive>0</Repetitive> 92 <NonTerminal>Expression</NonTerminal> 93 </RuleItem> 94 <RuleItem> 95 <Type>0</Type> 96 <Optional>0</Optional> 97 <Repetitive>0</Repetitive> 98 <Terminal>do</Terminal> 99 </RuleItem> 100 <RuleItem> 101 <Type>1</Type> 102 <Optional>0</Optional> 103 <Repetitive>0</Repetitive> 48 104 <NonTerminal>Statement</NonTerminal> 49 105 </RuleItem> 50 <RuleItem> 51 <Type>0</Type> 106 </RuleItems> 107 </Rule> 108 <Rule> 109 <Name>RepeatUntil</Name> 110 <RuleItems> 111 <Type>0</Type> 112 <RuleItem> 113 <Type>0</Type> 114 <Optional>0</Optional> 115 <Repetitive>0</Repetitive> 116 <Terminal>repeat</Terminal> 117 </RuleItem> 118 <RuleItem> 119 <Type>1</Type> 120 <Optional>0</Optional> 121 <Repetitive>0</Repetitive> 122 <NonTerminal>Statement</NonTerminal> 123 </RuleItem> 124 <RuleItem> 125 <Type>0</Type> 126 <Optional>0</Optional> 127 <Repetitive>0</Repetitive> 128 <Terminal>until</Terminal> 129 </RuleItem> 130 <RuleItem> 131 <Type>1</Type> 132 <Optional>0</Optional> 133 <Repetitive>0</Repetitive> 134 <NonTerminal>Expression</NonTerminal> 135 </RuleItem> 136 </RuleItems> 137 </Rule> 138 <Rule> 139 <Name>ForToDo</Name> 140 <RuleItems> 141 <Type>0</Type> 142 <RuleItem> 143 <Type>0</Type> 144 <Optional>0</Optional> 145 <Repetitive>0</Repetitive> 146 <Terminal>for</Terminal> 147 </RuleItem> 148 <RuleItem> 149 <Type>1</Type> 150 <Optional>0</Optional> 151 <Repetitive>0</Repetitive> 152 <NonTerminal>VariableRef</NonTerminal> 153 </RuleItem> 154 <RuleItem> 155 <Type>0</Type> 156 <Optional>0</Optional> 157 <Repetitive>0</Repetitive> 158 <Terminal>:=</Terminal> 159 </RuleItem> 160 <RuleItem> 161 <Type>1</Type> 162 <Optional>0</Optional> 163 <Repetitive>0</Repetitive> 164 <NonTerminal>Expression</NonTerminal> 165 </RuleItem> 166 <RuleItem> 167 <Type>0</Type> 168 <Optional>0</Optional> 169 <Repetitive>0</Repetitive> 170 <Terminal>to</Terminal> 171 </RuleItem> 172 <RuleItem> 173 <Type>1</Type> 174 <Optional>0</Optional> 175 <Repetitive>0</Repetitive> 176 <NonTerminal>Expression</NonTerminal> 177 </RuleItem> 178 <RuleItem> 179 <Type>0</Type> 180 <Optional>0</Optional> 181 <Repetitive>0</Repetitive> 182 <Terminal>do</Terminal> 183 </RuleItem> 184 <RuleItem> 185 <Type>1</Type> 186 <Optional>0</Optional> 187 <Repetitive>0</Repetitive> 188 <NonTerminal>Statement</NonTerminal> 189 </RuleItem> 190 </RuleItems> 191 </Rule> 192 <Rule> 193 <Name>WithDo</Name> 194 <RuleItems> 195 <Type>0</Type> 196 <RuleItem> 197 <Type>0</Type> 198 <Optional>0</Optional> 199 <Repetitive>0</Repetitive> 200 <Terminal>with</Terminal> 201 </RuleItem> 202 <RuleItem> 203 <Type>1</Type> 204 <Optional>0</Optional> 205 <Repetitive>0</Repetitive> 206 <NonTerminal>VariableRef</NonTerminal> 207 </RuleItem> 208 <RuleItem> 209 <Type>0</Type> 210 <Optional>0</Optional> 211 <Repetitive>0</Repetitive> 212 <Terminal>do</Terminal> 213 </RuleItem> 214 <RuleItem> 215 <Type>1</Type> 216 <Optional>0</Optional> 217 <Repetitive>0</Repetitive> 218 <NonTerminal>Statement</NonTerminal> 219 </RuleItem> 220 </RuleItems> 221 </Rule> 222 <Rule> 223 <Name>CaseOf</Name> 224 <RuleItems> 225 <Type>0</Type> 226 <RuleItem> 227 <Type>0</Type> 228 <Optional>0</Optional> 229 <Repetitive>0</Repetitive> 230 <Terminal>case</Terminal> 231 </RuleItem> 232 <RuleItem> 233 <Type>1</Type> 234 <Optional>0</Optional> 235 <Repetitive>0</Repetitive> 236 <NonTerminal>Expression</NonTerminal> 237 </RuleItem> 238 <RuleItem> 239 <Type>0</Type> 240 <Optional>0</Optional> 241 <Repetitive>0</Repetitive> 242 <Terminal>of</Terminal> 243 </RuleItem> 244 <RuleItem> 245 <Type>0</Type> 246 <Optional>0</Optional> 247 <Repetitive>0</Repetitive> 52 248 <Terminal>end</Terminal> 53 249 </RuleItem> … … 55 251 </Rule> 56 252 <Rule> 57 <Name>WhileDo</Name> 58 <RuleItems> 59 <Type>0</Type> 60 <RuleItem> 61 <Type>0</Type> 62 <Terminal>while</Terminal> 63 </RuleItem> 64 <RuleItem> 65 <Type>1</Type> 253 <Name>Assignment</Name> 254 <RuleItems> 255 <Type>0</Type> 256 <RuleItem> 257 <Type>1</Type> 258 <Optional>0</Optional> 259 <Repetitive>0</Repetitive> 260 <NonTerminal>VariableRef</NonTerminal> 261 </RuleItem> 262 <RuleItem> 263 <Type>0</Type> 264 <Optional>0</Optional> 265 <Repetitive>0</Repetitive> 266 <Terminal>:=</Terminal> 267 </RuleItem> 268 <RuleItem> 269 <Type>1</Type> 270 <Optional>0</Optional> 271 <Repetitive>0</Repetitive> 66 272 <NonTerminal>Expression</NonTerminal> 67 273 </RuleItem> 68 <RuleItem> 69 <Type>0</Type> 274 </RuleItems> 275 </Rule> 276 <Rule> 277 <Name>Statement</Name> 278 <RuleItems> 279 <Type>0</Type> 280 <RuleItem> 281 <Type>1</Type> 282 <Optional>0</Optional> 283 <Repetitive>0</Repetitive> 284 <NonTerminal>BeginEnd</NonTerminal> 285 </RuleItem> 286 <RuleItem> 287 <Type>1</Type> 288 <Optional>0</Optional> 289 <Repetitive>0</Repetitive> 290 <NonTerminal>IfThenElse</NonTerminal> 291 </RuleItem> 292 <RuleItem> 293 <Type>1</Type> 294 <Optional>0</Optional> 295 <Repetitive>0</Repetitive> 296 <NonTerminal>WhileDo</NonTerminal> 297 </RuleItem> 298 <RuleItem> 299 <Type>1</Type> 300 <Optional>0</Optional> 301 <Repetitive>0</Repetitive> 302 <NonTerminal>RepeatUntil</NonTerminal> 303 </RuleItem> 304 <RuleItem> 305 <Type>1</Type> 306 <Optional>0</Optional> 307 <Repetitive>0</Repetitive> 308 <NonTerminal>ForToDo</NonTerminal> 309 </RuleItem> 310 <RuleItem> 311 <Type>1</Type> 312 <Optional>0</Optional> 313 <Repetitive>0</Repetitive> 314 <NonTerminal>WithDo</NonTerminal> 315 </RuleItem> 316 <RuleItem> 317 <Type>1</Type> 318 <Optional>0</Optional> 319 <Repetitive>0</Repetitive> 320 <NonTerminal>CaseOf</NonTerminal> 321 </RuleItem> 322 <RuleItem> 323 <Type>1</Type> 324 <Optional>0</Optional> 325 <Repetitive>0</Repetitive> 326 <NonTerminal>Assignment</NonTerminal> 327 </RuleItem> 328 </RuleItems> 329 </Rule> 330 <Rule> 331 <Name>Expression</Name> 332 <RuleItems> 333 <Type>0</Type> 334 </RuleItems> 335 </Rule> 336 <Rule> 337 <Name>VariableRef</Name> 338 <RuleItems> 339 <Type>0</Type> 340 </RuleItems> 341 </Rule> 342 <Rule> 343 <Name>Program</Name> 344 <RuleItems> 345 <Type>0</Type> 346 <RuleItem> 347 <Type>2</Type> 348 <Optional>-1</Optional> 349 <Repetitive>0</Repetitive> 350 <SubItems> 351 <Type>0</Type> 352 <RuleItem> 353 <Type>0</Type> 354 <Optional>0</Optional> 355 <Repetitive>0</Repetitive> 356 <Terminal>program</Terminal> 357 </RuleItem> 358 <RuleItem> 359 <Type>1</Type> 360 <Optional>0</Optional> 361 <Repetitive>0</Repetitive> 362 <NonTerminal>ProgramName</NonTerminal> 363 </RuleItem> 364 <RuleItem> 365 <Type>0</Type> 366 <Optional>0</Optional> 367 <Repetitive>0</Repetitive> 368 <Terminal>;</Terminal> 369 </RuleItem> 370 </SubItems> 371 </RuleItem> 372 <RuleItem> 373 <Type>1</Type> 374 <Optional>0</Optional> 375 <Repetitive>0</Repetitive> 376 <NonTerminal>BeginEnd</NonTerminal> 377 </RuleItem> 378 <RuleItem> 379 <Type>0</Type> 380 <Optional>0</Optional> 381 <Repetitive>0</Repetitive> 382 <Terminal>.</Terminal> 383 </RuleItem> 384 </RuleItems> 385 </Rule> 386 <Rule> 387 <Name>Uses</Name> 388 <RuleItems> 389 <Type>0</Type> 390 <RuleItem> 391 <Type>0</Type> 392 <Optional>0</Optional> 393 <Repetitive>0</Repetitive> 394 <Terminal>uses</Terminal> 395 </RuleItem> 396 <RuleItem> 397 <Type>1</Type> 398 <Optional>0</Optional> 399 <Repetitive>0</Repetitive> 400 <NonTerminal>UnitReference</NonTerminal> 401 </RuleItem> 402 <RuleItem> 403 <Type>0</Type> 404 <Optional>0</Optional> 405 <Repetitive>0</Repetitive> 406 <Terminal>,</Terminal> 407 </RuleItem> 408 </RuleItems> 409 </Rule> 410 <Rule> 411 <Name>UnitName</Name> 412 <RuleItems> 413 <Type>0</Type> 414 </RuleItems> 415 </Rule> 416 <Rule> 417 <Name>Function</Name> 418 <RuleItems> 419 <Type>0</Type> 420 <RuleItem> 421 <Type>0</Type> 422 <Optional>0</Optional> 423 <Repetitive>0</Repetitive> 424 <Terminal>function</Terminal> 425 </RuleItem> 426 <RuleItem> 427 <Type>1</Type> 428 <Optional>0</Optional> 429 <Repetitive>0</Repetitive> 430 <NonTerminal>Identifier</NonTerminal> 431 </RuleItem> 432 <RuleItem> 433 <Type>0</Type> 434 <Optional>0</Optional> 435 <Repetitive>0</Repetitive> 436 <Terminal>;</Terminal> 437 </RuleItem> 438 <RuleItem> 439 <Type>1</Type> 440 <Optional>0</Optional> 441 <Repetitive>0</Repetitive> 442 <NonTerminal>BeginEnd</NonTerminal> 443 </RuleItem> 444 <RuleItem> 445 <Type>0</Type> 446 <Optional>0</Optional> 447 <Repetitive>0</Repetitive> 448 <Terminal>;</Terminal> 449 </RuleItem> 450 <RuleItem> 451 <Type>1</Type> 452 <Optional>0</Optional> 453 <Repetitive>0</Repetitive> 454 <NonTerminal>FunctionParameters</NonTerminal> 455 </RuleItem> 456 </RuleItems> 457 </Rule> 458 <Rule> 459 <Name>Identifier</Name> 460 <RuleItems> 461 <Type>0</Type> 462 </RuleItems> 463 </Rule> 464 <Rule> 465 <Name>VarSection</Name> 466 <RuleItems> 467 <Type>0</Type> 468 <RuleItem> 469 <Type>0</Type> 470 <Optional>0</Optional> 471 <Repetitive>0</Repetitive> 472 <Terminal>var</Terminal> 473 </RuleItem> 474 <RuleItem> 475 <Type>1</Type> 476 <Optional>0</Optional> 477 <Repetitive>0</Repetitive> 478 <NonTerminal>VariableDefinition</NonTerminal> 479 </RuleItem> 480 </RuleItems> 481 </Rule> 482 <Rule> 483 <Name>FunctionParameters</Name> 484 <RuleItems> 485 <Type>0</Type> 486 <RuleItem> 487 <Type>0</Type> 488 <Optional>0</Optional> 489 <Repetitive>0</Repetitive> 490 <Terminal>(</Terminal> 491 </RuleItem> 492 <RuleItem> 493 <Type>1</Type> 494 <Optional>0</Optional> 495 <Repetitive>0</Repetitive> 496 <NonTerminal>FunctionParameter</NonTerminal> 497 </RuleItem> 498 <RuleItem> 499 <Type>2</Type> 500 <Optional>-1</Optional> 501 <Repetitive>-1</Repetitive> 502 <SubItems> 503 <Type>0</Type> 504 <RuleItem> 505 <Type>0</Type> 506 <Optional>0</Optional> 507 <Repetitive>0</Repetitive> 508 <Terminal>,</Terminal> 509 </RuleItem> 510 <RuleItem> 511 <Type>1</Type> 512 <Optional>0</Optional> 513 <Repetitive>0</Repetitive> 514 <NonTerminal>FunctionParameter</NonTerminal> 515 </RuleItem> 516 </SubItems> 517 </RuleItem> 518 <RuleItem> 519 <Type>0</Type> 520 <Optional>0</Optional> 521 <Repetitive>0</Repetitive> 522 <Terminal>)</Terminal> 523 </RuleItem> 524 </RuleItems> 525 </Rule> 526 <Rule> 527 <Name>FunctionParameter</Name> 528 <RuleItems> 529 <Type>0</Type> 530 </RuleItems> 531 </Rule> 532 <Rule> 533 <Name>VariableDefinition</Name> 534 <RuleItems> 535 <Type>0</Type> 536 <RuleItem> 537 <Type>1</Type> 538 <Optional>0</Optional> 539 <Repetitive>0</Repetitive> 540 <NonTerminal>VariableName</NonTerminal> 541 </RuleItem> 542 <RuleItem> 543 <Type>0</Type> 544 <Optional>0</Optional> 545 <Repetitive>0</Repetitive> 546 <Terminal>:</Terminal> 547 </RuleItem> 548 <RuleItem> 549 <Type>1</Type> 550 <Optional>0</Optional> 551 <Repetitive>0</Repetitive> 552 <NonTerminal>TypeReference</NonTerminal> 553 </RuleItem> 554 <RuleItem> 555 <Type>0</Type> 556 <Optional>0</Optional> 557 <Repetitive>0</Repetitive> 558 <Terminal>;</Terminal> 559 </RuleItem> 560 </RuleItems> 561 </Rule> 562 <Rule> 563 <Name>TypeReference</Name> 564 <RuleItems> 565 <Type>0</Type> 566 </RuleItems> 567 </Rule> 568 <Rule> 569 <Name>VariableName</Name> 570 <RuleItems> 571 <Type>0</Type> 572 </RuleItems> 573 </Rule> 574 <Rule> 575 <Name>Unit</Name> 576 <RuleItems> 577 <Type>0</Type> 578 <RuleItem> 579 <Type>0</Type> 580 <Optional>0</Optional> 581 <Repetitive>0</Repetitive> 582 <Terminal>unit</Terminal> 583 </RuleItem> 584 <RuleItem> 585 <Type>1</Type> 586 <Optional>0</Optional> 587 <Repetitive>0</Repetitive> 588 <NonTerminal>UnitName</NonTerminal> 589 </RuleItem> 590 <RuleItem> 591 <Type>0</Type> 592 <Optional>0</Optional> 593 <Repetitive>0</Repetitive> 594 <Terminal>;</Terminal> 595 </RuleItem> 596 </RuleItems> 597 </Rule> 598 <Rule> 599 <Name>UnitReference</Name> 600 <RuleItems> 601 <Type>0</Type> 602 </RuleItems> 603 </Rule> 604 <Rule> 605 <Name>ForInDo</Name> 606 <RuleItems> 607 <Type>0</Type> 608 <RuleItem> 609 <Type>0</Type> 610 <Optional>0</Optional> 611 <Repetitive>0</Repetitive> 612 <Terminal>for</Terminal> 613 </RuleItem> 614 <RuleItem> 615 <Type>1</Type> 616 <Optional>0</Optional> 617 <Repetitive>0</Repetitive> 618 <NonTerminal>VariableRef</NonTerminal> 619 </RuleItem> 620 <RuleItem> 621 <Type>0</Type> 622 <Optional>0</Optional> 623 <Repetitive>0</Repetitive> 624 <Terminal>in</Terminal> 625 </RuleItem> 626 <RuleItem> 627 <Type>1</Type> 628 <Optional>0</Optional> 629 <Repetitive>0</Repetitive> 630 <NonTerminal>Expression</NonTerminal> 631 </RuleItem> 632 <RuleItem> 633 <Type>0</Type> 634 <Optional>0</Optional> 635 <Repetitive>0</Repetitive> 70 636 <Terminal>do</Terminal> 71 637 </RuleItem> 72 638 <RuleItem> 73 639 <Type>1</Type> 640 <Optional>0</Optional> 641 <Repetitive>0</Repetitive> 74 642 <NonTerminal>Statement</NonTerminal> 75 643 </RuleItem> … … 77 645 </Rule> 78 646 <Rule> 79 <Name>RepeatUntil</Name> 80 <RuleItems> 81 <Type>0</Type> 82 <RuleItem> 83 <Type>0</Type> 84 <Terminal>repeat</Terminal> 85 </RuleItem> 86 <RuleItem> 87 <Type>1</Type> 88 <NonTerminal>Statement</NonTerminal> 89 </RuleItem> 90 <RuleItem> 91 <Type>0</Type> 92 <Terminal>until</Terminal> 93 </RuleItem> 94 <RuleItem> 95 <Type>1</Type> 96 <NonTerminal>Expression</NonTerminal> 97 </RuleItem> 98 </RuleItems> 99 </Rule> 100 <Rule> 101 <Name>ForToDo</Name> 102 <RuleItems> 103 <Type>0</Type> 104 <RuleItem> 105 <Type>0</Type> 106 <Terminal>for</Terminal> 107 </RuleItem> 108 <RuleItem> 109 <Type>1</Type> 110 <NonTerminal>VariableRef</NonTerminal> 111 </RuleItem> 112 <RuleItem> 113 <Type>0</Type> 114 <Terminal>:=</Terminal> 115 </RuleItem> 116 <RuleItem> 117 <Type>1</Type> 118 <NonTerminal>Expression</NonTerminal> 119 </RuleItem> 120 <RuleItem> 121 <Type>0</Type> 122 <Terminal>to</Terminal> 123 </RuleItem> 124 <RuleItem> 125 <Type>1</Type> 126 <NonTerminal>Expression</NonTerminal> 127 </RuleItem> 128 <RuleItem> 129 <Type>0</Type> 130 <Terminal>do</Terminal> 131 </RuleItem> 132 <RuleItem> 133 <Type>1</Type> 134 <NonTerminal>Statement</NonTerminal> 135 </RuleItem> 136 </RuleItems> 137 </Rule> 138 <Rule> 139 <Name>WithDo</Name> 140 <RuleItems> 141 <Type>0</Type> 142 <RuleItem> 143 <Type>0</Type> 144 <Terminal>with</Terminal> 145 </RuleItem> 146 <RuleItem> 147 <Type>1</Type> 148 <NonTerminal>VariableRef</NonTerminal> 149 </RuleItem> 150 <RuleItem> 151 <Type>0</Type> 152 <Terminal>do</Terminal> 153 </RuleItem> 154 <RuleItem> 155 <Type>1</Type> 156 <NonTerminal>Statement</NonTerminal> 157 </RuleItem> 158 </RuleItems> 159 </Rule> 160 <Rule> 161 <Name>CaseOf</Name> 162 <RuleItems> 163 <Type>0</Type> 164 <RuleItem> 165 <Type>0</Type> 166 <Terminal>case</Terminal> 167 </RuleItem> 168 <RuleItem> 169 <Type>1</Type> 170 <NonTerminal>Expression</NonTerminal> 171 </RuleItem> 172 <RuleItem> 173 <Type>0</Type> 174 <Terminal>of</Terminal> 175 </RuleItem> 176 <RuleItem> 177 <Type>0</Type> 647 <Name>TypeRecord</Name> 648 <RuleItems> 649 <Type>0</Type> 650 <RuleItem> 651 <Type>0</Type> 652 <Optional>0</Optional> 653 <Repetitive>0</Repetitive> 654 <Terminal>record</Terminal> 655 </RuleItem> 656 <RuleItem> 657 <Type>0</Type> 658 <Optional>0</Optional> 659 <Repetitive>0</Repetitive> 178 660 <Terminal>end</Terminal> 179 661 </RuleItem> 180 </RuleItems> 181 </Rule> 182 <Rule> 183 <Name>Assignment</Name> 184 <RuleItems> 185 <Type>0</Type> 186 <RuleItem> 187 <Type>1</Type> 188 <NonTerminal>VariableRef</NonTerminal> 189 </RuleItem> 190 <RuleItem> 191 <Type>0</Type> 192 <Terminal>:=</Terminal> 193 </RuleItem> 194 <RuleItem> 195 <Type>1</Type> 196 <NonTerminal>Expression</NonTerminal> 197 </RuleItem> 198 </RuleItems> 199 </Rule> 200 <Rule> 201 <Name>Statement</Name> 202 <RuleItems> 203 <Type>0</Type> 204 <RuleItem> 205 <Type>1</Type> 206 <NonTerminal>BeginEnd</NonTerminal> 207 </RuleItem> 208 <RuleItem> 209 <Type>1</Type> 210 <NonTerminal>IfThenElse</NonTerminal> 211 </RuleItem> 212 <RuleItem> 213 <Type>1</Type> 214 <NonTerminal>WhileDo</NonTerminal> 215 </RuleItem> 216 <RuleItem> 217 <Type>1</Type> 218 <NonTerminal>RepeatUntil</NonTerminal> 219 </RuleItem> 220 <RuleItem> 221 <Type>1</Type> 222 <NonTerminal>ForToDo</NonTerminal> 223 </RuleItem> 224 <RuleItem> 225 <Type>1</Type> 226 <NonTerminal>WithDo</NonTerminal> 227 </RuleItem> 228 <RuleItem> 229 <Type>1</Type> 230 <NonTerminal>CaseOf</NonTerminal> 231 </RuleItem> 232 <RuleItem> 233 <Type>1</Type> 234 <NonTerminal>Assignment</NonTerminal> 235 </RuleItem> 236 </RuleItems> 237 </Rule> 238 <Rule> 239 <Name>Expression</Name> 240 <RuleItems> 241 <Type>0</Type> 242 </RuleItems> 243 </Rule> 244 <Rule> 245 <Name>VariableRef</Name> 246 <RuleItems> 247 <Type>0</Type> 248 </RuleItems> 249 </Rule> 250 <Rule> 251 <Name>Program</Name> 252 <RuleItems> 253 <Type>0</Type> 254 <RuleItem> 255 <Type>1</Type> 256 <NonTerminal>BeginEnd</NonTerminal> 257 </RuleItem> 258 <RuleItem> 259 <Type>0</Type> 260 <Terminal>.</Terminal> 261 </RuleItem> 262 </RuleItems> 263 </Rule> 264 <Rule> 265 <Name>Uses</Name> 266 <RuleItems> 267 <Type>0</Type> 268 <RuleItem> 269 <Type>0</Type> 270 <Terminal>uses</Terminal> 271 </RuleItem> 272 <RuleItem> 273 <Type>1</Type> 274 <NonTerminal>UnitReference</NonTerminal> 275 </RuleItem> 276 <RuleItem> 277 <Type>0</Type> 278 <Terminal>,</Terminal> 279 </RuleItem> 280 </RuleItems> 281 </Rule> 282 <Rule> 283 <Name>UnitName</Name> 284 <RuleItems> 285 <Type>0</Type> 286 </RuleItems> 287 </Rule> 288 <Rule> 289 <Name>Function</Name> 290 <RuleItems> 291 <Type>0</Type> 292 <RuleItem> 293 <Type>0</Type> 294 <Terminal>function</Terminal> 295 </RuleItem> 296 <RuleItem> 297 <Type>1</Type> 298 <NonTerminal>Identifier</NonTerminal> 299 </RuleItem> 300 <RuleItem> 301 <Type>0</Type> 302 <Terminal>;</Terminal> 303 </RuleItem> 304 <RuleItem> 305 <Type>1</Type> 306 <NonTerminal>BeginEnd</NonTerminal> 307 </RuleItem> 308 <RuleItem> 309 <Type>0</Type> 310 <Terminal>;</Terminal> 311 </RuleItem> 312 </RuleItems> 313 </Rule> 314 <Rule> 315 <Name>Identifier</Name> 316 <RuleItems> 317 <Type>0</Type> 318 </RuleItems> 319 </Rule> 320 <Rule> 321 <Name>VarSection</Name> 322 <RuleItems> 323 <Type>0</Type> 324 <RuleItem> 325 <Type>0</Type> 326 <Terminal>var</Terminal> 327 </RuleItem> 328 <RuleItem> 329 <Type>1</Type> 330 <NonTerminal>VariableDefinition</NonTerminal> 331 </RuleItem> 332 </RuleItems> 333 </Rule> 334 <Rule> 335 <Name>FunctionParameters</Name> 336 <RuleItems> 337 <Type>0</Type> 338 <RuleItem> 339 <Type>0</Type> 340 <Terminal>(</Terminal> 341 </RuleItem> 342 <RuleItem> 343 <Type>1</Type> 344 <NonTerminal>FunctionParameter</NonTerminal> 345 </RuleItem> 346 <RuleItem> 347 <Type>0</Type> 348 <Terminal>)</Terminal> 349 </RuleItem> 350 </RuleItems> 351 </Rule> 352 <Rule> 353 <Name>FunctionParameter</Name> 354 <RuleItems> 355 <Type>0</Type> 356 </RuleItems> 357 </Rule> 358 <Rule> 359 <Name>VariableDefinition</Name> 360 <RuleItems> 361 <Type>0</Type> 362 <RuleItem> 363 <Type>1</Type> 364 <NonTerminal>VariableName</NonTerminal> 365 </RuleItem> 366 <RuleItem> 367 <Type>0</Type> 368 <Terminal>:</Terminal> 369 </RuleItem> 370 <RuleItem> 371 <Type>1</Type> 372 <NonTerminal>TypeReference</NonTerminal> 373 </RuleItem> 374 <RuleItem> 375 <Type>0</Type> 376 <Terminal>;</Terminal> 377 </RuleItem> 378 </RuleItems> 379 </Rule> 380 <Rule> 381 <Name>TypeReference</Name> 382 <RuleItems> 383 <Type>0</Type> 384 </RuleItems> 385 </Rule> 386 <Rule> 387 <Name>VariableName</Name> 388 <RuleItems> 389 <Type>0</Type> 390 </RuleItems> 391 </Rule> 392 <Rule> 393 <Name>Unit</Name> 394 <RuleItems> 395 <Type>0</Type> 396 <RuleItem> 397 <Type>0</Type> 398 <Terminal>unit</Terminal> 399 </RuleItem> 400 <RuleItem> 401 <Type>1</Type> 402 <NonTerminal>UnitName</NonTerminal> 403 </RuleItem> 404 <RuleItem> 405 <Type>0</Type> 406 <Terminal>;</Terminal> 407 </RuleItem> 408 </RuleItems> 409 </Rule> 410 <Rule> 411 <Name>UnitReference</Name> 662 <RuleItem> 663 <Type>2</Type> 664 <Optional>-1</Optional> 665 <Repetitive>-1</Repetitive> 666 <SubItems> 667 <Type>0</Type> 668 <RuleItem> 669 <Type>1</Type> 670 <Optional>0</Optional> 671 <Repetitive>0</Repetitive> 672 <NonTerminal>VariableName</NonTerminal> 673 </RuleItem> 674 <RuleItem> 675 <Type>0</Type> 676 <Optional>0</Optional> 677 <Repetitive>0</Repetitive> 678 <Terminal>:</Terminal> 679 </RuleItem> 680 <RuleItem> 681 <Type>1</Type> 682 <Optional>0</Optional> 683 <Repetitive>0</Repetitive> 684 <NonTerminal>TypeReference</NonTerminal> 685 </RuleItem> 686 <RuleItem> 687 <Type>0</Type> 688 <Optional>0</Optional> 689 <Repetitive>0</Repetitive> 690 <Terminal>;</Terminal> 691 </RuleItem> 692 </SubItems> 693 </RuleItem> 694 </RuleItems> 695 </Rule> 696 <Rule> 697 <Name>ProgramName</Name> 412 698 <RuleItems> 413 699 <Type>0</Type>
Note:
See TracChangeset
for help on using the changeset viewer.