Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext Lexer and Parser(Xtext Lexer and Parser)
Xtext Lexer and Parser [message #1786605] Tue, 08 May 2018 09:54
Virag Purnam is currently offline Virag PurnamFriend
Messages: 55
Registered: June 2014

I am working to build an editor for one of the legacy language.
I got stuck at place where I need some help.
I am trying to explain my problem with java example.

Class Test {                                                           
           public static void main(String[] args ){ 
           public static method(){             

Now in the above example, I want to parse the main class and if any methods are called then that method content should be part of my main class code.
Expected content in document.
Class Test {                                                           
           public static void main(String[] args ){ 


I can achieve this in lexer, but after that I face problem is editor.
After parsing I get the proper content, but in next iteration it is creating problem.
As character positions got changed, on edit it enters/delete characters from wrong text region.
How to fix this in editor, so that edit works fine.
How can I fix this? Any help will be much appreciated.

Thanks and regards,
Virag Purnam
Previous Topic:DSL template functions (specialization)
Next Topic:How to let Tycho resolve dependencies in xtext-maven-plugin?
Goto Forum:

Current Time: Fri Sep 21 03:01:40 GMT 2018

Powered by FUDForum. Page generated in 0.01610 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top