示例#1
0
/// <summary/>
public PhonEnvParser
(Symbols syms,ErrorHandler erh):base(syms,new tokens(erh)) {}
示例#2
0
public cs0syntax (Symbols syms,ErrorHandler erh):base(syms,new cs0tokens(erh)) {}
示例#3
0
/// <summary/>
public PhonEnvParser
(Symbols syms):base(syms,new tokens()) {}
示例#4
0
public cs0syntax (Symbols syms):base(syms,new cs0tokens()) {}
示例#5
0
		public Sfactory(Symbols syms,string cls_name,SCreator cr)
		{
			syms.types[cls_name] = cr;
		}
示例#6
0
		public Parser(Symbols syms,Lexer lexer)
		{
			m_lexer = lexer;
			m_symbols = syms;
			m_symbols.erh = m_lexer.tokens.erh;
		}
示例#7
0
		public override bool Pass(Symbols syms,int snum, out ParserEntry entry)
		{
			if (!yyname().Equals("TOKEN")) // derived classes' parsetable do not depend on yytext
				return base.Pass(syms,snum,out entry);
			//Console.WriteLine("Retrieving Parsetable for literal {0}",m_str);
			ParsingInfo pi = (ParsingInfo)syms.literalInfo[m_str];
			if (pi==null)
				syms.erh.Error(new CSToolsException(10,yylx,m_str,String.Format("Parser does not recognise literal <{0}>",m_str)));
			bool r = pi.m_parsetable.Contains(snum);
			entry = r?((ParserEntry)pi.m_parsetable[snum]):null;
			return r;
		}
示例#8
0
		public virtual bool Pass(Symbols syms,int snum,out ParserEntry entry)
		{
			ParsingInfo pi = (ParsingInfo)syms.symbolInfo[yyname()];
			if (pi==null)
			{
				string s = string.Format("No parsinginfo for symbol {0}",yyname());
				syms.erh.Error(new CSToolsFatalException(9,yylx,yyname(),s));
			}
			bool r = pi.m_parsetable.Contains(snum);
			entry = r?((ParserEntry)pi.m_parsetable[snum]):null;
			return r;
		}