How to create a ParseError object

SyntaxEditor for WPF Forum

Posted 5 years ago by John Groenland - CTO, mcThings Inc
Version: 17.1.0652

I have created a class that inherit from CSharpParser and overwritten the Parse method so I can add compiler errors. See code below:

public class myParser : CSharpParser {
        public myParser (CSharpGrammar grm, string key ) : base(grm) {

        public override IParseData Parse(IParseRequest request) {
            IParseData res = base.Parse(request);
            IDotNetParseData tmp = res as IDotNetParseData;
            System.Collections.Generic.List<IParseError> lst = tmp.Errors as System.Collections.Generic.List<IParseError>;
            // How to add errors 

            return res;


I can add items to the List<IParseError> lst, but how do I create errors?

Comments (1)

Answer - Posted 5 years ago by Actipro Software Support - Cleveland, OH, USA

Hi John,

You can just create an instance of the ActiproSoftware.Text.Parsing.Implementation.ParseError class.  One of the constructor overloads takes in all the main parameters for it.

Actipro Software Support

The latest build of this product (v22.1.3) was released 16 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.