Subversion Repositories Code-Repo

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
141 Kevin 1
/*
2
 * Tokens for esh.
3
 *
4
 * Developed by Godmar Back for CS 3214 Fall 2009
5
 * Virginia Tech.
6
 */
7
%{
8
#include <string.h>
9
 
10
/* lex.yy.c uses 'ECHO;' which is in termbits.h defined as 0x10 
11
 * undefine this to avoid 'useless statement' warning. 
12
 */
13
#ifdef ECHO
14
#undef ECHO
15
#endif /* ECHO */
16
%}
17
%%
18
[ \t]*		;
19
">>"		return GREATER_GREATER;
20
[|&;<>\n]	return *yytext;
21
[^|&;<>\n\t ]+ 	{ yylval.word = strdup(yytext); return WORD; }
22
%%