git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Keith Packard <keithp@keithp.com>
Cc: Jan-Benedict Glaw <jbglaw@lug-owl.de>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: parsecvs tool now creates git repositories
Date: Sun, 2 Apr 2006 21:38:28 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0604022122430.3781@g5.osdl.org> (raw)
In-Reply-To: <1144037456.2303.92.camel@neko.keithp.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2111 bytes --]



On Sun, 2 Apr 2006, Keith Packard wrote:

> On Sun, 2006-04-02 at 21:31 +0200, Jan-Benedict Glaw wrote:
> 
> > lex.l: In function ÿÿparse_dataÿÿ:
> > lex.l:90: error: ÿÿyytext_ptrÿÿ undeclared (first use in this function)
> > lex.l:90: error: (Each undeclared identifier is reported only once
> > lex.l:90: error: for each function it appears in.)
> > make: *** [lex.o] Error 1
> 
> I think this is a bug in your version of flex; I'm using standard lex
> conventions here. I don't know how to make it work for you.

I need something like this to make it work with flex/lex..

The "-l" tells flex to be more traditional.

The "clean" rule is obvious.

And the "yylineno" is a lot more traditional than yyget_lineno(), which 
doesn't work for me at all. I think that's some issue with flex' support 
for re-entrant parsers.

Whether it works after this, I dunno. But at least it compiles.

		Linus

---
diff --git a/Makefile b/Makefile
index 639353a..c7e04a5 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,7 @@ GCC_WARNINGS3=-Wnested-externs -fno-stri
 GCC_WARNINGS=$(GCC_WARNINGS1) $(GCC_WARNINGS2) $(GCC_WARNINGS3)
 CFLAGS=-O0 -g $(GCC_WARNINGS)
 YFLAGS=-d
+LFLAGS=-l
 
 SRCS=gram.y lex.l cvs.h parsecvs.c cvsutil.c revlist.c atom.c revcvs.c git.c
 
@@ -20,4 +21,4 @@ lex.o: lex.c
 y.tab.h: gram.c
 
 clean:
-	rm -f $(OBJS) y.tab.h gram.c parsecvs
+	rm -f $(OBJS) y.tab.h gram.c parsecvs lex.c
diff --git a/lex.l b/lex.l
index 39cafb0..c7833a4 100644
--- a/lex.l
+++ b/lex.l
@@ -65,8 +65,7 @@ parse_data (int save);
 \t				;
 \n				;
 .				{ 
-				    fprintf (stderr, "%s: (%d) ignoring %c\n", 
-					     yyfilename, yyget_lineno (),
+				    fprintf (stderr, "%s: (%d) ignoring %c\n", yyfilename, yylineno,
 					     yytext[0]);
 				}
 %%
@@ -146,8 +145,7 @@ lex_date (cvs_number *n)
 	d = mktime (&tm);
 	if (d == 0) {
 	    int i;
-	    fprintf (stderr, "%s: (%d) unparsable date: ", yyfilename,
-		     yyget_lineno ());
+	    fprintf (stderr, "%s: (%d) unparsable date: ", yyfilename, yylineno);
 	    for (i = 0; i < n->c; i++) {
 		if (i) fprintf (stderr, ".");
 		fprintf (stderr, "%d", n->n[i]);

  reply	other threads:[~2006-04-03  4:38 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-02  5:36 parsecvs tool now creates git repositories Keith Packard
2006-04-02  9:39 ` Jan-Benedict Glaw
2006-04-02 19:31   ` Jan-Benedict Glaw
2006-04-03  4:10     ` Keith Packard
2006-04-03  4:38       ` Linus Torvalds [this message]
2006-04-03  7:25       ` Jan-Benedict Glaw
2006-04-03 13:58         ` Erik Mouw
2006-04-03 16:54         ` Keith Packard
2006-04-03 22:19           ` Keith Packard
2006-04-03 14:03 ` Erik Mouw
2006-04-03 14:21   ` Jakub Narebski
2006-04-03 14:39     ` Keith Packard
2006-04-03 14:37   ` Keith Packard
2006-04-03 15:32     ` Jeff King
2006-04-04  0:55   ` Anand Kumria
2006-04-03 22:38 ` Martin Langhoff
2006-04-04  2:07   ` Keith Packard
2006-04-04  2:16     ` Martin Langhoff
2006-04-04  2:24       ` Keith Packard
2006-04-04  2:42         ` Martin Langhoff
2006-04-04  3:51           ` Keith Packard
2006-04-04  6:09             ` Junio C Hamano
     [not found] <20060405174247.GA29758@blackbean.org>
     [not found] ` <1144262498.2303.231.camel@neko.keithp.com>
2006-04-06  6:36   ` Fixes to parsecvs Keith Packard
2006-04-06 18:15     ` parsecvs tool now creates git repositories Jim Radford
2006-04-06 20:12       ` Keith Packard
2006-04-06 21:51         ` Martin Langhoff
2006-04-06 22:19           ` Keith Packard
2006-04-06 23:22             ` Martin Langhoff
2006-04-07  7:24               ` Keith Packard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0604022122430.3781@g5.osdl.org \
    --to=torvalds@osdl.org \
    --cc=git@vger.kernel.org \
    --cc=jbglaw@lug-owl.de \
    --cc=keithp@keithp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).