How to build a code editor/analyser?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Tomasz_Jastrzebski
Posted On:   Tuesday, September 16, 2008 05:20 PM

Hello, I already know how to create a simple parser, how to generate AST trees and so, but what I am looking for is some good idea(s) on how to put it all together to build a simple code editor/analyzer. I did some tests and proof of concepts, but I am still unhappy with my design. What I am looking for is some efficient data structure which could be: 1. created with ANTLR and used for both 2. dynamic syntax recognition (e.g. to color keywords and literals) and 3. grammar analysis (e.g. to list variables and find duplicate declarations) I mean, kind of functionality provided by ANTLR WORKS. Are there any good examples, desi   More>>

Hello,



I already know how to create a simple parser, how to generate AST trees and so, but what I am looking for is some good idea(s) on how to put it all together to build a simple code editor/analyzer.

I did some tests and proof of concepts, but I am still unhappy with my design.



What I am looking for is some efficient data structure which could be:

1. created with ANTLR and used for both

2. dynamic syntax recognition (e.g. to color keywords and literals) and

3. grammar analysis (e.g. to list variables and find duplicate declarations)



I mean, kind of functionality provided by ANTLR WORKS.



Are there any good examples, design patterns or best practices available?



Eventually, my small test project may evolve to something more significant, so I am not just trying to get something working, I am trying to develop a robust yet flexible design.



Thank you for any hints.



Tomasz

   <<Less
About | Sitemap | Contact