home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / o / orbits / !orbits / l / orblex
Text File  |  1991-10-20  |  1KB  |  45 lines

  1. %{
  2.  /*
  3.   * Module:        orbits.l
  4.   * Creation:      28th July, 1991.
  5.   * Last modified: 6th October, 1991.
  6.   *
  7.   * Copyright (C) 1991 Neil Hoggarth.
  8.   *
  9.   *     This file contains instructions to the "lex" lexical analyzer
  10.   * generator, or some compatible genarator. The file produced by the 
  11.   * generator contains C source code for the lexical analyzer for the
  12.   * "orbits" program.
  13.   *
  14.   *   This program is free software; you can redistribute it and/or modify
  15.   *   it under the terms of the GNU General Public License as published by
  16.   *   the Free Software Foundation; either version 1, or (at your option)
  17.   *   any later version.
  18.   *
  19.   *   This program is distributed in the hope that it will be useful,
  20.   *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  21.   *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  22.   *   GNU General Public License for more details.
  23.   *
  24.   *   You should have received a copy of the GNU General Public License
  25.   *   along with this program; if not, write to the Free Software
  26.   *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  27.   *
  28.   */
  29.  
  30. #include <stdlib.h>
  31. #include "orbpar.h"
  32. extern int yyline;
  33. %}
  34.  
  35. %%
  36.  
  37. #.*"\n"                 {yyline++;return(RETURN);};
  38. (\+|\-)?[0-9]+          return(NUM);
  39. (\+|\-)?[0-9]*\.[0-9]+  return(NUM);
  40. [ \t]                   ;
  41. "\n"                    {yyline++;return(RETURN);};
  42. .                       return(yytext[0]);
  43.  
  44. %%
  45.