blob: af67ff9614a2096c0fd7fe814e90c59720044ffc [file] [log] [blame]
David Reissea2cba82009-03-30 21:35:00 +00001/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
Mark Sleee9ce01c2007-05-16 02:29:53 +00009 *
David Reissea2cba82009-03-30 21:35:00 +000010 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
Mark Sleee9ce01c2007-05-16 02:29:53 +000018 */
19
20/**
Mark Slee31985722006-05-24 21:45:31 +000021 * Thrift scanner.
Mark Slee27ed6ec2007-08-16 01:26:31 +000022 *
Mark Slee31985722006-05-24 21:45:31 +000023 * Tokenizes a thrift definition file.
Mark Slee31985722006-05-24 21:45:31 +000024 */
Mark Sleef5377b32006-10-10 01:42:59 +000025
Mark Slee31985722006-05-24 21:45:31 +000026%{
27
Christian Lavoieaf65f1b2010-11-24 21:58:05 +000028/* This is redundant with some of the flags in Makefile.am, but it works
29 * when people override CXXFLAGS without being careful. The pragmas are
30 * the 'right' way to do it, but don't work on old-enough GCC (in particular
31 * the GCC that ship on Mac OS X 10.6.5, *counter* to what the GNU docs say)
32 *
33 * We should revert the Makefile.am changes once Apple ships a reasonable
34 * GCC.
35 */
Ben Craige9576752013-10-11 08:19:16 -050036#ifdef __GNUC__
Roger Meier3b771a12010-11-17 22:11:26 +000037#pragma GCC diagnostic ignored "-Wunused-function"
38#pragma GCC diagnostic ignored "-Wunused-label"
Ben Craige9576752013-10-11 08:19:16 -050039#endif
40
41#ifdef _MSC_VER
42//warning C4102: 'find_rule' : unreferenced label
43#pragma warning(disable:4102)
44//avoid isatty redefinition
45#define YY_NEVER_INTERACTIVE 1
46#endif
Roger Meier3b771a12010-11-17 22:11:26 +000047
Jens Geyer8cd3efe2013-09-16 22:17:52 +020048#include <cassert>
David Reiss82e6fc02009-03-26 23:32:36 +000049#include <string>
David Reissf1454162008-06-30 20:45:47 +000050#include <errno.h>
Roger Meier9212e792012-06-12 21:01:06 +000051#include <stdlib.h>
David Reissf1454162008-06-30 20:45:47 +000052
Ben Craige9576752013-10-11 08:19:16 -050053#ifdef _MSC_VER
54#include "windows/config.h"
Roger Meier3974aab2014-07-14 20:22:12 +020055#else
Roger Meier57e6de42014-07-16 10:19:59 +020056#ifndef _WIN32
Roger Meier3974aab2014-07-14 20:22:12 +020057#include "config.h"
Ben Craige9576752013-10-11 08:19:16 -050058#endif
Roger Meier57e6de42014-07-16 10:19:59 +020059#endif
Mark Slee31985722006-05-24 21:45:31 +000060#include "main.h"
David Reisscbd4bac2007-08-14 17:12:33 +000061#include "globals.h"
Mark Slee31985722006-05-24 21:45:31 +000062#include "parse/t_program.h"
63
Mark Sleef5377b32006-10-10 01:42:59 +000064/**
65 * Must be included AFTER parse/t_program.h, but I can't remember why anymore
66 * because I wrote this a while ago.
67 */
jfarrell4f54d132014-07-10 09:23:43 -040068#if defined(BISON_USE_PARSER_H_EXTENSION)
jfarrell92f24b22013-08-17 15:47:13 -040069#include "thrifty.h"
jfarrell4f54d132014-07-10 09:23:43 -040070#else
71#include "thrifty.hh"
72#endif
Mark Slee31985722006-05-24 21:45:31 +000073
Mark Sleef12865a2007-01-12 00:23:26 +000074void thrift_reserved_keyword(char* keyword) {
75 yyerror("Cannot use reserved language keyword: \"%s\"\n", keyword);
76 exit(1);
77}
78
David Reissf1454162008-06-30 20:45:47 +000079void integer_overflow(char* text) {
80 yyerror("This integer is too big: \"%s\"\n", text);
81 exit(1);
82}
83
Bryan Duxbury235f8b52011-08-19 18:27:47 +000084void unexpected_token(char* text) {
85 yyerror("Unexpected token in input: \"%s\"\n", text);
86 exit(1);
87}
88
Mark Slee31985722006-05-24 21:45:31 +000089%}
90
Mark Sleef5377b32006-10-10 01:42:59 +000091/**
92 * Provides the yylineno global, useful for debugging output
93 */
Mark Slee27ed6ec2007-08-16 01:26:31 +000094%option lex-compat
Mark Slee31985722006-05-24 21:45:31 +000095
Mark Slee27ed6ec2007-08-16 01:26:31 +000096/**
David Reiss4563acd2010-08-31 16:51:29 +000097 * Our inputs are all single files, so no need for yywrap
98 */
99%option noyywrap
100
101/**
Christian Lavoie77215d82010-11-07 19:42:48 +0000102 * We don't use it, and it fires up warnings at -Wall
103 */
104%option nounput
105
106/**
Mark Sleef5377b32006-10-10 01:42:59 +0000107 * Helper definitions, comments, constants, and whatnot
108 */
109
Mark Sleebd588222007-11-21 08:43:35 +0000110intconstant ([+-]?[0-9]+)
111hexconstant ("0x"[0-9A-Fa-f]+)
112dubconstant ([+-]?[0-9]*(\.[0-9]+)?([eE][+-]?[0-9]+)?)
Carl Yeksigiande074082013-06-04 04:28:31 -0400113identifier ([a-zA-Z_](\.[a-zA-Z_0-9]|[a-zA-Z_0-9])*)
Mark Sleebd588222007-11-21 08:43:35 +0000114whitespace ([ \t\r\n]*)
115sillycomm ("/*""*"*"*/")
116multicomm ("/*"[^*]"/"*([^*/]|[^*]"/"|"*"[^/])*"*"*"*/")
117doctext ("/**"([^*/]|[^*]"/"|"*"[^/])*"*"*"*/")
118comment ("//"[^\n]*)
119unixcomment ("#"[^\n]*)
120symbol ([:;\,\{\}\(\)\=<>\[\]])
Carl Yeksigiande074082013-06-04 04:28:31 -0400121st_identifier ([a-zA-Z-](\.[a-zA-Z_0-9-]|[a-zA-Z_0-9-])*)
David Reiss82e6fc02009-03-26 23:32:36 +0000122literal_begin (['\"])
Mark Slee31985722006-05-24 21:45:31 +0000123
124%%
125
Mark Sleebd588222007-11-21 08:43:35 +0000126{whitespace} { /* do nothing */ }
127{sillycomm} { /* do nothing */ }
128{multicomm} { /* do nothing */ }
129{comment} { /* do nothing */ }
130{unixcomment} { /* do nothing */ }
Mark Slee31985722006-05-24 21:45:31 +0000131
Mark Sleebd588222007-11-21 08:43:35 +0000132{symbol} { return yytext[0]; }
Roger Meier0c3c8952011-08-22 21:38:16 +0000133"*" { return yytext[0]; }
Mark Slee9cb7c612006-09-01 22:17:45 +0000134
Bryan Duxbury6c928f32011-10-13 21:32:52 +0000135"false" { yylval.iconst=0; return tok_int_constant; }
136"true" { yylval.iconst=1; return tok_int_constant; }
137
Mark Sleebd588222007-11-21 08:43:35 +0000138"namespace" { return tok_namespace; }
139"cpp_namespace" { return tok_cpp_namespace; }
140"cpp_include" { return tok_cpp_include; }
141"cpp_type" { return tok_cpp_type; }
142"java_package" { return tok_java_package; }
143"cocoa_prefix" { return tok_cocoa_prefix; }
David Reiss7f42bcf2008-01-11 20:59:12 +0000144"csharp_namespace" { return tok_csharp_namespace; }
Jake Farrell7ae13e12011-10-18 14:35:26 +0000145"delphi_namespace" { return tok_delphi_namespace; }
Mark Sleebd588222007-11-21 08:43:35 +0000146"php_namespace" { return tok_php_namespace; }
147"py_module" { return tok_py_module; }
148"perl_package" { return tok_perl_package; }
149"ruby_namespace" { return tok_ruby_namespace; }
150"smalltalk_category" { return tok_smalltalk_category; }
David Reiss15457c92007-12-14 07:03:03 +0000151"smalltalk_prefix" { return tok_smalltalk_prefix; }
Mark Sleebd588222007-11-21 08:43:35 +0000152"xsd_all" { return tok_xsd_all; }
153"xsd_optional" { return tok_xsd_optional; }
154"xsd_nillable" { return tok_xsd_nillable; }
155"xsd_namespace" { return tok_xsd_namespace; }
156"xsd_attrs" { return tok_xsd_attrs; }
157"include" { return tok_include; }
158"void" { return tok_void; }
159"bool" { return tok_bool; }
160"byte" { return tok_byte; }
161"i16" { return tok_i16; }
162"i32" { return tok_i32; }
163"i64" { return tok_i64; }
164"double" { return tok_double; }
165"string" { return tok_string; }
166"binary" { return tok_binary; }
Jens Geyer0ca234f2013-06-04 22:01:47 +0200167"slist" {
168 pwarning(0, "\"slist\" is deprecated and will be removed in a future compiler version. This type should be replaced with \"string\".\n");
169 return tok_slist;
170}
Carl Yeksigianc3178522013-06-07 12:31:13 -0400171"senum" {
172 pwarning(0, "\"senum\" is deprecated and will be removed in a future compiler version. This type should be replaced with \"string\".\n");
173 return tok_senum;
174}
Mark Sleebd588222007-11-21 08:43:35 +0000175"map" { return tok_map; }
176"list" { return tok_list; }
177"set" { return tok_set; }
David Reisscecbed82009-03-24 20:02:22 +0000178"oneway" { return tok_oneway; }
Mark Sleebd588222007-11-21 08:43:35 +0000179"typedef" { return tok_typedef; }
180"struct" { return tok_struct; }
Bryan Duxburyab3666e2009-09-01 23:03:47 +0000181"union" { return tok_union; }
Mark Sleebd588222007-11-21 08:43:35 +0000182"exception" { return tok_xception; }
183"extends" { return tok_extends; }
184"throws" { return tok_throws; }
185"service" { return tok_service; }
186"enum" { return tok_enum; }
187"const" { return tok_const; }
188"required" { return tok_required; }
189"optional" { return tok_optional; }
David Reisscecbed82009-03-24 20:02:22 +0000190"async" {
191 pwarning(0, "\"async\" is deprecated. It is called \"oneway\" now.\n");
192 return tok_oneway;
193}
Jens Geyer885c6792014-05-02 21:31:55 +0200194"&" { return tok_reference; }
Mark Sleef0712dc2006-10-25 19:03:57 +0000195
Mark Slee52f643d2006-08-09 00:03:43 +0000196
Bryan Duxbury7f3285e2010-08-05 23:28:14 +0000197"BEGIN" { thrift_reserved_keyword(yytext); }
198"END" { thrift_reserved_keyword(yytext); }
199"__CLASS__" { thrift_reserved_keyword(yytext); }
200"__DIR__" { thrift_reserved_keyword(yytext); }
201"__FILE__" { thrift_reserved_keyword(yytext); }
202"__FUNCTION__" { thrift_reserved_keyword(yytext); }
203"__LINE__" { thrift_reserved_keyword(yytext); }
204"__METHOD__" { thrift_reserved_keyword(yytext); }
205"__NAMESPACE__" { thrift_reserved_keyword(yytext); }
Mark Sleebd588222007-11-21 08:43:35 +0000206"abstract" { thrift_reserved_keyword(yytext); }
Bryan Duxbury7f3285e2010-08-05 23:28:14 +0000207"alias" { thrift_reserved_keyword(yytext); }
Mark Sleebd588222007-11-21 08:43:35 +0000208"and" { thrift_reserved_keyword(yytext); }
Mark Sleec27fc312007-12-21 23:52:19 +0000209"args" { thrift_reserved_keyword(yytext); }
Mark Sleebd588222007-11-21 08:43:35 +0000210"as" { thrift_reserved_keyword(yytext); }
211"assert" { thrift_reserved_keyword(yytext); }
Bryan Duxbury7f3285e2010-08-05 23:28:14 +0000212"begin" { thrift_reserved_keyword(yytext); }
Mark Sleebd588222007-11-21 08:43:35 +0000213"break" { thrift_reserved_keyword(yytext); }
214"case" { thrift_reserved_keyword(yytext); }
Bryan Duxbury7f3285e2010-08-05 23:28:14 +0000215"catch" { thrift_reserved_keyword(yytext); }
Mark Sleebd588222007-11-21 08:43:35 +0000216"class" { thrift_reserved_keyword(yytext); }
Bryan Duxbury7f3285e2010-08-05 23:28:14 +0000217"clone" { thrift_reserved_keyword(yytext); }
Mark Sleebd588222007-11-21 08:43:35 +0000218"continue" { thrift_reserved_keyword(yytext); }
219"declare" { thrift_reserved_keyword(yytext); }
220"def" { thrift_reserved_keyword(yytext); }
221"default" { thrift_reserved_keyword(yytext); }
222"del" { thrift_reserved_keyword(yytext); }
223"delete" { thrift_reserved_keyword(yytext); }
224"do" { thrift_reserved_keyword(yytext); }
Bryan Duxbury7f3285e2010-08-05 23:28:14 +0000225"dynamic" { thrift_reserved_keyword(yytext); }
Mark Sleebd588222007-11-21 08:43:35 +0000226"elif" { thrift_reserved_keyword(yytext); }
227"else" { thrift_reserved_keyword(yytext); }
228"elseif" { thrift_reserved_keyword(yytext); }
Bryan Duxbury7f3285e2010-08-05 23:28:14 +0000229"elsif" { thrift_reserved_keyword(yytext); }
230"end" { thrift_reserved_keyword(yytext); }
231"enddeclare" { thrift_reserved_keyword(yytext); }
232"endfor" { thrift_reserved_keyword(yytext); }
233"endforeach" { thrift_reserved_keyword(yytext); }
234"endif" { thrift_reserved_keyword(yytext); }
235"endswitch" { thrift_reserved_keyword(yytext); }
236"endwhile" { thrift_reserved_keyword(yytext); }
237"ensure" { thrift_reserved_keyword(yytext); }
Mark Sleebd588222007-11-21 08:43:35 +0000238"except" { thrift_reserved_keyword(yytext); }
239"exec" { thrift_reserved_keyword(yytext); }
Mark Sleebd588222007-11-21 08:43:35 +0000240"finally" { thrift_reserved_keyword(yytext); }
241"float" { thrift_reserved_keyword(yytext); }
242"for" { thrift_reserved_keyword(yytext); }
243"foreach" { thrift_reserved_keyword(yytext); }
244"function" { thrift_reserved_keyword(yytext); }
245"global" { thrift_reserved_keyword(yytext); }
246"goto" { thrift_reserved_keyword(yytext); }
247"if" { thrift_reserved_keyword(yytext); }
248"implements" { thrift_reserved_keyword(yytext); }
249"import" { thrift_reserved_keyword(yytext); }
250"in" { thrift_reserved_keyword(yytext); }
251"inline" { thrift_reserved_keyword(yytext); }
252"instanceof" { thrift_reserved_keyword(yytext); }
253"interface" { thrift_reserved_keyword(yytext); }
254"is" { thrift_reserved_keyword(yytext); }
255"lambda" { thrift_reserved_keyword(yytext); }
Bryan Duxbury7f3285e2010-08-05 23:28:14 +0000256"module" { thrift_reserved_keyword(yytext); }
Mark Sleebd588222007-11-21 08:43:35 +0000257"native" { thrift_reserved_keyword(yytext); }
258"new" { thrift_reserved_keyword(yytext); }
Bryan Duxbury7f3285e2010-08-05 23:28:14 +0000259"next" { thrift_reserved_keyword(yytext); }
260"nil" { thrift_reserved_keyword(yytext); }
Mark Sleebd588222007-11-21 08:43:35 +0000261"not" { thrift_reserved_keyword(yytext); }
262"or" { thrift_reserved_keyword(yytext); }
263"pass" { thrift_reserved_keyword(yytext); }
264"public" { thrift_reserved_keyword(yytext); }
265"print" { thrift_reserved_keyword(yytext); }
266"private" { thrift_reserved_keyword(yytext); }
267"protected" { thrift_reserved_keyword(yytext); }
Bryan Duxbury7f3285e2010-08-05 23:28:14 +0000268"public" { thrift_reserved_keyword(yytext); }
Mark Sleebd588222007-11-21 08:43:35 +0000269"raise" { thrift_reserved_keyword(yytext); }
Bryan Duxbury7f3285e2010-08-05 23:28:14 +0000270"redo" { thrift_reserved_keyword(yytext); }
271"rescue" { thrift_reserved_keyword(yytext); }
272"retry" { thrift_reserved_keyword(yytext); }
Mark Sleef5a0b3d2009-08-13 19:21:40 +0000273"register" { thrift_reserved_keyword(yytext); }
Mark Sleebd588222007-11-21 08:43:35 +0000274"return" { thrift_reserved_keyword(yytext); }
Bryan Duxbury7f3285e2010-08-05 23:28:14 +0000275"self" { thrift_reserved_keyword(yytext); }
Mark Sleebd588222007-11-21 08:43:35 +0000276"sizeof" { thrift_reserved_keyword(yytext); }
277"static" { thrift_reserved_keyword(yytext); }
Bryan Duxbury7f3285e2010-08-05 23:28:14 +0000278"super" { thrift_reserved_keyword(yytext); }
Mark Sleebd588222007-11-21 08:43:35 +0000279"switch" { thrift_reserved_keyword(yytext); }
280"synchronized" { thrift_reserved_keyword(yytext); }
Bryan Duxbury7f3285e2010-08-05 23:28:14 +0000281"then" { thrift_reserved_keyword(yytext); }
Mark Sleebd588222007-11-21 08:43:35 +0000282"this" { thrift_reserved_keyword(yytext); }
283"throw" { thrift_reserved_keyword(yytext); }
284"transient" { thrift_reserved_keyword(yytext); }
Mark Sleebd588222007-11-21 08:43:35 +0000285"try" { thrift_reserved_keyword(yytext); }
Bryan Duxbury7f3285e2010-08-05 23:28:14 +0000286"undef" { thrift_reserved_keyword(yytext); }
287"union" { thrift_reserved_keyword(yytext); }
288"unless" { thrift_reserved_keyword(yytext); }
Mark Sleebd588222007-11-21 08:43:35 +0000289"unsigned" { thrift_reserved_keyword(yytext); }
Bryan Duxbury7f3285e2010-08-05 23:28:14 +0000290"until" { thrift_reserved_keyword(yytext); }
291"use" { thrift_reserved_keyword(yytext); }
Mark Sleebd588222007-11-21 08:43:35 +0000292"var" { thrift_reserved_keyword(yytext); }
293"virtual" { thrift_reserved_keyword(yytext); }
294"volatile" { thrift_reserved_keyword(yytext); }
Bryan Duxbury7f3285e2010-08-05 23:28:14 +0000295"when" { thrift_reserved_keyword(yytext); }
Mark Sleebd588222007-11-21 08:43:35 +0000296"while" { thrift_reserved_keyword(yytext); }
297"with" { thrift_reserved_keyword(yytext); }
Bryan Duxbury7f3285e2010-08-05 23:28:14 +0000298"xor" { thrift_reserved_keyword(yytext); }
Mark Sleebd588222007-11-21 08:43:35 +0000299"yield" { thrift_reserved_keyword(yytext); }
Mark Sleef12865a2007-01-12 00:23:26 +0000300
Mark Slee4f8da1d2006-10-12 02:47:27 +0000301{intconstant} {
David Reissf1454162008-06-30 20:45:47 +0000302 errno = 0;
303 yylval.iconst = strtoll(yytext, NULL, 10);
304 if (errno == ERANGE) {
305 integer_overflow(yytext);
306 }
Mark Slee4f8da1d2006-10-12 02:47:27 +0000307 return tok_int_constant;
308}
Mark Sleef5377b32006-10-10 01:42:59 +0000309
Mark Slee600cdb32006-11-29 22:06:42 +0000310{hexconstant} {
David Reissf1454162008-06-30 20:45:47 +0000311 errno = 0;
312 yylval.iconst = strtoll(yytext+2, NULL, 16);
313 if (errno == ERANGE) {
314 integer_overflow(yytext);
315 }
Mark Slee600cdb32006-11-29 22:06:42 +0000316 return tok_int_constant;
317}
318
Mark Slee30152872006-11-28 01:24:07 +0000319{dubconstant} {
320 yylval.dconst = atof(yytext);
321 return tok_dub_constant;
322}
323
Mark Slee4f8da1d2006-10-12 02:47:27 +0000324{identifier} {
325 yylval.id = strdup(yytext);
326 return tok_identifier;
327}
328
Mark Sleebd588222007-11-21 08:43:35 +0000329{st_identifier} {
330 yylval.id = strdup(yytext);
331 return tok_st_identifier;
332}
333
David Reiss82e6fc02009-03-26 23:32:36 +0000334{literal_begin} {
335 char mark = yytext[0];
336 std::string result;
337 for(;;)
338 {
339 int ch = yyinput();
340 switch (ch) {
341 case EOF:
342 yyerror("End of file while read string at %d\n", yylineno);
343 exit(1);
344 case '\n':
345 yyerror("End of line while read string at %d\n", yylineno - 1);
346 exit(1);
347 case '\\':
348 ch = yyinput();
349 switch (ch) {
350 case 'r':
351 result.push_back('\r');
352 continue;
353 case 'n':
354 result.push_back('\n');
355 continue;
356 case 't':
357 result.push_back('\t');
358 continue;
359 case '"':
360 result.push_back('"');
361 continue;
362 case '\'':
363 result.push_back('\'');
364 continue;
365 case '\\':
366 result.push_back('\\');
367 continue;
368 default:
369 yyerror("Bad escape character\n");
370 return -1;
371 }
372 break;
373 default:
374 if (ch == mark) {
375 yylval.id = strdup(result.c_str());
376 return tok_literal;
377 } else {
378 result.push_back(ch);
379 }
380 }
381 }
Mark Slee30152872006-11-28 01:24:07 +0000382}
383
Mark Slee31985722006-05-24 21:45:31 +0000384
ccheeverf53b5cf2007-02-05 20:33:11 +0000385{doctext} {
David Reisscbd4bac2007-08-14 17:12:33 +0000386 /* This does not show up in the parse tree. */
387 /* Rather, the parser will grab it out of the global. */
388 if (g_parse_mode == PROGRAM) {
389 clear_doctext();
390 g_doctext = strdup(yytext + 3);
Jens Geyer8cd3efe2013-09-16 22:17:52 +0200391 assert(strlen(g_doctext) >= 2);
392 g_doctext[strlen(g_doctext) - 2] = ' ';
393 g_doctext[strlen(g_doctext) - 1] = '\0';
David Reisscbd4bac2007-08-14 17:12:33 +0000394 g_doctext = clean_up_doctext(g_doctext);
395 g_doctext_lineno = yylineno;
Jens Geyer813749d2014-01-31 23:42:57 +0100396 if( (g_program_doctext_candidate == NULL) && (g_program_doctext_status == INVALID)){
Jens Geyere8379b52014-01-25 00:59:45 +0100397 g_program_doctext_candidate = strdup(g_doctext);
398 g_program_doctext_lineno = g_doctext_lineno;
399 g_program_doctext_status = STILL_CANDIDATE;
Jens Geyer813749d2014-01-31 23:42:57 +0100400 pdebug("%s","program doctext set to STILL_CANDIDATE");
Jens Geyere8379b52014-01-25 00:59:45 +0100401 }
David Reisscbd4bac2007-08-14 17:12:33 +0000402 }
ccheeverf53b5cf2007-02-05 20:33:11 +0000403}
404
Bryan Duxbury235f8b52011-08-19 18:27:47 +0000405. {
406 unexpected_token(yytext);
407}
408
ccheeverf53b5cf2007-02-05 20:33:11 +0000409
David Reissfb790d72010-09-02 16:41:45 +0000410. {
411 /* Catch-all to let us catch "*" in the parser. */
412 return (int) yytext[0];
413}
414
Mark Slee31985722006-05-24 21:45:31 +0000415%%
David Reiss4a054342009-03-26 23:32:27 +0000416
417/* vim: filetype=lex
418*/