/// <summary/> public PhonEnvParser (Symbols syms,ErrorHandler erh):base(syms,new tokens(erh)) {}
public cs0syntax (Symbols syms,ErrorHandler erh):base(syms,new cs0tokens(erh)) {}
/// <summary/> public PhonEnvParser (Symbols syms):base(syms,new tokens()) {}
public cs0syntax (Symbols syms):base(syms,new cs0tokens()) {}
public Sfactory(Symbols syms,string cls_name,SCreator cr) { syms.types[cls_name] = cr; }
public Parser(Symbols syms,Lexer lexer) { m_lexer = lexer; m_symbols = syms; m_symbols.erh = m_lexer.tokens.erh; }
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; }
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; }