From 535e73a6cab751c9d9592166b70b2c107beefcb5 Mon Sep 17 00:00:00 2001 From: Benedikt Spranger Date: Mon, 4 Oct 2004 17:10:58 +0000 Subject: BSP: prompt added. --- Makefile.am | 2 +- fpgaedit.l | 1 + fpgaedit.y | 11 ++++++++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 67fbe4a..64acbd0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ bin_PROGRAMS = fpgaedit fpgaedit_SOURCES = fpgaedit_parser.c fpgaedit_parser.h \ - y.tab.c y.tab.h lex.yy.c fpgaedit.c + y.tab.c y.tab.h lex.zz.c fpgaedit.c fpgaedit_CFLAGS = -W -Wall diff --git a/fpgaedit.l b/fpgaedit.l index ff9bdfd..48e2e9c 100644 --- a/fpgaedit.l +++ b/fpgaedit.l @@ -8,6 +8,7 @@ %option pointer %option nodefault %option case-insensitive +%option prefix="zz" %{ /* need this for the call to atol() below */ diff --git a/fpgaedit.y b/fpgaedit.y index c2b59ea..dac18ad 100644 --- a/fpgaedit.y +++ b/fpgaedit.y @@ -26,7 +26,8 @@ void hex_output (int offset, int len, int count); void print_help (void); extern void yyerror (const char *s); -extern int yylex (void); +extern int zzlex (void); +int yylex (void); %} %union { @@ -53,8 +54,7 @@ char *tptr; %left EQ %token EXIT %token HELP -%token CR - +%right CR %type num @@ -255,4 +255,9 @@ void hex_output (int offset, int len, int count) { else printf ("please open file\n"); return; +} + +int yylex (void) { + printf ("\nPROMPT>"); + zzlex (); } \ No newline at end of file -- cgit v1.2.3