The Source Code

Internal functions

These functions help to parse source files.

Extract the name and path of a file, from an include statement.

text getIncluded(text, int)

Parse a source file for include statements. Assign some array for list of file and their state (already compiled or not).

number parseFile(text)

Remove compiled file from the list.

array removeCompiled(array)

Main source

Verify if files exist. Verify the XML document for bad tag names.

  int verifyFiles(text dir)
  void testConformity()

Get content of a tag, usually a list of files. Or create directly a list of file with createlist. GetTagContent return the content into an array.

  text getContent(text)
  array getTagContent(text)
  array createList(xelement)

Add program into the list of command. Add an internal command with makeInternalCommand, and an external command with makeExternalProgram.

void addProgram(text prog)
void makeInternalCommand(xelement)
void makeExternalProgram(xelement)

Replace a variable name in a command by its content.

void expandVariable(text)

Convert a tag to command. ParseTags processes the whole XML document.

void parseOneTag(text)
void parseTags()

Parse the whole tree and build a command when the tag is a terminal.

void buildCommands(text)
  

Manage dates according to the binary executable to build and its last version.

void processBinary(text)
  

Analyze the XML document and evaluates the top action, the one that is not called by another one.

void getUpper()
  

Execute all actions in sequence, from the built lists.

  void executeCommands()

Add an action to the array list, from the file sub fields not processed for now.

void addAction()

Main function.

int main(int argc, array argv)

Tools

Some general-purpose routines are included int the tools.sol file.

For a list of files, usually source files, change the extension, usually make them object files.

  array, text changeExtensions(array, text)

Put a list of files from a tag, into an array, change the extension if required.

  array contentToArray(text, text)

Extract the name of a variable, prefixed by $ or *, from a command string.

  text, int, text extractName(text, int)