home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / flexpp.zip / FLEX / FLEXPPM.TXT < prev    next >
Text File  |  1994-10-12  |  22KB  |  859 lines

  1.  
  2.  
  3.  
  4. FLEX++(1)                   COMMANDS                    FLEX++(1)
  5.  
  6.  
  7.  
  8. NAME
  9.      flex++ - generate a scanner in c or c++..
  10.  
  11. SYNOPSIS
  12.      scanner++ [-bcFfdIiLpsTtv?] [-C[e][m|f|F]] [-atmp-directory]
  13.      [-ooutfile]  [-ginclude-pathname] [-h[headerfile]] [-Sskele-
  14.      ton] [-Hheader-skeleton] grammar-file...
  15.  
  16. DESCRIPTION
  17.      Generate a scanner. Based on flex version 2.3.7. See flex(1)
  18.      and  flexdoc(1)  for  details  of  main  functionality. Only
  19.      changes are reported here.
  20.  
  21.      You now generate a C++ class if you are compiling with a C++
  22.      compiler.  A  generated header can be generated, and is made
  23.      from a skeleton-header.  The  code  skeleton  is  also  more
  24.      adaptable.  It  permit  you  to  modify  much things only by
  25.      changing the two skeletons.
  26.  
  27.      In plain C, the flex++ is compatible with standard flex.
  28.  
  29.      If no header is generated, it is in fact merged, instead  of
  30.      included.
  31.  
  32. OPTIONS
  33.      -a tmp-directory
  34.           Set directory of temp files .
  35.  
  36.      -Sskeleton
  37.           Set filename of code skeleton. Default is flexskel.cc.
  38.  
  39.      -Hheader-skeleton
  40.           Set filename of header skeleton. Default is flexskel.h.
  41.  
  42.      -h[header]
  43.           Set filename of header skeleton. Default  is  lex.yy.h,
  44.           or  c_basename.h  if  -ois  used and there is no header
  45.           name, .c, .cc, .C, .cpp,  .cxx...  options  for  output
  46.           files are replaced by .h to generate the header name.
  47.  
  48.      -gincludefilename
  49.           change the filename that flex++  put  in  the  #include
  50.           inside  the  code, when a separate header is generated.
  51.           Useful when the parameter name of  the  header  contain
  52.           pathname information that may change.
  53.  
  54. DECLARATIONS
  55.      These are new declarations to put in the declaration section
  56.      :
  57.  
  58.      %name scanner_name
  59.           Declare the name of this scanner. User  for  C++  class
  60.  
  61.  
  62.  
  63. GNU and RDT            Last change: 3/3/93                      1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. FLEX++(1)                   COMMANDS                    FLEX++(1)
  71.  
  72.  
  73.  
  74.           name,  and to render many names unique. default is lex.
  75.           Must be given before %define, or never.
  76.  
  77.      %define define_name content...
  78.           Declare a macro symbol in header and code. The name  of
  79.           the symbol is YY_'scanner_name'_'define_name'. The con-
  80.           tent if given after, as with #define.  Newline  can  be
  81.           escaped  as with #define. Many symbols are proposed for
  82.           customisation.
  83.  
  84.      %header{
  85.           Like %{, but include this text in the header. End  with
  86.           %}.  When put in declaration section, the text is added
  87.           before the definitions. It can be put at the  begin  of
  88.           the  second section so that the text is added after all
  89.           definition in the header.
  90.  
  91. DECLARATION DEFINE SYMBOLS
  92.      These are  the  symbols  you  can  define  with  %define  in
  93.      declaration  section,  or  that  are already defined. Remind
  94.      that  they  are   replaced   by   a   preprocessor   #define
  95.      YY_'scanner_name'_'name.
  96.  
  97.      FLEX_SCANNER
  98.           Automaticaly defined in the code. used for  conditioanl
  99.           code.  it  is  effectively  defined at the point of the
  100.           %name directive, or at the point of the %% between sec-
  101.           tion 1 and 2.
  102.  
  103.      CHAR Automaticaly defined in the code. Define  the  type  of
  104.           char  used  depending of the 8-bits flag (unsigned char
  105.           if 8-bit, char if 7-bit). it is effectively defined  at
  106.           the  point  of  the %name directive, or at the point of
  107.           the %% between section 1  and  2.  You  cannot  use  it
  108.           before.
  109.  
  110.      FLEX_DEBUG
  111.           Automaticaly defined in the code  if  debug  option  -d
  112.           set.  Define  the  type  of  char used depending of the
  113.           8-bits flag (unsigned char if 8-bit, char if 7-bit). it
  114.           is effectively defined at the point of the %name direc-
  115.           tive, or at the point of the %% between section  1  and
  116.           2. You cannot use it before.
  117.  
  118.      DEBUG_FLAG
  119.           The runtime debug flag name. Default is  yy_flex_debug.
  120.           See yy_flex_debug in flex. Used only in debug mode.
  121.  
  122.      DEBUG_INIT
  123.           The runtime debug flag initial value. Default is 1. See
  124.           yy_flex_debug in flex.
  125.  
  126.  
  127.  
  128.  
  129. GNU and RDT            Last change: 3/3/93                      2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. FLEX++(1)                   COMMANDS                    FLEX++(1)
  137.  
  138.  
  139.  
  140.      TEXT The scanned text string. default yytext. See yytext  in
  141.           flex.
  142.  
  143.      LENG The scanned text length. default yyleng. See yyleng  in
  144.           flex.
  145.  
  146.      IN   The input file pointer. default yyin. See yyin in flex.
  147.  
  148.      OUT  The input file pointer. default  yyout.  See  yyout  in
  149.           flex.
  150.  
  151.      LEX  The scanner function name. default yylex. See yylex  in
  152.           flex. Replace #define YYDECL.
  153.  
  154.      LEX_RETURN
  155.           The scanner function  return  type.  default  int.  See
  156.           yylex in flex. Replace #define YYDECL.
  157.  
  158.      LEX_PARAM
  159.           The scanner function parameter list. default  void,  or
  160.           empty  un  old-C.  See  yylex  in flex. Replace #define
  161.           YYDECL.
  162.  
  163.      LEX_PARAM_DEF
  164.           The scanner function parameter declaration  for  old-C.
  165.           Defined  and  used  only  in old-C. Default empty . See
  166.           yylex in flex. Replace #define YYDECL. For  example  to
  167.           pass an int, named x, LEX_PARAM
  168.  
  169.      is set to x, and LEX_PARAM_DEF to int x ;.
  170.  
  171.      RESTART
  172.           The  restart  function  name.  default  yyrestart.  See
  173.           yyrestart in flex.
  174.  
  175.      SWITCH_TO_BUFFER
  176.  
  177.      LOAD_BUFFER_STATE
  178.  
  179.      CREATE_BUFFER
  180.  
  181.      DELETE_BUFFER
  182.  
  183.      INIT_BUFFER
  184.           The  buffer  control  functions  names.  defaults   are
  185.           yy_switch_to_buffer,              yy_load_buffer_state,
  186.           yy_create_buffer, yy_delete_buffer, yy_init_buffer. See
  187.           this functions in flex.
  188.  
  189.      CURRENT_BUFFER
  190.           The name of the pointeur to the current buffer. Without
  191.           class,  it  is  yy_current_buffer,  and  the  old macro
  192.  
  193.  
  194.  
  195. GNU and RDT            Last change: 3/3/93                      3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. FLEX++(1)                   COMMANDS                    FLEX++(1)
  203.  
  204.  
  205.  
  206.           YY_CURRENT_BUFFER is defined to it's value. With class,
  207.           the default value is YY_CURRENT_BUFFER, and there is no
  208.           macro YY_CURRENT_BUFFER.
  209.  
  210.      These are only used if class is generated.
  211.  
  212.      CLASS
  213.           The class name. default is the scanner name.
  214.  
  215.      INHERIT
  216.           The inheritance list. Don't forget the : before, if not
  217.           empty list.
  218.  
  219.      MEMBERS
  220.           List of members to add to the class definition,  before
  221.           ending it.
  222.  
  223.      ECHO The scanner  echo  member  function  boby.  Default  to
  224.           yy_echo. this function is called by the macro ECHO. See
  225.           ECHO on flex.
  226.  
  227.      INPUT
  228.           The block input member  function  .  This  function  is
  229.           called  inside  the  macro YY_INPUT. It read a block of
  230.           text to be  scanned.  Default  is  to  read  yyin.  See
  231.           YY_INPUT.
  232.  
  233.      FATAL_ERROR
  234.           The error message member function .  This  function  is
  235.           called  inside  the macro YY_FATAL_ERROR. Default is to
  236.           write  the  message  to   stderr   and   exit   .   See
  237.           YY_FATAL_ERROR.
  238.  
  239.      WRAP The wrap member function  .  This  function  is  called
  240.           inside the macro yywrap(). Default is to return 1 . See
  241.           yywrap() in flex.
  242.  
  243.      ECHO_PURE
  244.  
  245.      INPUT_PURE
  246.  
  247.      FATAL_ERROR_PURE
  248.  
  249.      WRAP_PURE
  250.           Indicate that the corresponding member function  is  to
  251.           be  pure.  It  implys automatically the function_NOCODE
  252.           symbol
  253.  
  254.      ECHO_NOCODE
  255.  
  256.      INPUT_NOCODE
  257.  
  258.  
  259.  
  260.  
  261. GNU and RDT            Last change: 3/3/93                      4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. FLEX++(1)                   COMMANDS                    FLEX++(1)
  269.  
  270.  
  271.  
  272.      FATAL_ERROR_NOCODE
  273.  
  274.      WRAP_NOCODE
  275.           Indicate that the corresponding member function is  not
  276.           to  be  defined  in  the generated code, but outside by
  277.           yourself. Activated automaticaly by  the  function_PURE
  278.           symbols.
  279.  
  280.      ECHO_CODE
  281.  
  282.      INPUT_CODE
  283.  
  284.      FATAL_ERROR_CODE
  285.  
  286.      WRAP_CODE
  287.           Give the body code of the  corresponding  member  func-
  288.           tion.  default  is  to  implement  standard  behaviour.
  289.           Ignored  if  function_PURE   or   function_NOCODE   are
  290.           defined.
  291.  
  292.      CONSTRUCTOR_PARAM
  293.           List of parameters  of  the  constructor.  Dont  allows
  294.           default value.
  295.  
  296.      CONSTRUCTOR_INIT
  297.           List of initialisation befor constructor call.  If  not
  298.           empty  dont't  forget  the : before list of initialisa-
  299.           tion.
  300.  
  301.      CONSTRUCTOR_CODE
  302.           Code added after internal initialisations in  construc-
  303.           tor.
  304.  
  305.      DESTRUCTOR_CODE
  306.           Code added before internal cleanup in destructor.
  307.  
  308.      IOSTREAM
  309.           If defined,  this  flag  make  flex  use  the  iostream
  310.           library. The behaviour is much the same, but instead of
  311.           FILE *, yyin and yyout are istream  *  and  ostream  *.
  312.           they  point  to  cin and cout by default. Debug message
  313.           and fatal error are printed on cerr. BUFFER  refers  to
  314.           istream  * instead of FILE *. These values are default,
  315.           but like with stdio you can change them with  the  same
  316.           %define. iostream.h is also included.
  317.  
  318.      IFILE
  319.           Type of the structure that represent  IN  file  (yyin).
  320.           Normally  FILE,  or  istream  if  IOSTREAM  is defined.
  321.           BUFFER function use also pointer to this type.
  322.  
  323.      IFILE_DEFAULT
  324.  
  325.  
  326.  
  327. GNU and RDT            Last change: 3/3/93                      5
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. FLEX++(1)                   COMMANDS                    FLEX++(1)
  335.  
  336.  
  337.  
  338.           Initial value of IN (yyin). Normally stdin, or &cin  if
  339.           IOSTREAM is defined.
  340.  
  341.      OFILE
  342.           Type of the structure that represent OUT file  (yyout).
  343.           Normally FILE, or ostream if IOSTREAM is defined.
  344.  
  345.      OFILE_DEFAULT
  346.           Initial value of OUT (yyout). Normally stdout, or &cout
  347.           if IOSTREAM is defined.
  348.  
  349.      ERRFILE
  350.           File handle used to  output  debug  message,  and  also
  351.           fatal  errors. Default is stderr or cerr if IOSTREAM is
  352.           defined.
  353.  
  354. OBSOLETED FUNCTIONS
  355.      yyinput()
  356.           In C++, the member function yyinput() is equivalent  to
  357.           input()  that read one char. It is kept for compatibil-
  358.           ity with old flex behaviour, that replaced in C++  ,the
  359.           function  input()  with  yyinput()  not  to colide with
  360.           stream library. Don't mismatch  it  with  yy_input(char
  361.           *buf,  int  &result, int max_size) which read a bloc to
  362.           be buffered.
  363.  
  364. OBSOLETED PREPROCESSOR SYMBOLS
  365.      if you use new features, the folowing symbols should not  be
  366.      used,  though  they  are  proposed. Incoherence may arise if
  367.      they are defined simultaneously with the new symbol.
  368.  
  369.      YYDECL
  370.           In C only.  Prefer  %define  LEX,  %define  LEX_RETURN,
  371.           %define   LEX_PARAM,   %define   LEX_PARAM_DEF.  Totaly
  372.           ignored with classes, or if you %define  one  of  these
  373.           symbols,  or  the symbol LEX_DEFINED, since it mean you
  374.           use the new ways to redefine yylex  declaration.  Never
  375.           use  it  if  header  are  generated, since the declared
  376.           function would be wrong.
  377.  
  378.      yy_new_buffer
  379.           In C only. Prefer %define CREATE_BUFFER.
  380.  
  381.      YY_CHAR
  382.           like  with  old  flex.  You  should  better   use   the
  383.           %define'ed symbol CHAR, or not use this yourself, since
  384.           you know if you are 8 or 7-bit. Not defined in separate
  385.           header.
  386.  
  387.      FLEX_DEBUG
  388.           Like with old flex. activate trace. prefer the  automa-
  389.           ticaly added %define DEBUG . Defined if debug option -d
  390.  
  391.  
  392.  
  393. GNU and RDT            Last change: 3/3/93                      6
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. FLEX++(1)                   COMMANDS                    FLEX++(1)
  401.  
  402.  
  403.  
  404.           set.
  405.  
  406.      FLEX_SCANNER
  407.           like with old flex. defined in the scanner itself .
  408.  
  409.      YY_END_TOK
  410.           Like with old flex. Indicate the value returned at  end
  411.           by  yylex. Don't redefine it, since it is only informa-
  412.           tive. Value is 0.
  413.  
  414. CONSERVED PREPROCESSOR SYMBOLS
  415.      These symbols are kept, and  cannot  be  defined  elsewhere,
  416.      since  they  control  private  parameters  of  the generated
  417.      parser, or are actually unused. You can #define them to  the
  418.      value  you need, or indirectly to the name of a %define gen-
  419.      erated symbol if you want to be clean.
  420.  
  421.      YY_READ_BUF_SIZE
  422.           Size of read buffer (8192). You  must  undefine  it  to
  423.           redefine it after, like like with old flex.
  424.  
  425.      YY_BUF_SIZE
  426.           Total size of read buffer ( YY_READ_BUF_SIZE *2 ).  You
  427.           must  undefine  it  to  redefine  it  after,  except if
  428.           defined by cpp , like with old flex.
  429.  
  430.      yyterminate()
  431.           like with old flex. default return YY_NULL, that is 0.
  432.  
  433.      YY_BREAK
  434.           Like with old flex. Don't use it, it is  supported  but
  435.           dangerous.
  436.  
  437.      YY_NEW_FILE
  438.           Action to continue scanning with the repopened file  in
  439.           yyin. like with old flex. Normally nor to be changed.
  440.  
  441.      These are used only without classes, and you should redefine
  442.      corresponding  virtual function with classes, instead of the
  443.      macros themselves.
  444.  
  445.      ECHO like with old flex. With classes it is  mapped  to  the
  446.           virtual  function  yy_echo(), and you should not modify
  447.           the macro itself. This name can be changed with %define
  448.           ECHO.
  449.  
  450.      YY_INPUT
  451.           like with old flex. With classes  it  use  the  virtual
  452.           function  yy_input(),  and  you  should  not modify the
  453.           macro itself. This name can  be  changed  with  %define
  454.           INPUT.
  455.  
  456.  
  457.  
  458.  
  459. GNU and RDT            Last change: 3/3/93                      7
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. FLEX++(1)                   COMMANDS                    FLEX++(1)
  467.  
  468.  
  469.  
  470.      YY_FATAL_ERROR
  471.           like with old flex. With classes it is  mapped  to  the
  472.           virtual  function  yy_fatal_error(), and you should not
  473.           modify the macro itself. This name can be changed  with
  474.           %define FATAL_ERROR.
  475.  
  476.      yywrap
  477.           like with old flex. With classes it is  mapped  to  the
  478.           virtual  function  yy_wrap(), and you should not modify
  479.           the macro itself. This name can be changed with %define
  480.           WRAP.
  481.  
  482. OTHER ADDED PREPROCESSOR SYMBOLS
  483.      YY_USE_CLASS
  484.           indicate that class will be produced. Default if C++.
  485.  
  486. C++ CLASS GENERATED
  487.      To simplify the notation, we note %SYMBOLNAME the preproces-
  488.      sor  symbol  generated  with a %define of this name. In fact
  489.      see the use of %define for it's real name.
  490.  
  491.      Note that there is sometime symbols that differ from only an
  492.      underscore  _,  like  yywrap and yy_wrap. They are much dif-
  493.      ferent. In this case yy_wrap() is a virtual member function,
  494.      and yywrap() is a macro.
  495.  
  496.   General Class declaration
  497.      // Here is the declaration made in the header
  498.  
  499.      class %CLASS %INHERIT
  500.  
  501.      {
  502.  
  503.      private:/* data */
  504.  
  505.      // Secret, don't use.
  506.  
  507.      private: /* functions */
  508.  
  509.      void yy_initialize();
  510.  
  511.      int input();
  512.  
  513.      int yyinput() {return input();};
  514.  
  515.      void yyunput( %CHAR c, %CHAR *buf_ptr );
  516.  
  517.      // Others are secret, don't use.
  518.  
  519.      protected:/* non virtual */
  520.  
  521.  
  522.  
  523.  
  524.  
  525. GNU and RDT            Last change: 3/3/93                      8
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. FLEX++(1)                   COMMANDS                    FLEX++(1)
  533.  
  534.  
  535.  
  536.      YY_BUFFER_STATE %CURRENT_BUFFER;
  537.  
  538.      void %RESTART ( FILE *input_file );
  539.  
  540.      void %SWITCH_TO_BUFFER( YY_BUFFER_STATE new_buffer );
  541.  
  542.      void %LOAD_BUFFER_STATE( void );
  543.  
  544.      YY_BUFFER_STATE %CREATE_BUFFER( FILE *file, int size );
  545.  
  546.      void %DELETE_BUFFER( YY_BUFFER_STATE b );
  547.  
  548.      void %INIT_BUFFER( YY_BUFFER_STATE b, FILE *file );
  549.  
  550.      protected: /* virtual */
  551.  
  552.      // these 4 virtual function may be declared PURE (=0),  with
  553.      the symbols like %ECHO_PURE,...
  554.  
  555.      // these 4 virtual function may not be defined in  the  gen-
  556.      erated code, with the symbol like %ECHO_NOCODE,...
  557.  
  558.      // these 4 virtual function  may  be  defined  with  another
  559.      code, with the symbol like ECHO_CODE,...
  560.  
  561.      virtual void %ECHO();
  562.  
  563.      virtual int %INPUT(char *buf,int &result,int max_size);
  564.  
  565.      virtual void %FATAL_ERROR(char *msg);
  566.  
  567.      virtual int %WRAP();
  568.  
  569.      public:
  570.  
  571.      %CHAR *%TEXT;
  572.  
  573.      int %LENG;
  574.  
  575.      FILE *%IN, *%OUT;
  576.  
  577.      %LEX_RETURN %LEX ( %LEX_PARAM);
  578.  
  579.      %CLASS(%CONSTRUCTOR_PARAM) ;
  580.  
  581.      ~%CLASS() ;
  582.  
  583.      #if %DEBUG != 0
  584.  
  585.      int %DEBUG_FLAG;
  586.  
  587.  
  588.  
  589.  
  590.  
  591. GNU and RDT            Last change: 3/3/93                      9
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. FLEX++(1)                   COMMANDS                    FLEX++(1)
  599.  
  600.  
  601.  
  602.      #endif
  603.  
  604.      public: /* added members */
  605.  
  606.      %MEMBERS
  607.  
  608.      };
  609.  
  610.      // this is the code for the virtual function
  611.  
  612.      // may be disabled with symbol like ECHO_PURE or ECHO_NOCODE
  613.  
  614.      void %CLASS::%ECHO() // echo the current token
  615.  
  616.      {%ECHO_CODE}
  617.  
  618.      int %CLASS::%INPUT(char * buffer,int  &result,int  max_size)
  619.      // read a bloc of text
  620.  
  621.      {%INPUT_CODE}
  622.  
  623.      void %CLASS::%FATAL_ERROR(char *msg) // print a fatal error
  624.  
  625.      {%FATAL_ERROR_CODE}
  626.  
  627.      int %CLASS::%WRAP() // decide if we must stop input, or con-
  628.      tinue
  629.  
  630.      {%WRAP_CODE}
  631.  
  632.   Default Class declaration
  633.      // Here is the default declaration made in the  header  when
  634.      you %define nothing
  635.  
  636.      class lexer
  637.  
  638.      {
  639.  
  640.      private:/* data */
  641.  
  642.      // Secret, don't use.
  643.  
  644.      private: /* functions */
  645.  
  646.      void yy_initialize();
  647.  
  648.      int input();
  649.  
  650.      int yyinput() {return input();};
  651.  
  652.      void yyunput( unsigned char c, unsigned char *buf_ptr );
  653.  
  654.  
  655.  
  656.  
  657. GNU and RDT            Last change: 3/3/93                     10
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664. FLEX++(1)                   COMMANDS                    FLEX++(1)
  665.  
  666.  
  667.  
  668.      // Others are secret, don't use.
  669.  
  670.      protected:/* non virtual */
  671.  
  672.      YY_BUFFER_STATE YY_CURRENT_BUFFER;
  673.  
  674.      void yyrestart ( FILE *input_file );
  675.  
  676.      void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer );
  677.  
  678.      void yy_load_buffer_state( void );
  679.  
  680.      YY_BUFFER_STATE yy_create_buffer( FILE *file, int size );
  681.  
  682.      void yy_delete_buffer( YY_BUFFER_STATE b );
  683.  
  684.      void yy_init_buffer( YY_BUFFER_STATE b, FILE *file );
  685.  
  686.      protected: /* virtual */
  687.  
  688.      virtual void yy_echo();
  689.  
  690.      virtual int yy_input(char *buf,int &result,int max_size);
  691.  
  692.      virtual void yy_fatal_error(char *msg);
  693.  
  694.      virtual int yy_wrap();
  695.  
  696.      public:
  697.  
  698.      unsigned char *yytext;
  699.  
  700.      int yyleng;
  701.  
  702.      FILE *yyin, *yyout;
  703.  
  704.      int yylex ( void);
  705.  
  706.      lexer() ;
  707.  
  708.      ~lexer() ;
  709.  
  710.      #if YY_lexer_DEBUG != 0
  711.  
  712.      int yy_flex_debug;
  713.  
  714.      #endif
  715.  
  716.      public: /* added members */
  717.  
  718.      };
  719.  
  720.  
  721.  
  722.  
  723. GNU and RDT            Last change: 3/3/93                     11
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. FLEX++(1)                   COMMANDS                    FLEX++(1)
  731.  
  732.  
  733.  
  734.      // this is the code for the virtual function
  735.  
  736.      void lexer::yy_echo() // echo the current token
  737.  
  738.      {fwrite( (char *) yytext, yyleng, 1, yyout );}
  739.  
  740.      int lexer::yy_input(char * buffer,int &result,int  max_size)
  741.      // read a bloc of text
  742.  
  743.      {return result= fread( buffer, 1,max_size, yyin );}
  744.  
  745.      void lexer::yy_fatal_error(char *msg) // print a fatal error
  746.  
  747.      {fputs( msg, stderr );putc( 'n', stderr );exit( 1 );}
  748.  
  749.      int lexer::yy_wrap() // decide if we  must  stop  input,  or
  750.      continue
  751.  
  752.      {return 1;}
  753.  
  754. USAGE
  755.      Should replace flex, because it generate  a  far  more  cus-
  756.      tomisable parser, with header, still beeing compatible.
  757.  
  758.      You should always use the header facility.
  759.  
  760.      Use it with bison++ (same author).
  761.  
  762. EXEMPLES
  763.      flex++ use itself to generate it's scanner. It is full  com-
  764.      patible with classic flex.
  765.  
  766.      This man page has been produced through a parser made in C++
  767.      with this version of flex++ and our version of bison++ (same
  768.      author).
  769.  
  770. FILES
  771.      flexskel.cc
  772.           main skeleton.
  773.  
  774.      flexskel.h
  775.           header skeleton.
  776.  
  777. ENVIRONNEMENT
  778. DIAGNOSTICS
  779. SEE ALSO
  780.      flex(1),flexdoc(1),bison++(1).
  781.  
  782. DOCUMENTATION
  783. BUGS
  784.      Tell us more !
  785.  
  786.  
  787.  
  788.  
  789. GNU and RDT            Last change: 3/3/93                     12
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796. FLEX++(1)                   COMMANDS                    FLEX++(1)
  797.  
  798.  
  799.  
  800.      Because flex++ put a #include of the generated header in the
  801.      generated  code, the header is necessary, and must be reach-
  802.      able by cpp. use the -g option to  change  the  pathname  of
  803.      this  file.  Problems  arise when the header is generated in
  804.      another directory, or is moved.
  805.  
  806.      Parameters are richer than before, and nothing  is  removed.
  807.      POSIX compliance can be enforced by not using extensions. If
  808.      you want to forbide them, there is a good job for you.
  809.  
  810.      The grammar file scanner now support any EndOfLine  sequence
  811.      (CR, LF, CRLF), event inside the same file. So dont worry if
  812.      it accept files from MSDOS, MacIntosh, and UNIX,  with  nei-
  813.      ther any message nor any problem. This is not a bug.
  814.  
  815.      The automatic %define symbols FLEX_DEBUG,  FLEX_SCANNER  and
  816.      CHAR, are added only after the %name directive, or at the %%
  817.      between section 1 and 2. You cannot use them before, neither
  818.      in  %header{,  nor  %{.  A good practice is to always give a
  819.      name, and to give it at first. The old #define  symbols  are
  820.      still defined at top for backward compatibility.
  821.  
  822. FUTUR WORKS
  823.      tell us !
  824.  
  825.      POSIX compliance. is'nt it good now ?
  826.  
  827.      compatibility with flex 2.4 ? possible ?
  828.  
  829. INSTALLATION
  830.      With this install the executable is named flex++. rename  it
  831.      flex  if  you  want,  because it could replace flex. Another
  832.      good name, could ne flex_pp like Dos version use.
  833.  
  834. TESTS
  835. AUTHORS
  836.      Alain Coetmeur (coetmeur@icdc.fr), R&D  department  (RDT)  ,
  837.      Informatique-CDC, France.
  838.  
  839. RESTRICTIONS
  840.      The words 'we', and 'us' mean the author and colleages,  not
  841.      GNU.  We  don't  have  contacted GNU about this, nowaday. If
  842.      you're in GNU, we are ready to propose it to  you,  and  you
  843.      may tell us what you think about.
  844.  
  845.      Based on GNU version 2.3.8 of flex. Modified by the author.
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855. GNU and RDT            Last change: 3/3/93                     13
  856.  
  857.  
  858.  
  859.