Manually Parsing Text

SyntaxEditor for WPF Forum

Posted 13 years ago by Nate Smith - Software Engineer, Logical Progression Group
Version: 10.2.0533
Avatar
I have a syntax editor working and can see it automatically parsing on code changes, but I also need a way to manually (and synchronously) parse text, which was not entered through a syntax editor.

I’m guessing I should be able to build my own IParseRequest and pass it to my parsers version of “IParseData Parse(IParseRequest request)” but I am unclear what concrete type to use and how I should properly construct it.

Can someone suggest some code for this?

Comments (1)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Nate,

We have added a new Parse(string text) extension method to ISyntaxLanguage for the upcoming 2011.1 version where it will do exactly what you are looking for. It will use the language's registered IParser, and will synchronously parse a text string to return the resulting IParseData.

The ActiproSoftware.Text.Parsing.Implementation.ParseRequest class implements IParseRequest and is what we use for our extension method.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.