summaryrefslogtreecommitdiff
path: root/usr.bin/compile_et/et_lex.lex.l
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1996-11-11 05:06:36 +0000
committerJason Downs <downsj@cvs.openbsd.org>1996-11-11 05:06:36 +0000
commita4f6825be19698107b11e5e6ad18430e06b83914 (patch)
treecbeb687a8d4e1c3b29ac1d5b159605b970ba705e /usr.bin/compile_et/et_lex.lex.l
parent066a987bf16f54e03a964424714abf17c430d1fb (diff)
compile_et now resides in /usr/libexec.
Diffstat (limited to 'usr.bin/compile_et/et_lex.lex.l')
-rw-r--r--usr.bin/compile_et/et_lex.lex.l31
1 files changed, 31 insertions, 0 deletions
diff --git a/usr.bin/compile_et/et_lex.lex.l b/usr.bin/compile_et/et_lex.lex.l
new file mode 100644
index 00000000000..e7d92d497c4
--- /dev/null
+++ b/usr.bin/compile_et/et_lex.lex.l
@@ -0,0 +1,31 @@
+%{
+ unsigned lineno = 1;
+%}
+
+PC [^\"]
+AN [A-Z_a-z0-9]
+%%
+
+error_table return ERROR_TABLE;
+et return ERROR_TABLE;
+error_code return ERROR_CODE_ENTRY;
+ec return ERROR_CODE_ENTRY;
+end return END;
+
+[\t ] ;
+\n ++lineno;
+
+\"{PC}*\" { register char *p; yylval.dynstr = ds(yytext+1);
+ if (p=strrchr(yylval.dynstr, '"')) *p='\0';
+ return QUOTED_STRING;
+ }
+
+{AN}* { yylval.dynstr = ds(yytext); return STRING; }
+
+#.*\n ++lineno;
+
+. { return (*yytext); }
+%%
+#ifndef lint
+static char rcsid_et_lex_lex_l[] = "$Id: et_lex.lex.l,v 1.1 1996/11/11 05:06:35 downsj Exp $";
+#endif