diff --git a/cg/VB2UML.cstl b/cg/VB2UML.cstl index 51573e3f..9c5a7e6d 100644 --- a/cg/VB2UML.cstl +++ b/cg/VB2UML.cstl @@ -148,6 +148,7 @@ MKDIR _1 |--> OclFile.mkdir(_1) nameStmt:: NAME _1 AS _2 |--> OclFile.renameFile(_1,_2) +Name _1 As _2 |--> OclFile.renameFile(_1,_2) randomizeStmt:: RANDOMIZE |--> MathLib.setSeeds((OclDate.getSystemTime() mod 30269), (OclDate.getSystemTime() mod 30307), (OclDate.getSystemTime() mod 30323)) @@ -314,6 +315,7 @@ SENDKEYS _* |--> variableStmt:: DIM _1 |-->_1 +Dim _1 |-->_1 PUBLIC _1 |-->_1 PRIVATE _1 |-->_1 GLOBAL _1 |-->_1`variableListInitialisation @@ -908,7 +910,7 @@ FileLen ( _1 ) |-->(OclFile.newOclFile(_1)).length() LOF ( _1 ) |-->(OclFile.newOclFile(_1)).length() EOF ( _1 ) |-->(_1.getEof() = true) InputBox ( _1 ) |-->(OclFile["System.in"]).readLine() -MsgBox ( _1 ) |-->(OclFile["System.in"]).readLine() +MsgBox ( _1 ) |-->("" + _1)->display() GetAttr ( _1 ) |-->Sequence{ (if (OclFile.newOclFile(_1)).canWrite() then 0 else 1 endif), (if (OclFile.newOclFile(_1)).isHidden() then 2 else 0 endif), (if (OclFile.newOclFile(_1)).isDirectory() then 16 else 0 endif) }->sum() GetObject ( _1 ) |-->(OclFile.newOclFile_Read(OclFile.newOclFile(_1))).readObject() Input ( _1 ) |-->_1`last.readN(_1`first)->sum() @@ -1373,6 +1375,11 @@ _1 FUNCTION _* |--> skip; STATIC FUNCTION _* |--> skip; _1 STATIC FUNCTION _* |--> skip; +Function _* |--> skip; +_1 Function _* |--> skip; +Static Function _* |--> skip; +_1 Static Function _* |--> skip; + forEachStmt:: FOR EACH _1 IN _2 \r\n _* NEXT |--> for _1 : _2 do\n (_*`blocks skip\n ) diff --git a/cg/cgJava2UML.cstl b/cg/cgJava2UML.cstl index 11246338..d8f1fb95 100644 --- a/cg/cgJava2UML.cstl +++ b/cg/cgJava2UML.cstl @@ -1222,8 +1222,8 @@ _1 ? _2 : _3 |-->if _1`queryForm then _2`queryForm else _3`queryForm endif ( short ) _1 |-->(_1`queryForm)->char2byte() _1 String ( long ) _1 |-->(_1`queryForm)->char2byte() _1 String -( byte ) _1 |-->(_1 mod 128) -( short ) _1 |-->(_1 mod 32768) +( byte ) _1 |-->(_1`queryForm mod 128) +( short ) _1 |-->(_1`queryForm mod 32768) ( _1 ) _2 |-->_2`queryForm->oclAsType(_1) @@ -1287,6 +1287,12 @@ _1 . new _2 |-->_1`queryForm._2 { _1 } |-->Sequence{_1} +{ _1, _2 } |-->Sequence{_1,_2} +{ _1, _2, _3 } |-->Sequence{_1,_2,_3} +{ _1, _2, _3, _4 } |-->Sequence{_1,_2,_3,_4} +{ _1, _2, _3, _4, _5 } |-->Sequence{_1,_2,_3,_4,_5} +{ _1, _2, _3, _4, _5, _6 } |-->Sequence{_1,_2,_3,_4,_5,_6} + { _1, _* } |-->Sequence{_1,_*} { } |-->Sequence{} @@ -1472,9 +1478,10 @@ _1 ( ) |-->_1() _1 ( _2 ) |-->_1(_2) _1 |-->_1`queryForm _1 multiple +_1 |-->_1`queryForm _1 arrayInitializer +_1 |-->_1`queryForm _1 expression -_1 |-->_1 - +_0 |-->_0 enumsetMethodCall:: @@ -2490,9 +2497,10 @@ _1 ( ) |--> _1 ( _2 ) |-->_2`expressionListPreSideEffect _1 |-->_1`preSideEffect _1 multiple - +_1 |-->_1`preSideEffect _1 arrayInitializer _1 |--> +_* |--> postSideEffect:: @@ -2592,6 +2600,7 @@ _1 *= _2 |--> _1 := _1 * (_2`queryForm) ; _2`sideEffect _2 updatesObjec _1 *= _2 |--> _2`preSideEffect _1 := _1 * (_2`queryForm) _2`postSideEffect _2 hasSideEffect _1 *= _2 |--> _1 := _1*(_2) +( _1 ) |-->_1`updateForm _1 /= _2 |--> _1 := _1/(_2) _1 &= _2 |--> _1 := MathLib.bitwiseAnd(_1, _2) @@ -2602,6 +2611,12 @@ _1 <<= _2 |--> _1 := _1*(2->pow(_2)) _1 >>= _2 |--> _1 := _1/(2->pow(_2)) _1 >>>= _2 |--> _1 := _1/(2->pow(_2)) +_1 < _2 |--> _1`updateForm ; _2`updateForm +_1 > _2 |--> _1`updateForm ; _2`updateForm +_1 <= _2 |--> _1`updateForm ; _2`updateForm +_1 >= _2 |--> _1`updateForm ; _2`updateForm +_1 == _2 |--> _1`updateForm ; _2`updateForm + Collections . _1 |-->_1`collectionsMethodCall Arrays . _1 |-->_1`arraysMethodCall @@ -2631,8 +2646,8 @@ _1 . _2 |-->_1`preSideEffect_2`preSideEffect _1`queryForm_2 _2 methodCa _1 . _2 |-->_1`preSideEffect_2`preSideEffect _1`queryForm._2 -_1 |--> _1 - +_1 |--> skip +_* |--> skip updatedObject:: @@ -3314,7 +3329,7 @@ synchronized _1 _2 |-->_2 _1 : _2 |-->_2 _1 : _2 ; |-->_2 -while _1 _2 |--> while _1 do _2 ; +while _1 _2 |--> while _1 do (_1`updateForm ; _2 ) ; if _1 _2 else _3 |--> if _1 then _2 else _3 ; diff --git a/cg/vbDeclarations.cstl b/cg/vbDeclarations.cstl index c68284f7..78bd113b 100644 --- a/cg/vbDeclarations.cstl +++ b/cg/vbDeclarations.cstl @@ -334,6 +334,11 @@ defaultValue:: AS _1 |-->_1`defaultValue AS NEW _1 |-->_1.new_1() AS _1 _2 |-->_1`defaultValue + +As _1 |-->_1`defaultValue +As New _1 |-->_1.new_1() +As _1 _2 |-->_1`defaultValue + DATE |-->null Date |-->null % |-->0 diff --git a/cg/vbFunctions.cstl b/cg/vbFunctions.cstl index f381edee..7334f792 100644 --- a/cg/vbFunctions.cstl +++ b/cg/vbFunctions.cstl @@ -85,16 +85,28 @@ _1 |-->_1 functionStmt:: FUNCTION _1 _2 \r\n \r\n _3 _* END FUNCTION |-->operation _1`VB2UML_2`VB2UML : OclAny\n pre: true post: true\n activity: var _1 : OclAny;\n_3`VB2UML\n return _1;\n\n +Function _1 _2 \r\n \r\n _3 _* End Function |-->operation _1`VB2UML_2`VB2UML : OclAny\n pre: true post: true\n activity: var _1 : OclAny;\n_3`VB2UML\n return _1;\n\n + FUNCTION _1 _2 \r\n _3 _* END FUNCTION |-->operation _1`VB2UML_2`VB2UML : OclAny\n pre: true post: true\n activity: var _1`VB2UML : OclAny;\n_3`VB2UML\n return _1;\n\n +Function _1 _2 \r\n _3 _* End Function |-->operation _1`VB2UML_2`VB2UML : OclAny\n pre: true post: true\n activity: var _1`VB2UML : OclAny;\n_3`VB2UML\n return _1;\n\n + FUNCTION _1 _2 _3 \r\n \r\n _4 _* END FUNCTION |-->operation _1_2`VB2UML _3`VB2UML\n pre: true post: true\n activity: var _1 _3`VB2UML;\n_4`VB2UML\n return _1;\n\n +Function _1 _2 _3 \r\n \r\n _4 _* End Function |-->operation _1_2`VB2UML _3`VB2UML\n pre: true post: true\n activity: var _1 _3`VB2UML;\n_4`VB2UML\n return _1;\n\n + FUNCTION _1 _2 _3 \r\n _4 _* END FUNCTION |-->operation _1_2`VB2UML _3`VB2UML\n pre: true post: true\n activity: var _1 _3`VB2UML;\n_4`VB2UML\n return _1;\n\n +Function _1 _2 _3 \r\n _4 _* End Function |-->operation _1_2`VB2UML _3`VB2UML\n pre: true post: true\n activity: var _1 _3`VB2UML;\n_4`VB2UML\n return _1;\n\n + _1 FUNCTION _2 _3 _4 \r\n \r\n _5 _* END FUNCTION |-->operation _2`VB2UML_3`VB2UML _4`VB2UML\n pre: true post: true\n activity: var _2 _4`VB2UML;\n_5`VB2UML\n return _2;\n\n +_1 Function _2 _3 _4 \r\n \r\n _5 _* End Function |-->operation _2`VB2UML_3`VB2UML _4`VB2UML\n pre: true post: true\n activity: var _2 _4`VB2UML;\n_5`VB2UML\n return _2;\n\n + _1 FUNCTION _2 _3 _4 \r\n _5 _* END FUNCTION |-->operation _2`VB2UML_3`VB2UML _4`VB2UML\n pre: true post: true\n activity: var _2 _4`VB2UML;\n_5`VB2UML\n return _2;\n\n +_1 Function _2 _3 _4 \r\n _5 _* End Function |-->operation _2`VB2UML_3`VB2UML _4`VB2UML\n pre: true post: true\n activity: var _2 _4`VB2UML;\n_5`VB2UML\n return _2;\n\n + STATIC FUNCTION _1 _2 _3 \r\n \r\n _4 _* END FUNCTION |-->static operation _1_2`VB2UML _3`VB2UML\n pre: true post: true\n activity: var _1 _3`VB2UML;\n_4`VB2UML\n return _1;\n\n STATIC FUNCTION _1 _2 _3 \r\n _4 _* END FUNCTION |-->static operation _1_2`VB2UML _3`VB2UML\n pre: true post: true\n activity: var _1 _3`VB2UML;\n_4`VB2UML\n return _1;\n\n @@ -307,12 +319,21 @@ subStmt:: SUB _1 \r\n \r\n _2 _* END SUB |--> operation _1()\n pre: true post: true\n activity: _2`VB2UML\n\n SUB _1 _2 \r\n \r\n _3 _* END SUB |--> operation _1_2`VB2UML\n pre: true post: true\n activity: _3`VB2UML\n\n +Sub _1 \r\n \r\n _2 _* End Sub |--> operation _1()\n pre: true post: true\n activity: _2`VB2UML\n\n +Sub _1 _2 \r\n \r\n _3 _* End Sub |--> operation _1_2`VB2UML\n pre: true post: true\n activity: _3`VB2UML\n\n + SUB _1 \r\n _2 _* END SUB |--> operation _1()\n pre: true post: true\n activity: _2`VB2UML\n\n SUB _1 _2 \r\n _3 _* END SUB |--> operation _1_2`VB2UML\n pre: true post: true\n activity: _3`VB2UML\n\n +Sub _1 \r\n _2 _* End Sub |--> operation _1()\n pre: true post: true\n activity: _2`VB2UML\n\n +Sub _1 _2 \r\n _3 _* End Sub |--> operation _1_2`VB2UML\n pre: true post: true\n activity: _3`VB2UML\n\n + SUB _1 \r\n END SUB |--> operation _1()\n pre: true post: true;\n\n SUB _1 _2 \r\n END SUB |--> operation _1_2`VB2UML\n pre: true post: true;\n\n +Sub _1 \r\n End Sub |--> operation _1()\n pre: true post: true;\n\n +Sub _1 _2 \r\n End Sub |--> operation _1_2`VB2UML\n pre: true post: true;\n\n + STATIC SUB _1 \r\n \r\n _2 _* END SUB |-->static operation _1`VB2UML()\n pre: true post: true\n activity: _2`VB2UML\n\n STATIC SUB _1 _2 \r\n \r\n _3 _* END SUB |-->static operation _1`VB2UML_2`VB2UML\n pre: true post: true\n activity: _3`VB2UML\n\n @@ -422,12 +443,18 @@ $ |-->: Sequence(String) AS _1 |-->: Sequence(_1) AS NEW _1 |-->: Sequence(_1) AS _1 _2 |-->: Sequence(_1) +As _1 |-->: Sequence(_1) +As New _1 |-->: Sequence(_1) +As _1 _2 |-->: Sequence(_1) asTypeType:: AS _1 |-->_1`VB2UML AS NEW _1 |-->_1`VB2UML AS _1 _2 |-->_1`VB2UML +As _1 |-->_1`VB2UML +As New _1 |-->_1`VB2UML +As _1 _2 |-->_1`VB2UML typeHintDec:: % |--> : int