Changeset 17 for branches/Analyzátor gramatiky/UMainForm.pas
- Timestamp:
- Apr 9, 2009, 11:16:15 AM (16 years ago)
- Location:
- branches/Analyzátor gramatiky
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Analyzátor gramatiky
-
Property svn:ignore
set to
*.exe
*.dcu
-
Property svn:ignore
set to
-
branches/Analyzátor gramatiky/UMainForm.pas
r10 r17 5 5 uses 6 6 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 Dialogs, StdCtrls, ComCtrls, UGrammer ;7 Dialogs, StdCtrls, ComCtrls, UGrammer, UProgram; 8 8 9 9 const … … 56 56 SourceProgram.Free; 57 57 SourceProgram := TProgram.Create; 58 Grammer.Parse(Memo1.Text, SourceProgram);58 SourceProgram.Parse(Grammer, Memo1.Text); 59 59 ShowProgramTree(SourceProgram); 60 60 end; … … 71 71 PascalProgram.Free; 72 72 PascalProgram := TProgram.Create; 73 Pascal Grammer.Parse(Memo2.Text, PascalProgram);73 PascalProgram.Parse(PascalGrammer, Memo2.Text); 74 74 with PascalProgram.TopItem, PascalGrammer do begin 75 75 // MergeNonterminal(TGrammerRule(Rules[7])); … … 267 267 Name := 'ConcatenationBlock'; 268 268 RuleType := rtSequence; 269 AddRule( WhiteSpace, True, True);270 AddRule( Expression, True, False);269 AddRule(Expression, False, False); 270 AddRule(WhiteSpace, True, True); 271 271 end; 272 272 Rules.Add(ConcatenationBlock); … … 285 285 Name := 'SeparationBlock'; 286 286 RuleType := rtSequence; 287 AddRule(WhiteSpace, True, True);287 //AddRule(WhiteSpace, True, True); 288 288 AddTerminal('|', False, False); 289 289 AddRule(WhiteSpace, True, True); … … 296 296 RuleType := rtSequence; 297 297 AddRule(Concatenation, False, False); 298 AddRule(WhiteSpace, True, True);298 //AddRule(WhiteSpace, True, True); 299 299 AddRule(SeparationBlock, True, True); 300 300 end; … … 311 311 AddRule(WhiteSpace, True, True); 312 312 AddRule(Separation, False, False); 313 AddRule(WhiteSpace, True, True);313 //AddRule(WhiteSpace, True, True); 314 314 AddTerminal('.', False, False); 315 315 AddRule(WhiteSpace, True, True);
Note:
See TracChangeset
for help on using the changeset viewer.