Skip to content

Commit

Permalink
- fixed a mistake in Absyn.EQ/ALG_FAILURE/EQUALITY, they should
Browse files Browse the repository at this point in the history
  contain EquationItem and AlgorithmItem as built by the parser
- got rid of function removal on loading as we can do it based 
  on build time: Ceval, ClassLoader, Interactive, Inst, Static
- beautifying dumping of MetaModelica code and handle also the
  equality and failure equations.
- remove the .sig and .srz files on clean
- fixed a bug with modifications merging (see Modification6.mo)
- System__hash improved plus now considering the entire string
  + RefinedSimpleCircuitValid.mo changes due to different hashing.
- more homogeneous function documentation strings here and there
- small changes to sendData, OMNotebook and ext(ernal plotter).


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@3766 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Dec 8, 2008
1 parent 2f4a21b commit 1d3bc6d
Show file tree
Hide file tree
Showing 20 changed files with 3,245 additions and 3,167 deletions.
4 changes: 2 additions & 2 deletions OMNotebook/3Dpkg/VisualizationWidget.cpp
Expand Up @@ -9,7 +9,7 @@ namespace IAEX {
this->setMinimumHeight(300);
this->setMinimumWidth(500);

QWidget *visframe = new QWidget();
QWidget *visframe = new QWidget(this);

visframe->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));

