"Fossies" - the Fresh Open Source Software Archive

Member "erltools/pub/library/pretty0.cc" (15 May 2006, 3142 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. For more information about "pretty0.cc" see the Fossies "Dox" file reference documentation.

    1 /*************************************************************************/
    2 /*                                                                       */
    3 /*        Produced by MetaGen version 2.0  -    1989-1995                 */
    4 /*       Syntaxic Analyzer Meta Generator developped by                  */
    5 /*                  Eric Lavillonniere                                   */
    6 /*                                                                       */
    7 /*************************************************************************/
    8 
    9 #include "token.h"
   10 #include "pretty.h"
   11 
   12 
   13 
   14 #line 15 "pretty.met"
   15 
   16 #line 15 "pretty.met"
   17 int pretty::SortKeyWord (int defaultValue)
   18 #line 15 "pretty.met"
   19 {
   20 #line 15 "pretty.met"
   21     register int Value;
   22 #line 15 "pretty.met"
   23     if(!strcmp(lexEl.string(),"+____------____")) {
   24 #line 15 "pretty.met"
   25         return(PLUS____TIRETIRETIRETIRETIRETIRE____) ;
   26 #line 15 "pretty.met"
   27     }
   28 #line 15 "pretty.met"
   29     return(defaultValue);
   30 #line 15 "pretty.met"
   31 }
   32 #line 15 "pretty.met"
   33 
   34 #line 15 "pretty.met"
   35 int pretty::UpSortKeyWord(int value) 
   36 #line 15 "pretty.met"
   37 {
   38 #line 15 "pretty.met"
   39     register char * ptSource=lexEl.string();
   40 #line 15 "pretty.met"
   41     for (;*ptSource;ptSource++) *ptSource = toupper(*ptSource);
   42 #line 15 "pretty.met"
   43     return SortKeyWord (value);
   44 #line 15 "pretty.met"
   45 }
   46 #line 15 "pretty.met"
   47 /* 
   48 -- 0 -- bidon
   49     ALWAYS
   50 -- 1 -- parse_entry
   51     ALWAYS
   52 */
   53 
   54 signed char *pretty::_tokenArray [2] = {
   55     (signed char *) "\377\377\377"
   56     ,(signed char *) "\377\377\377"
   57 };
   58 typedef int (pretty::*(DEF_FUNC_TOKEN_ARRAY [2]))() ;
   59 DEF_FUNC_TOKEN_ARRAY pretty::_tokenFuncArray = {
   60     /*bidon                          */0,
   61     /*parse_entry                    */0
   62 };
   63 int pretty::_tokenNbFuncArray [2] = {
   64     /*bidon                          */0,
   65     /*parse_entry                    */0
   66 };
   67 int _arityNode_pretty[] = {   2 , 1 , 1 , 1 , 1 , 2 , -1 , 3 , 1 , 1 , 1 , 0
   68                             , 0 , 1 , 1 , 1 };
   69 
   70     
   71 STRINGELEM * listConst_pretty;
   72 PPTREE bri_parse_entry_pretty(int error_free) {
   73 return pretty() . parse_entry (error_free);
   74 }
   75 
   76 int pretty::init = 0 ;
   77 
   78 void pretty::InitConst()
   79 {
   80     if (!pretty::init) {
   81         pretty::init = 1 ;
   82         
   83         STRINGELEM * inter = listConst;
   84         listConst = (STRINGELEM *) 0;
   85         AddConstVal("pretty::GOTO_REL", 15);
   86         AddConstVal("pretty::GOTO", 14);
   87         AddConstVal("pretty::STR", 13);
   88         AddConstVal("pretty::UNMARK", 12);
   89         AddConstVal("pretty::MARK", 11);
   90         AddConstVal("pretty::TAB_VIRT", 10);
   91         AddConstVal("pretty::TAB", 9);
   92         AddConstVal("pretty::NEWLINE", 8);
   93         AddConstVal("pretty::ATTRIBUTS", 7);
   94         AddConstVal("pretty::PLUS____TIRETIRETIRETIRETIRETIRE____", 6);
   95         AddConstVal("IN_LANGUAGE", 5);
   96         AddConstVal("META", 4);
   97         AddConstVal("PREPOST", 3);
   98         AddConstVal("POST", 2);
   99         AddConstVal("PRE", 1);
  100         AddConstVal("LIST",0);
  101         listConst_pretty = listConst;
  102         listConst = inter;
  103         AddLang("pretty",_arityNode_pretty,listConst_pretty,bri_parse_entry_pretty,15,(OVER_LANG *) 0);
  104         }
  105 }
  106 
  107 /*Well done my boy */