home *** CD-ROM | disk | FTP | other *** search
- %{
- /*
- * Module: orbits.l
- * Creation: 28th July, 1991.
- * Last modified: 6th October, 1991.
- *
- * Copyright (C) 1991 Neil Hoggarth.
- *
- * This file contains instructions to the "lex" lexical analyzer
- * generator, or some compatible genarator. The file produced by the
- * generator contains C source code for the lexical analyzer for the
- * "orbits" program.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
- #include <stdlib.h>
- #include "orbpar.h"
- extern int yyline;
- %}
-
- %%
-
- #.*"\n" {yyline++;return(RETURN);};
- (\+|\-)?[0-9]+ return(NUM);
- (\+|\-)?[0-9]*\.[0-9]+ return(NUM);
- [ \t] ;
- "\n" {yyline++;return(RETURN);};
- . return(yytext[0]);
-
- %%
-