3 This is the TRMM Office Radar Software Library.
4 Copyright (C) 1996, 1997, 1998
6 Space Applications Corporation
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public
11 License as published by the Free Software Foundation; either
12 version 2 of the License, or (at your option) any later version.
14 This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Library General Public License for more details.
19 You should have received a copy of the GNU Library General Public
20 License along with this library; if not, write to the Free
21 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 * 2/18/98 - John Merritt
29 #include "rapic_routines.h"
34 fprintf(stderr, "LEX len=%d text=<", yyleng);\
35 binprint(yytext, yyleng);\
36 fprintf(stderr, "> token=[%d]\n", x);\
38 #define strreturn(x) rapiclval.token.s = calloc(yyleng+1, sizeof(char));\
39 rapiclval.token.len=yyleng;\
40 memcpy(rapiclval.token.s, yytext, yyleng);\
50 \/IMAGE: {strreturn(IMAGE);}
51 \/IMAGEEND: {strreturn(IMAGEEND);}
52 \/IMAGESCANS: {strreturn(IMAGESCANS);}
53 \/IMAGESIZE: {strreturn(IMAGESIZE);}
54 \/SCAN {strreturn(SCAN);}
55 "\/IMAGEHEADER END:" {strreturn(IMAGEHEADEREND);}
56 COUNTRY: {strreturn(COUNTRY);}
57 NAME: {strreturn(NAME);}
58 STNID: {strreturn(STNID);}
59 LATITUDE: {strreturn(LATITUDE);}
60 LONGITUDE: {strreturn(LONGITUDE);}
61 HEIGHT: {strreturn(HEIGHT);}
62 DATE: {strreturn(DATE);}
63 TIME: {strreturn(TIME);}
64 TIMESTAMP: {strreturn(TIMESTAMP);}
65 VERS: {strreturn(VERS);}
66 FREQUENCY: {strreturn(FREQUENCY);}
67 PRF: {strreturn(PRF);}
68 PULSELENGTH: {strreturn(PULSELENGTH);}
69 RNGRES: {strreturn(RNGRES);}
70 ANGRES: {strreturn(ANGRES);}
71 ANGLERATE: {strreturn(ANGLERATE);}
72 CLEARAIR: {strreturn(CLEARAIR);}
73 VIDRES: {strreturn(VIDRES);}
74 STARTRNG: {strreturn(STARTRNG);}
75 ENDRNG: {strreturn(ENDRNG);}
76 PRODUCT: {strreturn(PRODUCT);}
77 PASS: {strreturn(PASS);}
78 IMGFMT: {strreturn(IMGFMT);}
79 ELEV: {strreturn(ELEV);}
80 VIDEO: {strreturn(VIDEO);}
81 VELLVL: {strreturn(VELLVL);}
82 NYQUIST: {strreturn(NYQUIST);}
83 UNFOLDING: {strreturn(UNFOLDING);}
84 VOLUMETRIC {strreturn(VOLUMETRIC);}
85 NORMAL {strreturn(NORMAL);}
86 [Nn][Oo][Nn][Ee] {strreturn(NONE);}
87 [Oo][Ff] {strreturn(OF);}
88 [Oo][Nn] {strreturn(ON);}
89 [Oo][Ff][Ff] {strreturn(OFF);}
90 [Rr][Ee][Ff][Ll] {strreturn(REFL);}
91 [Vv][Ee][Ll] {strreturn(VEL);}
92 [Uu][Nn][Cc][Oo][Rr][Rr][Ee][Ff][Ll] {strreturn(UNCORREFL);}
93 [Zz][Dd][Rr] {strreturn(ZDR);}
95 [Ww][Ii][Dd][Tt][Hh] {strreturn(WID);}
97 -?[[:digit:]]+ {strreturn(NUMBER);}
98 -?[[:digit:]]*[\.][[:digit:]]+ |
99 -?[[:digit:]]+[\.][[:digit:]]* {strreturn(FLOATNUMBER);}
100 [[][[:digit:]]+[]] {strreturn(BRACKETNUM);}
102 [[:alpha:]]+ {strreturn(ALPHA);}
104 "END RADAR IMAGE" {strreturn(ENDRADARIMAGE);}
108 "@" {BEGIN ATMODE; yymore();}
110 <ATMODE>\n {yymore();}
112 <ATMODE>"\0\0\x1a" {BEGIN INITIAL; yyless(yyleng-1); strreturn(RAYDATA);}
114 : {return(yytext[0]);}