.NET Framework Bookmark and Share   
 index > Microsoft Codename 'Oslo' > ParseToken "end" SourcePoint
 

ParseToken "end" SourcePoint

Hello, our company is currently developing a WPF version of our SyntaxEditor code editing control and we're working on adding functionality that would allow our customers to integrate an MGrammar-generated DynamicParser with our editor in a few lines of code, thereby providing syntax highlighting and other features. After doing some work on this integration, I have several questions that I'm posting, each in a separate thread.

Question #4:

In writing a lexical parser that integrates our SyntaxEditor control with a DynamicParser, we found that we could really use the "end" SourcePoint of a token.

The ParseToken class contains an "end" SourcePoint field however it seems there is no way to access it externally via a property. Although we have a workaround for this, we feel we could possibly increase parsing speed if an "End" read-only property was added to ParseToken that returned this SourcePoint. Thanks!
actiprosoftware.com - WPF ribbon, docking/mdi, propertygrid, navbar, explorerbar, breadcrumb, gauge, bar code, wizard controls & much more
Bill Henning
The API has been changing, so I may be looking at the wrong version of the code, but it looks like the end SourcePoint field is used to create the Span property which is public. Can't you use Span.End in this case, or am I missing something?

Paul [MSFT]
Paul Vick MSFT
  • Proposed As Answer byPaul VickMSFTTuesday, March 31, 2009 11:07 PM
  • Marked As Answer byBill Henning Wednesday, April 01, 2009 1:34 AM
  •  
Paul Vick
Again, I'll get some responses for you (I'm replying to each of these posts, by the way,because it helps our monitoring system.)

.Kraig
Kraig Brockschmidt
The API has been changing, so I may be looking at the wrong version of the code, but it looks like the end SourcePoint field is used to create the Span property which is public. Can't you use Span.End in this case, or am I missing something?

Paul [MSFT]
Paul Vick MSFT
  • Proposed As Answer byPaul VickMSFTTuesday, March 31, 2009 11:07 PM
  • Marked As Answer byBill Henning Wednesday, April 01, 2009 1:34 AM
  •  
Paul Vick
Good call, I was looking on ParseToken and didn't notice that property on the ref.
actiprosoftware.com - WPF ribbon, docking/mdi, propertygrid, navbar, explorerbar, breadcrumb, gauge, bar code, wizard controls & much more
Bill Henning

You can use google to search for other answers

Custom Search

More Threads

• Function extensibility in M
• MGraph: References
• Newline in Text Input causes problem with Quadrant Add Item
• Using an MGrammar generated parser for syntax highlighting
• Tab size?
• Oslo May 2009 CTP Quadrant Diagam Viewer presents Steps in Reverse Order
• How can one preserve comments in MGrammar?
• Oslo and Visual Studio Team Suite 2010
• DynamicParser.LoadFromResource() and MgCompile MSBuild Task.
• Inconsistent list projection