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

index ab910adab94a65b87ba8552294790c1bf4fa9f2b..8fa50105693c4e2b08a0156130ecde5870c4bde8 100755 (executable)
@@ -48,6 +48,7 @@ FUNCTIONCALL    [-][-][-][C][+][+][ \t]*[:][ \t]*[f][u][n][c][t][i][o][n][ \t]*[
 /* The identifiers without underscore at begining and end */
 
 IDENTIFIER     [A-Za-z][A-Za-z0-9_]*[A-Za-z0-9]
+JAVAIDENTIFIER [A-Za-z][A-Za-z0-9_.]*[A-Za-z0-9]
 
 
 /* Integer and real */
@@ -140,6 +141,9 @@ as[ \t]*object          { return(object); }
 [A-Za-z]       { strncpy(CDLlval.str,CDLtext,MAX_CHAR);
                  return(IDENTIFIER); }
 
+{JAVAIDENTIFIER} { strncpy(CDLlval.str,CDLtext,MAX_CHAR);
+                  return(JAVAIDENTIFIER); }
+
 {INTEGER}      { strncpy (CDLlval.str,CDLtext,MAX_CHAR);
                  return(INTEGER); }
 
index 27d478debb672c10405b8e35347f9981410d5ecb..c300ef7d960d711618d871eda3ab4aa9245c4e44 100755 (executable)
@@ -24,7 +24,6 @@
 #define CDL_EXTERNAL 6
 
 #include <stdlib.h>
-
 #include <cdl_rules.h>
 
 extern void CDLerror ( char* );
@@ -92,6 +91,7 @@ extern int  CDLlex   ( void  );
 %token                 ','
 %token         '='
 %token         IDENTIFIER
+%token          JAVAIDENTIFIER
 %token         INTEGER
 %token         LITERAL
 %token         REAL
@@ -101,7 +101,7 @@ extern int  CDLlex   ( void  );
  char str[MAX_STRING];
 }
 
-%type  <str>    __Package_Name Package_Name Interface_Name __Interface_Name __Schema_Name __ExecFile_Name IDENTIFIER INTEGER REAL STRING LITERAL Schema_Name ExecFile_Name Empty_Str Engine_Name __Engine_Name Component_Name __Component_Name
+%type  <str>    __Package_Name Package_Name Interface_Name __Interface_Name __Schema_Name __ExecFile_Name IDENTIFIER JAVAIDENTIFIER INTEGER REAL STRING LITERAL Schema_Name ExecFile_Name Empty_Str Engine_Name __Engine_Name Component_Name __Component_Name Client_Name
 
 %start         __Cdl_Declaration_List
 %%
@@ -277,17 +277,28 @@ Component_Interface       : interface IDENTIFIER CDL_from IDENTIFIER ';' { Component_I
 /*==========================================================================*/
 /*==== Client definition  ==================================================*/
 /*==========================================================================*/
-Client_Declaration     : client Client_Name
+Client_Declaration     : client Client_Name { Client_Begin($2); }
+                            __Client_Uses 
                           is 
                             __Client_Definitions
                           end __Client_End ';' 
                        ;
 
-Client_Name            : IDENTIFIER  { Client_Begin($1); }
+Client_Name            : JAVAIDENTIFIER
+                        | IDENTIFIER
+                       ;
+
+__Client_Uses          : Empty
+                       | uses ClientUse_List 
                        ;
 
-__Client_End           : Empty 
-                       | IDENTIFIER { Client_End(); }
+ClientUse_List         : Client_Name { Client_Use ( $1 ); }
+                       | ClientUse_List ',' Client_Name { Client_Use ( $3 ); }
+                        ;
+
+__Client_End           : Empty
+                        | IDENTIFIER     { Client_End(); }
+                       | JAVAIDENTIFIER { Client_End(); }
                        ;
 
 __Client_Definitions    : Empty
index d982626d8864a0e06ad406ac5f370cdcff8483b2..e903e78917cd097b57dbe474d5d6cd1d0996aeff 100755 (executable)
@@ -1081,6 +1081,15 @@ void Interface_Use(char*aPackageName)
   Interface->Use(aPackName);
 }
 
+void Client_Use ( char* aClientName ) {
+
+ Handle( TCollection_HAsciiString ) aCltName =
+  new TCollection_HAsciiString ( aClientName );
+
+ Client -> Use ( aCltName );
+
+}  // end Client_Use
+
 void Interface_Package(char *aPackageName)
 {
   Handle(TCollection_HAsciiString) aPackName = new TCollection_HAsciiString(aPackageName);