#include <application.hh>
Inheritance diagram for TApplication:
Public Methods | |
TApplication (const char *pkcAPPLICATION_NAME, const char *pkcAPPLICATION_RELEASE, int iPARAMETER_COUNT, const char **ppkcPARAMETERS) | |
~TApplication (void) | |
Destroys the instance. | |
void | bindCodeParameter (const TString &rkyVARIABLE, const TString &rkyVALUE) |
TString | collapseStringLiteral (const char *pkcSOURCE_TEXT) |
void | handleTarget (const TString &rkySOURCE_TEXT) |
int | identifyToken (const char *pkcSOURCE_TEXT, unsigned int uiPERIOD_COUNT=0) |
void | initCodeParameters (void) |
void | initialize (void) |
void | loadCodeGenerator (const TString &rkyTARGET) |
void | outputClauseCode (const char *pkcINSTRUCTION_NAME, const char *pkcCLAUSE_NAME="body") |
void | outputCode (const char *pkccSOURCE_TEXT, size_t zLENGTH=0) |
void | outputCode (const TString &rkySOURCE_TEXT) |
void | postAppend (const TString &rkySOURCE_TEXT) |
void | preAppend (const TString &rkySOURCE_TEXT) |
void | pushTokenName (const char *pkcLAST_TOKEN) |
void | pushTokenName (const TString &kyLAST_TOKEN) |
void | setCompilationFailed (void) |
Sets the compilation status to failed. | |
int | splitToken (unsigned int uiPERIOD_COUNT) throw (TFatalException) |
int | start (void) |
bool | compilationFailed (void) const |
Gets the compilation status. | |
void | createComplementaryFiles (void) const |
TString | debugDescription (void) const |
Gets debug description, according with debug level. | |
TString | getClauseCode (const char *pkcINSTRUCTION_NAME, const char *pkcCLAUSE_NAME="body") |
size_t | getEmbeddedLineNumber (void) const |
TString | getLineDirective (unsigned int uiLINE_NUMBER=0) const |
void | handleCompilerError (const char *pkcMESSAGE) |
bool | isReusingTarget (void) const |
void | printDebugInformation (void) const |
Writes to standard error a debug description, according with debug level. | |
TString | programFileName (void) const |
void | require (long int liINVARIANT_IDENTIFIER...) const |
bool | useLineDirective (void) const |
Definition at line 51 of file application.hh.
|
Builds a new instance.
Definition at line 50 of file application.cc. |
|
Binds code parameter rktVARIABLE with value rkyVALUE.
Definition at line 206 of file application.hh. References mpcl::text::TString. |
|
Collapses multiple string_literal parts into an only one.
Definition at line 335 of file application.cc. |
|
Create complementary files (if any). These files correspond with all variables named as "file::*". Definition at line 1176 of file application.cc. References mpcl::text::TString. Referenced by start(). |
|
Gets clause body for clause pkcCLAUSE_NAME in instruction pkcINSTRUCTION_NAME.
Definition at line 1232 of file application.cc. References programFileName(), and mpcl::text::TString. Referenced by outputClauseCode(). |
|
Gets line directive for in line uiLINE_NUMBER. If uiLINE_NUMBER isn't passed, then it uses the line number of the last embedded introducer.
Definition at line 381 of file application.hh. |
|
Gets line directive for in line uiLINE_NUMBER. If uiLINE_NUMBER isn't passed, then it uses the line number of the last embedded introducer.
Definition at line 1305 of file application.cc. References mpcl::text::Format(). |
|
Handles syntactic errors. Throws an TErrorException exception with pkcMESSAGE message.
Definition at line 1313 of file application.cc. References mpcl::text::Format(), setCompilationFailed(), and mpcl::text::TString. |
|
Extracts target from EMBEDDED_SQL_BEGIN and sets the proper CDML target.
Referenced by start(). |
|
Searches reserved-word map for the token bound to pkcSOURCE_TEXT, and if it is found, then the token is returned, else token IDENTIFIER_BODY is returned. But, if uiPERIOD_COUNT is not zero, then it calls splitToken() cause it is multi-identifier token.
Definition at line 572 of file application.cc. References printDebugInformation(), pushTokenName(), splitToken(), and mpcl::text::TString. |
|
Initializes tCodeParametersMap with one value. That value is "_target", that contains the current target value. Definition at line 626 of file application.cc. |
|
Initialize from parameters. Implements mpcl::TAbstractApplication. Definition at line 650 of file application.cc. References mpcl::invariant::IVerifier< TStackValue * >::addConformanceLevel(), and mpcl::invariant::IVerifier< TStackValue * >::clearConformanceLevelSet(). |
|
Returns true if current target has been used before.
Definition at line 1328 of file application.cc. |
|
Loads the code-generator with the proper CDML target file. It doesn't load it, if it has been loaded before.
Referenced by start(). |
|
Writes on output, the code corresponding to instruction pkcINSTRUCTION_NAME and clause pkcCLAUSE_NAME.
Definition at line 261 of file application.hh. References getClauseCode(). |
|
Appends on output, the text in rkySOURCE_TEXT.
Definition at line 277 of file application.hh. References mpcl::text::TString. |
|
Appends on output, zLENGTH characters from pkcSOURCE_TEXT.
Definition at line 832 of file application.cc. |
|
Writes at the end of output, the text rkySOURCE_TEXT.
Definition at line 286 of file application.hh. References mpcl::text::TString. |
|
Writes at the begining of output, the text rkySOURCE_TEXT.
Definition at line 295 of file application.hh. References mpcl::text::TString. |
|
Returns compiler program file name.
Implements mpcl::TAbstractApplication. Definition at line 422 of file application.hh. References mpcl::text::TString. Referenced by getClauseCode(). |
|
Sets the last read token from scanner.
Definition at line 313 of file application.hh. References mpcl::text::TString. |
|
Sets the last read token from scanner.
Definition at line 304 of file application.hh. Referenced by identifyToken(). |
|
Verifies that invariant corresponding to liINVARIANT_IDENTIFIER, is true. If not, then throws the corresponding exception.
Definition at line 1437 of file application.cc. |
|
Splits the token in yytext in, uiPERIOD_COUNT plus one, identifiers, and then, stored in the parser stack. It returns FOURTH_LEVEL_IDENTIFIER, THIRD_LEVEL_IDENTIFIER or SECOND_LEVEL_IDENTIFIER, corresponding to the number of periods inside the token.
Definition at line 847 of file application.cc. References mpcl::text::TString, and mpcl::text::Uppercase(). Referenced by identifyToken(). |
|
Opens files and runs the compiler.
Implements mpcl::TAbstractApplication. Definition at line 903 of file application.cc. References compilationFailed(), createComplementaryFiles(), mpcl::text::Format(), handleTarget(), loadCodeGenerator(), mpcl::TAbstractApplication::release(), and mpcl::text::TString. |
|
Returns true if compiler must use 'line' preprocessor directive. This depends on the language selected, because only C derived languages have this preprocessor directive.
Definition at line 442 of file application.hh. References mpcl::text::TString, and useLineDirective(). Referenced by useLineDirective(). |