Xtext Lexer and Parser [message #1786605] |
Tue, 08 May 2018 09:54 |
Virag Purnam Messages: 142 Registered: June 2014 |
Senior Member |
|
|
Hello,
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 ){
System.out.println("Virag");
method();
}
public static method(){
System.out.println("Purnam");
}
}
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 ){
System.out.println("Virag");
System.out.println("Purnam");
}
}
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
|
|
|
Powered by
FUDForum. Page generated in 0.03484 seconds