コード例 #1
0
		/// <summary>
		/// Creates a CPL parser for the given code, using the given error tracker.
		/// </summary>
		/// <param name="p_strCode">The code be parsed.</param>
		/// <param name="p_ertErrorTracker">The error tracker to use to log
		/// parsing errors.</param>
		/// <returns>A CPL parser for the given code.</returns>
		public AntlrParserBase CreateParser(string p_strCode, ErrorTracker p_ertErrorTracker)
		{
			AntlrLexerBase lexLexer = CreateLexer(p_strCode, p_ertErrorTracker);
			CommonTokenStream ctsTokens = new CommonTokenStream(lexLexer);
			FONVCplParser prsParser = new FONVCplParser(ctsTokens, "");
			prsParser.SetErrorTracker(p_ertErrorTracker);
			return prsParser;
		}
コード例 #2
0
        /// <summary>
        /// Creates a CPL parser for the given code, using the given error tracker.
        /// </summary>
        /// <param name="p_strCode">The code be parsed.</param>
        /// <param name="p_ertErrorTracker">The error tracker to use to log
        /// parsing errors.</param>
        /// <returns>A CPL parser for the given code.</returns>
        public AntlrParserBase CreateParser(string p_strCode, ErrorTracker p_ertErrorTracker)
        {
            AntlrLexerBase    lexLexer  = CreateLexer(p_strCode, p_ertErrorTracker);
            CommonTokenStream ctsTokens = new CommonTokenStream(lexLexer);
            FONVCplParser     prsParser = new FONVCplParser(ctsTokens, "");

            prsParser.SetErrorTracker(p_ertErrorTracker);
            return(prsParser);
        }