"Fossies" - the Fresh Open Source Software Archive

Member "erltools/pub/cplusplu/test/eless.c_l" (25 Jul 1999, 2570 Bytes) of package /linux/misc/old/erltools-4.0.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 class toto { int i = 5 ; /* comment ssls */ ;
    2          int aaaa = 10 ;/* autre comment */ ; i = 7 ; // aaa
    3          j ;/* comment */ };
    4 
    5 class fifi ;
    6 
    7 #include "token.h"
    8 #include "metalang.h"
    9 
   10 #ifdef SUN
   11 #define CREATION_ACCESS        S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
   12 #else
   13 #define CREATION_ACCESS        S_IREAD | S_IWRITE
   14 #endif
   15 
   16 int input, output, coutput, houtput, loutput ;
   17 extern char *theLanguageName ;
   18 
   19 /* void _fastcall Comp PARAM((PTREE)); */ 
   20 void    _fastcall Comp () ;
   21 extern int  writeLine ;
   22 /**************************************************************
   23           main
   24   ***************************************************************/ 
   25 extern STRINGELEM   *listConst ;
   26 static PTREE    theRetTree ;
   27 
   28 PTREE bri_parse_entry_metalang ( i )
   29 int i ;
   30 {}
   31 
   32 PTREE GetTree ()
   33 {
   34     
   35     /* tabArity =  _arityNode_metalang;
   36       *FuncArity =  Arity_metalang;*/ 
   37     InitConst_metalang();
   38     SwitchLang("metalang");
   39     return langage_metalang(1);
   40 }
   41 
   42 static char name [80], *ptName ;
   43 
   44 ChopTree ( retTree )
   45 PTREE   retTree ;
   46 {
   47     strcpy(name, Value(retTree));
   48     ptName = name + strlen(name);
   49     if ( ptName > name + 8 ) 
   50         ptName = name + 8 ;
   51     strcpy(ptName, ".c");
   52     output = coutput
   53          = open(name, O_RDWR | O_TRUNC | O_CREAT, CREATION_ACCESS);
   54     strcpy(ptName, ".h");
   55     houtput = open(name, O_RDWR | O_TRUNC | O_CREAT, CREATION_ACCESS);
   56 #ifdef SUN
   57     strcpy(ptName, "_ca.ll");
   58     loutput = open(name, O_RDWR | O_TRUNC | O_CREAT, CREATION_ACCESS);
   59 #endif
   60     *ptName = '\0';
   61     theLanguageName = AllocString(name);
   62     InitOutput();
   63     InitComp();
   64     traitement(retTree);/* optimization of addlist */ 
   65     listConst = (STRINGELEM *)0 ;
   66     Comp(theRetTree = retTree);
   67     NewLine();
   68     Flush();
   69     DumpConst(listConst);
   70     WriteString("/*Well done my boy */ ");
   71     NewLine();
   72     close(coutput);
   73     close(houtput);
   74 #ifdef SUN
   75     close(loutput);
   76 #endif
   77 }
   78 
   79 int nbFile = 0 ;
   80 
   81 VerifyFileLine ( doit )
   82 int doit ;  /* coupure obligatoire : pour le lex */ 
   83 {
   84     char    numbString [10];
   85     
   86     if ( doit || writeLine > 3300 ) {
   87         strcpy(name, Value(theRetTree));
   88         ptName = name + strlen(name);
   89         if ( ptName > name + 7 ) 
   90             ptName = name + 7 ;
   91         *ptName++ = '0' + nbFile++ ;
   92         strcpy(ptName, ".c");
   93         close(output);
   94         output = coutput
   95              = open(name, O_RDWR | O_TRUNC | O_CREAT, CREATION_ACCESS);
   96         writeLine = 0 ;
   97         return 0 ;
   98     }
   99     return 1 ;
  100 }