Ignore:
Timestamp:
Apr 9, 2009, 11:16:15 AM (16 years ago)
Author:
george
Message:
  • Upraveno: Analýza gramatiky .
Location:
branches/Analyzátor gramatiky
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/Analyzátor gramatiky

    • Property svn:ignore set to
      *.exe
      *.dcu
  • branches/Analyzátor gramatiky/UMainForm.pas

    r10 r17  
    55uses
    66  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
    7   Dialogs, StdCtrls, ComCtrls, UGrammer;
     7  Dialogs, StdCtrls, ComCtrls, UGrammer, UProgram;
    88
    99const
     
    5656  SourceProgram.Free;
    5757  SourceProgram := TProgram.Create;
    58   Grammer.Parse(Memo1.Text, SourceProgram);
     58  SourceProgram.Parse(Grammer, Memo1.Text);
    5959  ShowProgramTree(SourceProgram);
    6060end;
     
    7171  PascalProgram.Free;
    7272  PascalProgram := TProgram.Create;
    73   PascalGrammer.Parse(Memo2.Text, PascalProgram);
     73  PascalProgram.Parse(PascalGrammer, Memo2.Text);
    7474  with PascalProgram.TopItem, PascalGrammer do begin
    7575//    MergeNonterminal(TGrammerRule(Rules[7]));
     
    267267      Name := 'ConcatenationBlock';
    268268      RuleType := rtSequence;
    269       AddRule(WhiteSpace, True, True);
    270       AddRule(Expression, True, False);
     269      AddRule(Expression, False, False);
     270      AddRule(WhiteSpace, True, True);
    271271    end;
    272272    Rules.Add(ConcatenationBlock);
     
    285285      Name := 'SeparationBlock';
    286286      RuleType := rtSequence;
    287       AddRule(WhiteSpace, True, True);
     287      //AddRule(WhiteSpace, True, True);
    288288      AddTerminal('|', False, False);
    289289      AddRule(WhiteSpace, True, True);
     
    296296      RuleType := rtSequence;
    297297      AddRule(Concatenation, False, False);
    298       AddRule(WhiteSpace, True, True);
     298      //AddRule(WhiteSpace, True, True);
    299299      AddRule(SeparationBlock, True, True);
    300300    end;
     
    311311      AddRule(WhiteSpace, True, True);
    312312      AddRule(Separation, False, False);
    313       AddRule(WhiteSpace, True, True);
     313      //AddRule(WhiteSpace, True, True);
    314314      AddTerminal('.', False, False);
    315315      AddRule(WhiteSpace, True, True);
Note: See TracChangeset for help on using the changeset viewer.