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"
30 #include "rapic_parse.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);\
51 \/IMAGE: {strreturn(IMAGE);}
52 \/IMAGEEND: {strreturn(IMAGEEND);}
53 \/IMAGESCANS: {strreturn(IMAGESCANS);}
54 \/IMAGESIZE: {strreturn(IMAGESIZE);}
55 \/SCAN {strreturn(SCAN);}
56 "\/IMAGEHEADER END:" {strreturn(IMAGEHEADEREND);}
57 COUNTRY: {strreturn(COUNTRY);}
58 NAME: {strreturn(NAME);}
59 STNID: {strreturn(STNID);}
60 LATITUDE: {strreturn(LATITUDE);}
61 LONGITUDE: {strreturn(LONGITUDE);}
62 HEIGHT: {strreturn(HEIGHT);}
63 DATE: {strreturn(DATE);}
64 TIME: {strreturn(TIME);}
65 TIMESTAMP: {strreturn(TIMESTAMP);}
66 VERS: {strreturn(VERS);}
67 FREQUENCY: {strreturn(FREQUENCY);}
68 PRF: {strreturn(PRF);}
69 PULSELENGTH: {strreturn(PULSELENGTH);}
70 RNGRES: {strreturn(RNGRES);}
71 ANGRES: {strreturn(ANGRES);}
72 ANGLERATE: {strreturn(ANGLERATE);}
73 CLEARAIR: {strreturn(CLEARAIR);}
74 VIDRES: {strreturn(VIDRES);}
75 STARTRNG: {strreturn(STARTRNG);}
76 ENDRNG: {strreturn(ENDRNG);}
77 PRODUCT: {strreturn(PRODUCT);}
78 PASS: {strreturn(PASS);}
79 IMGFMT: {strreturn(IMGFMT);}
80 ELEV: {strreturn(ELEV);}
81 VIDEO: {strreturn(VIDEO);}
82 VELLVL: {strreturn(VELLVL);}
83 NYQUIST: {strreturn(NYQUIST);}
84 UNFOLDING: {strreturn(UNFOLDING);}
85 VOLUMETRIC {strreturn(VOLUMETRIC);}
86 NORMAL {strreturn(NORMAL);}
87 [Nn][Oo][Nn][Ee] {strreturn(NONE);}
88 [Oo][Ff] {strreturn(OF);}
89 [Oo][Nn] {strreturn(ON);}
90 [Oo][Ff][Ff] {strreturn(OFF);}
91 [Rr][Ee][Ff][Ll] {strreturn(REFL);}
92 [Vv][Ee][Ll] {strreturn(VEL);}
93 [Uu][Nn][Cc][Oo][Rr][Rr][Ee][Ff][Ll] {strreturn(UNCORREFL);}
94 [Zz][Dd][Rr] {strreturn(ZDR);}
96 [Ww][Ii][Dd][Tt][Hh] {strreturn(WID);}
98 -?[[:digit:]]+ {strreturn(NUMBER);}
99 -?[[:digit:]]*[\.][[:digit:]]+ |
100 -?[[:digit:]]+[\.][[:digit:]]* {strreturn(FLOATNUMBER);}
101 [[][[:digit:]]+[]] {strreturn(BRACKETNUM);}
103 [[:alpha:]]+ {strreturn(ALPHA);}
105 "END RADAR IMAGE" {strreturn(ENDRADARIMAGE);}
109 "@" {BEGIN ATMODE; yymore();}
111 <ATMODE>\n {yymore();}
113 <ATMODE>"\0\0\x1a" {BEGIN INITIAL; yyless(yyleng-1); strreturn(RAYDATA);}
115 : {return(yytext[0]);}