Reading an Exp program

With a parser up and running, we may read an Exp program into a new ctview. We store example files in the directory contrib/Exp/examples. Resources determine what Centaur considers to be a valid suffix for a file containing a program in a given formalism. For Exp, we specify only one suffix, .Exp. This is specified in the file contrib/Exp/syntax/Exp.rdb.

Since we have not written a pretty printer for Exp, example trees are displayed using the default pretty printer, which shows the names and arities of operators and the values of atomic operators. A warning message in the Centaur main window tells us that the Centaur has not located the Exp-std pretty printer, which we define in the next section.


Tutorial