Jump to content

Pan (programming language)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Jrha (talk | contribs) at 12:15, 21 September 2011. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The pan configuration language allows the definition of machine configuration information and an associated schema with a simple, human-accessible syntax. A pan language compiler transforms the configuration information contained within a set of pan templates to a machine-friendly XML format.

The pan language is used within the Quattor toolkit to define the desired configuration for one or more machines. The language is primarily a declarative language where elements in a hierarchical tree are set to particular values. The pan syntax is human-friendly and fairly simple, yet allows system administrators to simultaneously set configuration values, define an overall configuration schema, and validate the final configuration against the schema.

The compiler panc serves as the defacto reference implementation of the language and is implemented in Java, at present it is not possible to execute the compiler with OpenJDK.

A configuration is defined by a set of files, called templates, written in the pan language. These templates define simultaneously the configuration parameters, the configuration schema, and validation functions. Each template is named and is contained in a file having the same name. The syntax of a template file is simple: [ object | declaration | unique | structure ] template template-name; [ statement ... ] These files may contain comments that start with the hash sign ('#') and terminate with the next new line or end of file.