summaryrefslogtreecommitdiffstats
path: root/usr.bin/compile_et/et_lex.lex.l
diff options
context:
space:
mode:
authorcsgr <csgr@FreeBSD.org>1994-09-30 14:50:09 +0000
committercsgr <csgr@FreeBSD.org>1994-09-30 14:50:09 +0000
commit01b6212fdaabac9e7b9fa82f4610187c9500e6f7 (patch)
tree73ad01318d0e095044598ee7117fdd90dcf40d05 /usr.bin/compile_et/et_lex.lex.l
downloadFreeBSD-src-01b6212fdaabac9e7b9fa82f4610187c9500e6f7.zip
FreeBSD-src-01b6212fdaabac9e7b9fa82f4610187c9500e6f7.tar.gz
Initial import of eBones.
(Including all changes for FreeBSD - importing the original eBones distribution would be too complex at this stage, since I don't have access to Piero's CVS.) (If you want to include eBones in your system, don't forget to include MAKE_EBONES in /etc/make.conf.) (This stuff is now also suppable from braae.ru.ac.za.) Bones originally from MIT SIPB. Original port to FreeBSD 1.x by Piero Serini. Moved to FreeBSD 2.0 by Doug Rabson and Geoff Rehmet. Nice bug fixes from Doug Rabson.
Diffstat (limited to 'usr.bin/compile_et/et_lex.lex.l')
-rw-r--r--usr.bin/compile_et/et_lex.lex.l29
1 files changed, 29 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 0000000..c041819
--- /dev/null
+++ b/usr.bin/compile_et/et_lex.lex.l
@@ -0,0 +1,29 @@
+%{
+extern int yylineno;
+int yylineno = 1;
+%}
+
+PC [^\"\n]
+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 ++yylineno;
+
+\"{PC}*\" { register char *p; yylval.dynstr = ds(yytext+1);
+ if (p=rindex(yylval.dynstr, '"')) *p='\0';
+ return QUOTED_STRING;
+ }
+
+{AN}* { yylval.dynstr = ds(yytext); return STRING; }
+
+#.*\n ++yylineno;
+
+. { return (*yytext); }
+%%
OpenPOWER on IntegriCloud