![]() |
|
Navigation |
Synopsis Yield the string of characters that form the leafs of the given parse tree.
Function
str unparse(Tree tree)
Usage
import ParseTree;
Description
unparse is the inverse function of parse, i.e., for every syntactically correct string TXT of
type S , the following holds:
unparse(parse(#S, TXT)) == TXT
Examples
rascal>import demo::lang::Exp::Concrete::NoLayout::Syntax; ok rascal>import ParseTree; okFirst parse an expression, this results in a parse tree. Then unparse this parse tree: rascal>unparse(parse(#Exp, "2+3"));
str: "2+3"
![]() |