]> OCCT Git - occt-wok.git/commitdiff
No comments
authorcas <cas@opencascade.com>
Fri, 5 Nov 1999 18:28:10 +0000 (18:28 +0000)
committercas <cas@opencascade.com>
Fri, 5 Nov 1999 18:28:10 +0000 (18:28 +0000)
src/CDLFront/CDL.lex
src/CDLFront/CDL.yacc
src/CDLFront/CDLFront.cxx

index 13d66ddecdfccb2c5e3932116016e8752a3152d6..ab910adab94a65b87ba8552294790c1bf4fa9f2b 100755 (executable)
@@ -1,18 +1,29 @@
 /*======================================================*/
-/*== CDL lexical analyzer.       
+/*== CDL lexical analyzer.                              */
 /*======================================================*/
 
 %{
 
 #include <string.h>
 #include <stdio.h>
-
+#ifdef WNT
+# include <io.h>
+#else
+# include <unistd.h>
+#endif  /* WNT */
 
 #include <cdl_defines.hxx>
 void add_cpp_comment(int,char*);
 #define yylval CDLlval
 #include <CDL.tab.h>
 int CDLlineno;
+
+#ifndef YY_NO_UNPUT
+# define YY_NO_UNPUT
+#endif  /* YY_NO_UNPUT */
+
+extern void CDLerror ( char* );
+
 %}
 
 
@@ -196,31 +207,31 @@ static EndComment()
 /* Returns the last identifier */
 
 char* YYident(){
-
+ return NULL;
 }
 
 /* Returns the last integer */
 
 char* YYinteger(){
-
+ return NULL;
 }
 
 /* Returns the last real */
 
 char* YYreal(){
-
+ return NULL;
 }
 
 /* Returns the last literal */
 
 char* YYliteral(){
-
+ return NULL;
 }
 
 /* Returns the last String */
 
 char* YYstring(){
-
+ return NULL;
 }
 
 /* Returns the last comment 
index 2c50d02e55d41c8d6266f46df4f84574cdc42f74..27d478debb672c10405b8e35347f9981410d5ecb 100755 (executable)
 #define CDL_OBJ      4
 #define CDL_LIBRARY  5
 #define CDL_EXTERNAL 6
+
+#include <stdlib.h>
+
+#include <cdl_rules.h>
+
+extern void CDLerror ( char* );
+extern int  CDLlex   ( void  );
+
 %}
 /*=-=-=-= End of The needed includes and variabels   =-=-=-=-=-=-=-=-=-=-=-=*/
 
index 3d30d9825787791b28ce0c562ae2b4b811bfcbcc..d982626d8864a0e06ad406ac5f370cdcff8483b2 100755 (executable)
@@ -84,7 +84,6 @@ extern "C" {
 
 void CDL_InitVariable();
 
-static char *YY_fileName="";      
 static int   YY_nb_error;
 static int   YY_nb_warning;
 static Handle(TCollection_HAsciiString) CDLFileName;
@@ -584,7 +583,7 @@ char *TypeCompletion(char *aName)
 {
   Handle(TColStd_HSequenceOfHAsciiString)  aSeqOfPackage;
   Handle(TCollection_HAsciiString)         aFullName     = new TCollection_HAsciiString;
-  Standard_Integer                         i,pos;
+  Standard_Integer                         i;
   
   if (Current_Entity == CDL_GENCLASS || Current_Entity == CDL_STDCLASS) {
     Handle(TCollection_HAsciiString) aPackageName, thethetypename = new TCollection_HAsciiString(aName);
@@ -2455,11 +2454,11 @@ void Param_Begin()
     aParam->Type(athetypename,aPackName);
 
     if (!ParamValue.IsNull()) {
-      MS_TypeOfValue pt;
+      MS_TypeOfValue pt = MS_INTEGER;
       MS_ParamWithValue *pwv;
 
       switch (ParamType) {
-      case INTEGER: pt = MS_INTEGER;
+      case INTEGER:
                    break;
       case REAL:    pt = MS_REAL;
                    break;
@@ -2615,7 +2614,7 @@ void Set_Any()
 }
 
 
-extern "C" CDLparse();
+extern "C" int CDLparse();
 
 
 void CDL_Main()
@@ -2673,7 +2672,7 @@ int CDLTranslate(const Handle(MS_MetaSchema)&             aMetaSchema,
                 const Handle(TColStd_HSequenceOfHAsciiString)& anInstList,
                 const Handle(TColStd_HSequenceOfHAsciiString)& anGenList) 
 {
-  Standard_Integer  ErrorLevel = 0;
+  volatile Standard_Integer  ErrorLevel = 0;
 
   CDL_InitVariable();