You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be possible to parse a string and know for each terminal and
non-terminal which substring it matched. This will be useful for
edit-and-verify reloaded.
Original issue reported on code.google.com by radugrig...@gmail.com on 31 Jul 2009 at 7:05
Here is a possible design to improve edit and verify.
Some AST nodes have children and some do not. Some AST nodes are produced
during
parsing and some during transforming. AST nodes...
* without children and created by the parser have a location computed by the parser;
* with children have a location that is computed from their children locations;
* without children and created by a transformer have a location that is computed
from the locations of their 'motivating nodes'.
AST nodes should not be distinguished on the basis of their location. In
particular,
if whitespace is modified in the input file, then the parser must reuse the
*same*
AST and update the location information. If the location information is kept
into an
augmented binary tree then it is updated in Theta(lg n) time.
If the derived location information is cached, then some of the cached values
must be
removed when the raw location information changes. It is probably simpler and
just as
fast to recompute the derived location information every time.
Original comment by radugrig...@gmail.com on 21 Feb 2010 at 8:44
Original issue reported on code.google.com by
radugrig...@gmail.com
on 31 Jul 2009 at 7:05The text was updated successfully, but these errors were encountered: