libutap  0.93
Uppaal Timed Automata Parser
xmlreader.cpp File Reference
#include "libparser.h"
#include "utap/position.h"
#include <libxml/xmlreader.h>
#include <libxml/xpath.h>
#include <libxml/parser.h>
#include <libxml/xmlstring.h>
#include <stdexcept>
#include <cstdarg>
#include <cctype>
#include <cstring>
#include <cassert>
#include <algorithm>
#include <list>
#include <vector>
#include <map>
#include <sstream>
#include "tags.cc"
Include dependency graph for xmlreader.cpp:

Go to the source code of this file.

Namespaces

 UTAP
 

Enumerations

enum  UTAP::tag_t {
  UTAP::TAG_NTA, UTAP::TAG_IMPORTS, UTAP::TAG_DECLARATION, UTAP::TAG_TEMPLATE,
  UTAP::TAG_INSTANTIATION, UTAP::TAG_SYSTEM, UTAP::TAG_NAME, UTAP::TAG_PARAMETER,
  UTAP::TAG_LOCATION, UTAP::TAG_INIT, UTAP::TAG_TRANSITION, UTAP::TAG_URGENT,
  UTAP::TAG_COMMITTED, UTAP::TAG_BRANCHPOINT, UTAP::TAG_SOURCE, UTAP::TAG_TARGET,
  UTAP::TAG_LABEL, UTAP::TAG_NAIL, UTAP::TAG_NONE, UTAP::TAG_PROJECT,
  UTAP::TAG_LSC, UTAP::TAG_TYPE, UTAP::TAG_MODE, UTAP::TAG_ROLE,
  UTAP::TAG_YLOCCOORD, UTAP::TAG_LSCLOCATION, UTAP::TAG_PRECHART, UTAP::TAG_INSTANCE,
  UTAP::TAG_TEMPERATURE, UTAP::TAG_MESSAGE, UTAP::TAG_CONDITION, UTAP::TAG_UPDATE,
  UTAP::TAG_ANCHOR, UTAP::TAG_SBML, UTAP::TAG_QUERIES, UTAP::TAG_QUERY,
  UTAP::TAG_FORMULA, UTAP::TAG_COMMENT
}
 Enumeration type for tags. More...
 

Functions

static bool UTAP::isempty (string str)
 Returns TRUE if string is zero length or contains only white spaces otherwise FALSE. More...
 
static bool UTAP::isAlpha (unsigned char c)
 
static bool UTAP::isIdChr (unsigned char c)
 
static string UTAP::symbol (const char *str)
 Extracts the alpha-numerical symbol used for variable/type identifiers. More...
 
int32_t parseXMLFile (const char *filename, ParserBuilder *pb, bool newxta)
 Parse the file with the given name assuming it is in the XML format, reporting the system to the given implementation of the the ParserBuilder interface and reporting errors to the ErrorHandler. More...
 
int32_t parseXMLBuffer (const char *buffer, ParserBuilder *pb, bool newxta)
 Parse a buffer in the XML format, reporting the system to the given implementation of the the ParserBuilder interface and reporting errors to the ErrorHandler. More...
 
string getXMLElement (xmlDocPtr docPtr, const string &path)
 Get the contents of the XML element with the specified path. More...
 
string getXMLElement (const char *xmlBuffer, const string &path)
 Get the contents of the XML element with the specified path. More...
 

Function Documentation

◆ getXMLElement() [1/2]

string getXMLElement ( xmlDocPtr  docPtr,
const string &  path 
)

Get the contents of the XML element with the specified path.

Parameters
xmlDocPtr- The XML document.
pos- The position path
Returns
res - The contents

Definition at line 1353 of file xmlreader.cpp.

Referenced by getXMLElement().

Here is the caller graph for this function:

◆ getXMLElement() [2/2]

string getXMLElement ( const char *  xmlBuffer,
const string &  path 
)

Get the contents of the XML element with the specified path.

Parameters
xmlBuffer- The data in the xml buffer
pos- The position path
Returns
res - The contents

Definition at line 1390 of file xmlreader.cpp.

References getXMLElement().

Here is the call graph for this function:

◆ parseXMLBuffer()

int32_t parseXMLBuffer ( const char *  buffer,
UTAP::ParserBuilder ,
bool  newxta 
)

Parse a buffer in the XML format, reporting the system to the given implementation of the the ParserBuilder interface and reporting errors to the ErrorHandler.

If newxta is true, then the 4.x syntax is used; otherwise the 3.x syntax is used. On success, this function returns with a positive value.

Definition at line 1336 of file xmlreader.cpp.

Referenced by UTAP::ParserBuilder::~ParserBuilder().

Here is the caller graph for this function:

◆ parseXMLFile()

int32_t parseXMLFile ( const char *  filename,
UTAP::ParserBuilder ,
bool  newxta 
)

Parse the file with the given name assuming it is in the XML format, reporting the system to the given implementation of the the ParserBuilder interface and reporting errors to the ErrorHandler.

If newxta is true, then the 4.x syntax is used; otherwise the 3.x syntax is used. On success, this function returns with a positive value.

Definition at line 1325 of file xmlreader.cpp.

Referenced by UTAP::ParserBuilder::~ParserBuilder().

Here is the caller graph for this function: