Parser. How to interrupt the flow.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   david_land
Posted On:   Friday, January 21, 2005 03:51 AM

My situation. Reading text in from an editor. Parser is checking each line as it is entered. If programmer goes back and changes an already parsed part of the text block How can I break off parsing and start again at the new point of the tree? I dont really want the parser to have to go back and start again at the begining. I thought of a couple of methods One would be to store sub trees and parse each sub tree seperately. The problem I have is How can I get hold of the AST (sub tree) the Parser produces before it finishes. Or if I can pinpoint by Column number and line number the exact token point from which I want to parse from. How to interrrupt the flow of the parser and tell   More>>

My situation.


Reading text in from an editor.
Parser is checking each line as it is entered.
If programmer goes back and changes an already parsed part of the text block How can I break off parsing and start again at the new point of the tree? I dont really want the parser to have to go back and start again at the begining.


I thought of a couple of methods
One would be to store sub trees and parse each sub tree seperately. The problem I have is How can I get hold of the AST (sub tree) the Parser produces before it finishes.


Or if I can pinpoint by Column number and line number the exact token point from which I want to parse from. How to interrrupt the flow of the parser and tell it to go back and parse from that point. With out storing pointers to each sub tree.

   <<Less
About | Sitemap | Contact