[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Incremental tree construction



I want to build pieces of trees in a bottom up manner, i.e., I want to
create and devellop trees with an arbitrary operator as root. In order
to do that, I replaced the ctedit's {variable}:root by a metavariable
that I handcrafted with the following function:

(de :set-root-to-every (ctedit)
  ;; Set the root tree of the curent ctedit's varible to a newly
  ;; created EVERY metavariable tree. 
  (let* ((variable  ({ctedit}:variable ctedit))
	 (root      ({variable}:root variable))
	 (formalism ({tree}:formalism root))
	 (every     ({formalism}:tree formalism 'EVERY {sublist})))

    ;; replace the root tree by a new EVERY metavariable tree
    ({variable}:change variable root every)

    ))

Now I can edit any kind of tree, but the "Edit" operation (called on
the whole tree) isn't able to calculate the entry point for the
re-parsing. What am I missing about "correct trees" in a ctedit?


	Guido