Skip to content

Commit

Permalink
- got rid of an left out debug print in Compiler/runtime/errorext.cpp
Browse files Browse the repository at this point in the history
- give more memory to ANTLR3 by default in Parser/antlr-3.2/runtime/C/include/antlr3defs.h
- use NULL instead of 0 in Parser/parse.c

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@6090 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Sep 10, 2010
1 parent 1264120 commit f2e35c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Compiler/runtime/errorext.cpp
Expand Up @@ -234,7 +234,7 @@ extern "C"
printf("ERROREXT: caling rollback with id: %s on empty checkpoint stack\n",id);
exit(-1);
}
fprintf(stderr, "Returning %s\n", res.c_str());
// fprintf(stderr, "Returning %s\n", res.c_str());
return mk_scon((char*)res.c_str());
}

Expand Down
4 changes: 2 additions & 2 deletions Parser/parse.c
Expand Up @@ -302,7 +302,7 @@ void* parseStream(pANTLR3_INPUT_STREAM input)
psr->pParser->rec->recoverFromMismatchedToken = noRecoverFromMismatchedToken;
// psr->pParser->rec->recoverFromMismatchedSet = noRecoverFromMismatchedSet;

void* res;
void* res = NULL;
/* if (ModelicaParser_flags & PARSE_FLAT)
res = psr->flat_class(psr);
else */ if (ModelicaParser_flags & PARSE_EXPRESSION)
Expand All @@ -311,7 +311,7 @@ void* parseStream(pANTLR3_INPUT_STREAM input)
res = psr->stored_definition(psr);

if (lexerFailed || pLexer->rec->state->failed || psr->pParser->rec->state->failed) // Some parts of the AST are NULL if errors are used...
res = 0;
res = NULL;
psr->free(psr);
psr = NULL;
tstream->free(tstream);
Expand Down

0 comments on commit f2e35c7

Please sign in to comment.