Esempio n. 1
0
        public ASMGenerator(List <Token> tokenList)
        {
            //err = 0;
            //warn= 0;
            cL = 0;

            //int pos = codefile.rfind('.');
            //codefile.erase(pos, codefile.length()-1);
            //codefile += ".asm";
            inStream = new StreamWriter("c:\\gcd.asm", false, Encoding.ASCII, 10);
            analyze  = new CMinusClassLibrary.Analyzer.Analyzer(tokenList);
        }
Esempio n. 2
0
        public ASMGenerator(List<Token> tokenList)
        {
            //err = 0;
            //warn= 0;
            cL	= 0;

            //int pos = codefile.rfind('.');
            //codefile.erase(pos, codefile.length()-1);
            //codefile += ".asm";
            inStream = new StreamWriter("c:\\gcd.asm",false,Encoding.ASCII,10);
            analyze = new CMinusClassLibrary.Analyzer.Analyzer(tokenList);
        }
Esempio n. 3
0
 private void SemanticAnalysis(object sender, ExecutedRoutedEventArgs e)
 {
     LexicalAnalysis(sender, e);
     Analyzer analyzer = new Analyzer(tokenlist);
     analyzer.GetSymbolFile();
     if (ErrorManager.ErrorList.Count == 0)
     {
         dg.Visibility = Visibility.Collapsed;
         sa.Visibility = Visibility.Visible;
         sa.ItemsSource = null;
         sa.ItemsSource = analyzer.GetSymbolTableList();
     }
     else
     {
         error.Visibility = Visibility.Visible;
         dg.Visibility = Visibility.Collapsed;
         sa.Visibility = Visibility.Collapsed;
         error.ItemsSource = null;
         error.ItemsSource = ErrorManager.ErrorList;
     }
 }