EDMcompilerProject
An EDMcompilerProject consists of one project file, EDMcompilerProjectFile, and one to any number of EDMexpressX source code files.
NOTE: The EDMcompilerProject concept is not valid for EXPRESS schemata
The EDMcompilerProjectFile is an ASCII text file with two possible declarations:
- SourceFilesSearchPaths declaration:
To define the "search paths" for the source files. The order of the FilePaths in the SourceFilesSearchPaths declarations defines the order of the "file directories to be searched" for the specified source files. The current directory, i.e. the directory of the actual EDMcompilerProjectFile will always be searched last in the search order. This directory can be moved forward in the search order by specifying it in a SourceFilesSearchPaths declaration.
SourceFilesSearchPaths declaration example:
SOURCE_FILES_PATHS "c:/EDMdevelopersStudio/MappingProject/" -- absolute path to source files "./" -- path to source files in directory where the file is stored "./../../utilities/" -- relative path to source files (taking into account known bug in its parsing) END_SOURCE_FILES_PATHS;
The SourceFilesSearchPaths declaration starts with the "SOURCE_FILES_PATHS" token and end with the "END_SOURCE_FILES_PATHS" token. There can be zero to any numbers of SourceFilesSearchPaths declarations in an EDMcompilerProjectFile. Hence, this declaration is optional; there may be zero to any number of FilePath definitions in one SourceFilesSearchPaths declaration. Each FilePath must be embedded in double quotes to enable all legal file path names. There may be any number of FilePath definitions on each line.The Express comments "--" (end-of-line) and "(* *)" (multi lines) are supported anywhere in the EDMcompilerProjectFile. However, nested multiline comments are not supported.
- SourceFiles declarations:
To define the source files that constitute the actual (LongForm) EDMexpressX schema and the order these source files will be concatenated.
SourceFiles declaration example:
SOURCE_FILES -- main file (should be placed on one of the path listed above in SOURCE_FILES_PATHS section) "ESS_to_DEX11_multiFiles.xpx" -- additional files (will be added to main) "identification_wrapper_functions.inn" "product_property_wrapper_functions.inn" "indep_prop_wrapper_functions.inn" "process_property_wrapper_functions.inn" "ass_time_wrapper_functions.inn" -- additional files in subfolder templateAPI "templateAPI/utils.inn" "templateAPI/assigning_scheme_subject.inn" "templateAPI/representing_person_in_organization.inn" END_SOURCE_FILES;
The SourceFiles declaration starts with the "SOURCE_FILES" token and end with the "END_SOURCE_FILES" token. A SourceFile definition must be embedded in double quotes to enable all legal file names. There may be any number of SourceFile definitions on each line. There can be zero to any number of SourceFile definitions in each SourceFiles declaration. An EDMcompilerProjectFile must at least contain one SourceFiles declaration with a minimum of one SourceFile definition. Normally the first SourceFile (main file) should be schema type dependent, i.e.,xpx, qex or .rex for EDMmappingSchema, EDMquerySchema, and EDMruleSchema respectively. The contents of a source file can be “any†text, that will be copied (concatenated) into the actual LongForm schema. The main file will include the End-Of-Schema token (END_QUERY_SCHEMA, END_SCHEMA_MAP, END_RULE_SCHEMA). Hence, the actual End-Of-Schema token will be search for in this main file, when found it will be embedded in comments “(*END_SCHEMA_MAP;*)†and the actual End-Of-Schema token will be appended to the LongForm after the very last source file.
Include directive:
An Include directive is implemented with the following format:
--#INCLUDE "fileName"
The fileName must be embedded in double quotes to enable all legal file names. The INCLUDE directive can be placed anywhere outside a comment in any source files. There can be any number of INCLUDE directives in a source file and INCLUDE files can be nested to any depths. By default, each beginning and end of a source file in the resulting LongForm will be marked. There is an option NO_SHORT_FILE_NAME_IN_LONG_FORM to avoid this marking in the LongForm.The options ADD_SHORT_FORM_LINE_NUMBERS and ADD_LONG_FORM_LINE_NUMBERS can be used to add to the LongForm the ShortForm and/or the LongForm line numbers. These line numbers will be embedded in comments to avoid compilation errors. All tokens (SOURCE_FILES_PATHS, END_SOURCE_FILES_PATHS, SOURCE_FILES, END_SOURCE_FILES, --#INCLUDE) are case insensitive. The default file extension for an EDMcompilerProject file is "xpxprj",".qexprj", ".rexprj" for the various EDMcompilerProject types (mapping, query, rule).
The EDMsupervisor has been enhanced to search for files with such extensions when appropriate. Hence all commands (remote or local) for defining mapping schema will look for files with extension "xpx" and ".xpxprj", and similar concepts for defining query schema and rule schema. The proposed file extension ".xpxc" (Express-X code) is recommended for the ShortForm files.All EDMinterface methods for defining an EDMexpressX schema will by default search the actual specified source file to decide if it is a EDMexpressX source file or an EDMcompilerProject file, i.e., when at least one EDMcompilerProject token is found, the actual file will be classified as an EDMcompilerProjectFile, and the producing of the LongForm will be performed and the resulting LongForm will be sent to the compiler. When the EDMexpressXcompiler is invoked from an EDMexpressXmethod on an EDMapplicationServer, the processing of an EDMcompilerProject cannot be performed. All other invocations of the EDMexpressXcompiler can process an EDMcompilerProject. If you want to compile an EDMexpressXschema from an EDMexpressXmethod running in an EDMapplicationServer, you can use the EDMinterfaceMethod edmiBuildExpressXlongForm() and then send the resulting LongForm schema to the actual EDMexpressXmethod running in an EDMapplicationServer and invoke the EDMexpressXcompiler with this LongForm schema .
NOTE: The processing of the INCLUDE directives will only be performed in the context of an EDMcompilerProject
The resulting compilation diagnostics will be enhanced with the following:
a) A list of all ShortForm files constituting the LongForm, will be listed in the order of the occurrences in the LongForm.
b) Each diagnostic message will list the line number in the LongForm and the line number in the actual ShortForm file.
The EDMcompilerProject should be integrated/used by the EDMdevelopersStudio (X-IDE) by implementing functionality to create/change/delete EDMcompilerProjects, GUI to drag&drop file-paths and files to the EDMcompilerProjectFile, and functionality to navigate from an EDMexpressXcompiler diagnostic message to the right line number in the actual source file. EDMsupervisor commands for creating EDMcompiler Project:
- Schemata>EXPRESS-X>MakeLongForm
- Schemata>RuleSchema>MakeLongForm
- Schemata>QuerySchema>MakeLongForm
- RemoteSystems>Express-xSchema>MakeLongForm
- RemoteSystems>RuleSchema>MakeLongForm
- RemoteSystems>QuerySchema>MakeLongForm
The following EDMsupervisor commands are enhanced with the options for "MakeExpressXlongForm" functionality:
- Schemata>EXPRESS-X>DefineSchema
- Schemats>RuleSchema>DefineSchema
- Schemata>QuerySchema>DefineSchema
- Schemata>QuerySchema>DefineSystemQueries
- RemoteSystems>Express-xSchema>Define
- RemoteSystems>RuleSchema>Define
- RemoteSystems>QuerySchema>Define
- RemoteSystems>QuerySchema>DefineSystemQueries