Skip to content

Commit

Permalink
PDEModelica pdemodelica_enabled()
Browse files Browse the repository at this point in the history
new macro to enable pdemodelica grammar
  • Loading branch information
Jan Šilar authored and OpenModelica-Hudson committed Feb 10, 2016
1 parent 186d401 commit 0ca507a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Parser/ModelicaParserCommon.h
Expand Up @@ -78,9 +78,11 @@ typedef struct antlr_members_struct {
#define PARSE_OPTIMICA 1<<5
#define PARSE_PATH 1<<6
#define PARSE_CREF 1<<7
#define PARSE_PDEMODELICA 1<<8
#define metamodelica_enabled() (ModelicaParser_flags&PARSE_META_MODELICA)
#define parmodelica_enabled() (ModelicaParser_flags&PARSE_PARMODELICA)
#define optimica_enabled() (ModelicaParser_flags&PARSE_OPTIMICA)
#define pdemodelica_enabled() (ModelicaParser_flags&PARSE_PDEMODELICA)
#define code_expressions_enabled() (ModelicaParser_flags&PARSE_CODE_EXPRESSION)
#define flat_modelica_enabled() (ModelicaParser_flags&PARSE_FLAT)
#define parse_expression_enabled() (ModelicaParser_flags&PARSE_EXPRESSION)
Expand Down
1 change: 1 addition & 0 deletions Parser/Parser_omc.c
Expand Up @@ -56,6 +56,7 @@ void* ParserExt_parseexp(const char* filename, const char* infoname, int accepte
if(acceptedGrammar == 2) flags |= PARSE_META_MODELICA;
else if(acceptedGrammar == 3) flags |= PARSE_PARMODELICA;
else if(acceptedGrammar == 4) flags |= PARSE_OPTIMICA;
else if(acceptedGrammar == 5) flags |= PARSE_PDEMODELICA;

void *res = parseFile(filename, infoname, flags, "UTF-8", langStd, runningTestsuite);
if (res == NULL)
Expand Down

0 comments on commit 0ca507a

Please sign in to comment.