コード例 #1
0
        private SymbolCollection CreateSymbols(CGTContent content)
        {
            SymbolCollection symbols = new SymbolCollection();

            foreach (SymbolRecord symbolRecord in content.SymbolTable)
            {
                Symbol symbol = SymbolFactory.CreateSymbol(symbolRecord);
                symbols.Add(symbol);
            }
            return(symbols);
        }
コード例 #2
0
        private SymbolCollection FindExpectedTokens()
        {
            SymbolCollection symbols = new SymbolCollection();
            State            state   = stateStack.Peek();

            foreach (Action action in state.Actions)
            {
                if ((action is ShiftAction) || (action is ReduceAction) || (action is AcceptAction))
                {
                    symbols.Add(action.symbol);
                }
            }
            return(symbols);
        }
コード例 #3
0
ファイル: LALRParser.cs プロジェクト: CSRedRat/pascalabcnet
		private SymbolCollection FindExpectedTokens()
		{
			SymbolCollection symbols = new SymbolCollection();
			State state = stateStack.Peek();
			foreach(Action action in state.Actions)
			{
				if ((action is ShiftAction) || (action is ReduceAction) 
					|| (action is AcceptAction))
				{
					symbols.Add(action.symbol);
				}
			}
			return symbols;
		}
コード例 #4
0
ファイル: Reader.cs プロジェクト: langpavel/LPS-old
 private SymbolCollection CreateSymbols(CGTContent content)
 {
     SymbolCollection symbols = new SymbolCollection();
     foreach (SymbolRecord symbolRecord in content.SymbolTable)
     {
         Symbol symbol = SymbolFactory.CreateSymbol(symbolRecord);
         symbols.Add(symbol);
     }
     return symbols;
 }