Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixed some more issues in the ANTLR3 parser (97 of 1036 testcases f…
…ailing now) - Still needs to be able to work as string parser (CORBA communication, etc) - Needs to be checked for performance issues (loadFile() is faster, but instantiateModel() is slower when working on the generated data structures) - Needs to have two (or three) different lexers (for Modelica, MetaModelica, maybe flat Modelica modes) - Currently, there are some special macros for MetaModelica stuff, but these are ugly - Moved around in the testsuite: created a parser library strictly for testing lexing/parsing/unparsing - One of the new testcases does not work with the ANTLR2 parser, because it can't switch between MetaModelica and Modelica mode git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@5999 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
- Loading branch information
Showing
6 changed files
with
348 additions
and
607 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* This file is part of OpenModelica. | ||
* | ||
* Copyright (c) 1998-2010, Linköpings University, | ||
* Department of Computer and Information Science, | ||
* SE-58183 Linköping, Sweden. | ||
* | ||
* All rights reserved. | ||
* | ||
* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF THIS OSMC PUBLIC | ||
* LICENSE (OSMC-PL). ANY USE, REPRODUCTION OR DISTRIBUTION OF | ||
* THIS PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THE OSMC | ||
* PUBLIC LICENSE. | ||
* | ||
* The OpenModelica software and the Open Source Modelica | ||
* Consortium (OSMC) Public License (OSMC-PL) are obtained | ||
* from Linköpings University, either from the above address, | ||
* from the URL: http://www.ida.liu.se/projects/OpenModelica | ||
* and in the OpenModelica distribution. | ||
* | ||
* This program is distributed WITHOUT ANY WARRANTY; without | ||
* even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH | ||
* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS | ||
* OF OSMC-PL. | ||
* | ||
* See the full OSMC Public License conditions for more details. | ||
* | ||
*/ | ||
|
||
#ifndef __RTOPTS_H | ||
#define __RTOPTS_H | ||
|
||
int check_debug_flag(char const* strdata); | ||
int accept_meta_modelica_grammar(void); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* This file is part of OpenModelica. | ||
* | ||
* Copyright (c) 1998-CurrentYear, Linkoping University, | ||
* Department of Computer and Information Science, | ||
* SE-58183 Linkoping, Sweden. | ||
* | ||
* All rights reserved. | ||
* | ||
* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 | ||
* AND THIS OSMC PUBLIC LICENSE (OSMC-PL). | ||
* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES RECIPIENT'S | ||
* ACCEPTANCE OF THE OSMC PUBLIC LICENSE. | ||
* | ||
* The OpenModelica software and the Open Source Modelica | ||
* Consortium (OSMC) Public License (OSMC-PL) are obtained | ||
* from Linkoping University, either from the above address, | ||
* from the URLs: http://www.ida.liu.se/projects/OpenModelica or | ||
* http://www.openmodelica.org, and in the OpenModelica distribution. | ||
* GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html. | ||
* | ||
* This program is distributed WITHOUT ANY WARRANTY; without | ||
* even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH | ||
* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS | ||
* OF OSMC-PL. | ||
* | ||
* See the full OSMC Public License conditions for more details. | ||
* | ||
*/ | ||
|
||
#ifndef MODELICA_PARSER_COMMON_H | ||
#define MODELICA_PARSER_COMMON_H | ||
|
||
typedef unsigned char bool; | ||
extern int ModelicaParser_flags; | ||
extern void *ModelicaParser_filename_RML; | ||
extern const char *ModelicaParser_filename_C; | ||
|
||
#define PARSE_MODELICA 0 | ||
#define PARSE_FLAT 1<<0 | ||
#define PARSE_META_MODELICA 1<<1 | ||
#define PARSE_EXPRESSION 1<<2 | ||
#define PARSE_CODE_EXPRESSION 1<<3 | ||
#define metamodelica_enabled(void) (ModelicaParser_flags&PARSE_META_MODELICA) | ||
#define code_expressions_enabled(void) (ModelicaParser_flags&PARSE_CODE_EXPRESSION) | ||
|
||
#endif |
Oops, something went wrong.