/*======================================================*/
-/*== 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* );
+
%}
/* 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
#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 =-=-=-=-=-=-=-=-=-=-=-=*/
void CDL_InitVariable();
-static char *YY_fileName="";
static int YY_nb_error;
static int YY_nb_warning;
static Handle(TCollection_HAsciiString) CDLFileName;
{
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);
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;
}
-extern "C" CDLparse();
+extern "C" int CDLparse();
void CDL_Main()
const Handle(TColStd_HSequenceOfHAsciiString)& anInstList,
const Handle(TColStd_HSequenceOfHAsciiString)& anGenList)
{
- Standard_Integer ErrorLevel = 0;
+ volatile Standard_Integer ErrorLevel = 0;
CDL_InitVariable();