CoCoA:Grammar/Program: Difference between revisions

From ApCoCoAWiki
Dheldt (talk | contribs)
m CoCoA5Client:Grammar/Program moved to CoCoA:Grammar/Program: tidying up the wiki...
Dheldt (talk | contribs)
tidying up the wiki...
 
Line 11: Line 11:


It also defines a ''$user'' package in which all the [[COMMAND]]s will be executed
It also defines a ''$user'' package in which all the [[COMMAND]]s will be executed
[[Category:CoCoA5Client]]

Latest revision as of 17:40, 20 October 2007

Program

Syntax

PROGRAM ::= COMMAND | Λ

Static

A PROGRAM is statically correct as long as all its commands are correct in the global environment defined by the PROGRAM itself.

Run-time

A CoCoA5 PROGRAM is a (possibly empty) list of commands. A PROGRAM defines a global scope environment and loads all the packages from the cocoa/packages/ directory (no recursion on the filesystem!).

It also defines a $user package in which all the COMMANDs will be executed