Expand Down Expand Up @@ -42,7 +42,7 @@ namespace IAEX {
connect(timer, SIGNAL(timeout()),
this, SLOT(nextFrame()));

QVBoxLayout *buttonlayout = new QVBoxLayout;
QVBoxLayout *buttonlayout = new QVBoxLayout(this);
buttonlayout->addWidget(playbutton);
buttonlayout->addWidget(stopbutton);
buttonlayout->addWidget(rewbutton);
Expand Down
80 changes: 40 additions & 40 deletions OMNotebook/NotebookParser/AntlrNotebookLexer.cpp
Expand Up @@ -356,7 +356,7 @@ void AntlrNotebookLexer::mRBRACK(bool _createToken) {
int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
_ttype = RBRACK;
ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;

try { // for error handling
match(']' /* charlit */ );
}
Expand All @@ -376,7 +376,7 @@ void AntlrNotebookLexer::mLBRACK(bool _createToken) {
int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
_ttype = LBRACK;
ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;

try { // for error handling
match('[' /* charlit */ );
}
Expand All @@ -396,7 +396,7 @@ void AntlrNotebookLexer::mRCURLY(bool _createToken) {
int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
_ttype = RCURLY;
ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;

try { // for error handling
match('}' /* charlit */ );
}
Expand All @@ -416,7 +416,7 @@ void AntlrNotebookLexer::mLCURLY(bool _createToken) {
int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
_ttype = LCURLY;
ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;

try { // for error handling
match('{' /* charlit */ );
}
Expand All @@ -436,7 +436,7 @@ void AntlrNotebookLexer::mCOMMA(bool _createToken) {
int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
_ttype = COMMA;
ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;

try { // for error handling
match(',' /* charlit */ );
}
Expand All @@ -456,7 +456,7 @@ void AntlrNotebookLexer::mTHICK(bool _createToken) {
int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
_ttype = THICK;
ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;

try { // for error handling
match('`' /* charlit */ );
}
Expand All @@ -476,7 +476,7 @@ void AntlrNotebookLexer::mCOMMENTSTART(bool _createToken) {
int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
_ttype = COMMENTSTART;
ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;

try { // for error handling
match("(*");
}
Expand All @@ -496,7 +496,7 @@ void AntlrNotebookLexer::mCOMMENTEND(bool _createToken) {
int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
_ttype = COMMENTEND;
ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;

try { // for error handling
match("*)");
}
Expand All @@ -516,7 +516,7 @@ void AntlrNotebookLexer::mNUMBER(bool _createToken) {
int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
_ttype = NUMBER;
ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;

try { // for error handling
{
switch ( LA(1)) {
Expand Down Expand Up @@ -556,7 +556,7 @@ void AntlrNotebookLexer::mNUMBER(bool _createToken) {
else {
if ( _cnt12>=1 ) { goto _loop12; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}

_cnt12++;
}
_loop12:;
Expand All @@ -573,23 +573,23 @@ void AntlrNotebookLexer::mNUMBER(bool _createToken) {
else {
if ( _cnt15>=1 ) { goto _loop15; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}

_cnt15++;
}
_loop15:;
} // ( ... )+
}
else {
}

}
{
if ((LA(1) == 0x45 /* 'E' */ || LA(1) == 0x60 /* '`' */ || LA(1) == 0x65 /* 'e' */ )) {
mEXP(false);
}
else {
}

}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
Expand All @@ -608,7 +608,7 @@ void AntlrNotebookLexer::mDIGIT(bool _createToken) {
int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
_ttype = DIGIT;
ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;

try { // for error handling
switch ( LA(1)) {
case 0x30 /* '0' */ :
Expand Down Expand Up @@ -662,7 +662,7 @@ void AntlrNotebookLexer::mEXP(bool _createToken) {
int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
_ttype = EXP;
ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;

try { // for error handling
switch ( LA(1)) {
case 0x45 /* 'E' */ :
Expand Down Expand Up @@ -699,15 +699,15 @@ void AntlrNotebookLexer::mEXP(bool _createToken) {
}
else {
}

}
{
if ((_tokenSet_0.member(LA(1)))) {
mNUMBER(false);
}
else {
}

}
}
break;
Expand All @@ -734,7 +734,7 @@ void AntlrNotebookLexer::mID(bool _createToken) {
int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
_ttype = ID;
ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;

try { // for error handling
{ // ( ... )+
int _cnt19=0;
Expand Down Expand Up @@ -826,7 +826,7 @@ void AntlrNotebookLexer::mQSTRING(bool _createToken) {
int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
_ttype = QSTRING;
ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;

try { // for error handling
match('\"' /* charlit */ );
{ // ( ... )*
Expand Down Expand Up @@ -1019,7 +1019,7 @@ void AntlrNotebookLexer::mWHITESPACE(bool _createToken) {
int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
_ttype = WHITESPACE;
ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;

try { // for error handling
{
switch ( LA(1)) {
Expand Down Expand Up @@ -1049,7 +1049,7 @@ void AntlrNotebookLexer::mWHITESPACE(bool _createToken) {
else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
}

}
newline();
break;
Expand Down Expand Up @@ -1078,7 +1078,7 @@ void AntlrNotebookLexer::mCOMMENT(bool _createToken) {
int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
_ttype = COMMENT;
ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;

try { // for error handling
mCOMMENTSTART(false);
{ // ( ... )*
Expand Down Expand Up @@ -1267,35 +1267,35 @@ void AntlrNotebookLexer::mCOMMENT(bool _createToken) {


const unsigned long AntlrNotebookLexer::_tokenSet_0_data_[] = { 0UL, 67052544UL, 1073741824UL, 1UL, 0UL, 0UL, 0UL, 0UL };
// * - 0 1 2 3 4 5 6 7 8 9 ^ `
// * - 0 1 2 3 4 5 6 7 8 9 ^ `
const ANTLR_USE_NAMESPACE(antlr)BitSet AntlrNotebookLexer::_tokenSet_0(_tokenSet_0_data_,8);
const unsigned long AntlrNotebookLexer::_tokenSet_1_data_[] = { 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
const ANTLR_USE_NAMESPACE(antlr)BitSet AntlrNotebookLexer::_tokenSet_1(_tokenSet_1_data_,6);
const unsigned long AntlrNotebookLexer::_tokenSet_2_data_[] = { 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL };
// 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10
// 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e
// 0x1f ! \" # $ % & \' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = >
// ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ 0x5c ] ^ _
// ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ 0x7f
// 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10
// 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e
// 0x1f ! \" # $ % & \' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = >
// ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ 0x5c ] ^ _
// ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ 0x7f
const ANTLR_USE_NAMESPACE(antlr)BitSet AntlrNotebookLexer::_tokenSet_2(_tokenSet_2_data_,8);
const unsigned long AntlrNotebookLexer::_tokenSet_3_data_[] = { 0UL, 67044352UL, 1073741824UL, 1UL, 0UL, 0UL, 0UL, 0UL };
// * 0 1 2 3 4 5 6 7 8 9 ^ `
// * 0 1 2 3 4 5 6 7 8 9 ^ `
const ANTLR_USE_NAMESPACE(antlr)BitSet AntlrNotebookLexer::_tokenSet_3(_tokenSet_3_data_,8);
const unsigned long AntlrNotebookLexer::_tokenSet_4_data_[] = { 0UL, 67060736UL, 1073741856UL, 33UL, 0UL, 0UL, 0UL, 0UL };
// * . 0 1 2 3 4 5 6 7 8 9 E ^ ` e
// * . 0 1 2 3 4 5 6 7 8 9 E ^ ` e
const ANTLR_USE_NAMESPACE(antlr)BitSet AntlrNotebookLexer::_tokenSet_4(_tokenSet_4_data_,8);
const unsigned long AntlrNotebookLexer::_tokenSet_5_data_[] = { 4294958079UL, 4294967291UL, 4026531839UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL };
// 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xb 0xc 0xe 0xf 0x10 0x11 0x12
// 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f !
// # $ % & \' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D
// E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a b c d e f g
// h i j k l m n o p q r s t u v w x y z { | } ~ 0x7f
// 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xb 0xc 0xe 0xf 0x10 0x11 0x12
// 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f !
// # $ % & \' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D
// E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a b c d e f g
// h i j k l m n o p q r s t u v w x y z { | } ~ 0x7f
const ANTLR_USE_NAMESPACE(antlr)BitSet AntlrNotebookLexer::_tokenSet_5(_tokenSet_5_data_,8);
const unsigned long AntlrNotebookLexer::_tokenSet_6_data_[] = { 4294958079UL, 4294966271UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL };
// 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xb 0xc 0xe 0xf 0x10 0x11 0x12
// 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f !
// \" # $ % & \' ( ) + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C
// D E F G H I J K L M N O P Q R S T U V W X Y Z [ 0x5c ] ^ _ ` a b c d
// e f g h i j k l m n o p q r s t u v w x y z { | } ~ 0x7f
// 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xb 0xc 0xe 0xf 0x10 0x11 0x12
// 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f !
// \" # $ % & \' ( ) + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C
// D E F G H I J K L M N O P Q R S T U V W X Y Z [ 0x5c ] ^ _ ` a b c d
// e f g h i j k l m n o p q r s t u v w x y z { | } ~ 0x7f
const ANTLR_USE_NAMESPACE(antlr)BitSet AntlrNotebookLexer::_tokenSet_6(_tokenSet_6_data_,8);

116 changes: 58 additions & 58 deletions OMNotebook/NotebookParser/AntlrNotebookLexer.hpp
@@ -1,58 +1,58 @@
#ifndef INC_AntlrNotebookLexer_hpp_
#define INC_AntlrNotebookLexer_hpp_

#include <antlr/config.hpp>
/* $ANTLR 2.7.7 (2006-11-01): "lexer.g" -> "AntlrNotebookLexer.hpp"$ */
#include <antlr/CommonToken.hpp>
#include <antlr/InputBuffer.hpp>
#include <antlr/BitSet.hpp>
#include "notebookgrammarTokenTypes.hpp"
#include <antlr/CharScanner.hpp>
class CUSTOM_API AntlrNotebookLexer : public ANTLR_USE_NAMESPACE(antlr)CharScanner, public notebookgrammarTokenTypes
{
private:
void initLiterals();
public:
bool getCaseSensitiveLiterals() const
{
return true;
}
public:
AntlrNotebookLexer(ANTLR_USE_NAMESPACE(std)istream& in);
AntlrNotebookLexer(ANTLR_USE_NAMESPACE(antlr)InputBuffer& ib);
AntlrNotebookLexer(const ANTLR_USE_NAMESPACE(antlr)LexerSharedInputState& state);
ANTLR_USE_NAMESPACE(antlr)RefToken nextToken();
public: void mRBRACK(bool _createToken);
public: void mLBRACK(bool _createToken);
public: void mRCURLY(bool _createToken);
public: void mLCURLY(bool _createToken);
public: void mCOMMA(bool _createToken);
public: void mTHICK(bool _createToken);
public: void mCOMMENTSTART(bool _createToken);
public: void mCOMMENTEND(bool _createToken);
public: void mNUMBER(bool _createToken);
protected: void mDIGIT(bool _createToken);
protected: void mEXP(bool _createToken);
public: void mID(bool _createToken);
public: void mQSTRING(bool _createToken);
public: void mWHITESPACE(bool _createToken);
public: void mCOMMENT(bool _createToken);
private:

static const unsigned long _tokenSet_0_data_[];
static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_0;
static const unsigned long _tokenSet_1_data_[];
static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_1;
static const unsigned long _tokenSet_2_data_[];
static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_2;
static const unsigned long _tokenSet_3_data_[];
static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_3;
static const unsigned long _tokenSet_4_data_[];
static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_4;
static const unsigned long _tokenSet_5_data_[];
static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_5;
static const unsigned long _tokenSet_6_data_[];
static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_6;
};

#endif /*INC_AntlrNotebookLexer_hpp_*/
#ifndef INC_AntlrNotebookLexer_hpp_
#define INC_AntlrNotebookLexer_hpp_

#include <antlr/config.hpp>
/* $ANTLR 2.7.7 (2006-11-01): "lexer.g" -> "AntlrNotebookLexer.hpp"$ */
#include <antlr/CommonToken.hpp>
#include <antlr/InputBuffer.hpp>
#include <antlr/BitSet.hpp>
#include "notebookgrammarTokenTypes.hpp"
#include <antlr/CharScanner.hpp>
class CUSTOM_API AntlrNotebookLexer : public ANTLR_USE_NAMESPACE(antlr)CharScanner, public notebookgrammarTokenTypes
{
private:
void initLiterals();
public:
bool getCaseSensitiveLiterals() const
{
return true;
}
public:
AntlrNotebookLexer(ANTLR_USE_NAMESPACE(std)istream& in);
AntlrNotebookLexer(ANTLR_USE_NAMESPACE(antlr)InputBuffer& ib);
AntlrNotebookLexer(const ANTLR_USE_NAMESPACE(antlr)LexerSharedInputState& state);
ANTLR_USE_NAMESPACE(antlr)RefToken nextToken();
public: void mRBRACK(bool _createToken);
public: void mLBRACK(bool _createToken);
public: void mRCURLY(bool _createToken);
public: void mLCURLY(bool _createToken);
public: void mCOMMA(bool _createToken);
public: void mTHICK(bool _createToken);
public: void mCOMMENTSTART(bool _createToken);
public: void mCOMMENTEND(bool _createToken);
public: void mNUMBER(bool _createToken);
protected: void mDIGIT(bool _createToken);
protected: void mEXP(bool _createToken);
public: void mID(bool _createToken);
public: void mQSTRING(bool _createToken);
public: void mWHITESPACE(bool _createToken);
public: void mCOMMENT(bool _createToken);
private:
static const unsigned long _tokenSet_0_data_[];
static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_0;
static const unsigned long _tokenSet_1_data_[];
static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_1;
static const unsigned long _tokenSet_2_data_[];
static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_2;
static const unsigned long _tokenSet_3_data_[];
static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_3;
static const unsigned long _tokenSet_4_data_[];
static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_4;
static const unsigned long _tokenSet_5_data_[];
static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_5;
static const unsigned long _tokenSet_6_data_[];
static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_6;
};

#endif /*INC_AntlrNotebookLexer_hpp_*/

0 comments on commit 1d3bc6d

Please sign in to comment.