This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

What's the stand on supporting the native lex?


Hi there,

In binutils there is this file arlex.l which is lexed into arlex.c and then
compiled. I know that you want it to be lexed with flex, and stable releases
are distributed with arlex.c anyway, but I wanted to lex it myself with the
native lex and tried to see what happens. I had to add a couple of directives
to increase lex's static buffers (the default sizes were exceeded by an order
of magnitude), but other than that it worked absolutely fine.

I wonder, what is the binutils maintainer's stand on this? I see in Makefile*
that it explicitly falls back to lex if flex is not present, and I take this to
mean that there is at least some friendlyness to the native lex. If so, is
there any chance to extend this friendlyness a little with these directives? I
checked the flex documentation and it says these directives are simply ignored,
so I don't see how they could hurt anything. The patch is below. I guess I
can't insist on it because lexing of arlex.l into arlex.c is to be done by
maintainers only, and I guess GNU allows its software to be only built and not
maintained on non-GNU systems, but it would make some people's lives easier.
Just because I want to use binutils and gcc to cross-compile for some embedded
targets doesn't mean that I have to change my whole system to GNU (that would
sound kinda like MSFT...).

2000-04-13  Michael Sokolov  <msokolov@ivan.Harhan.ORG>

	* arlex.l: Be friendly to the original lex and add directives to
	increase its buffers (the default sizes are exceeded by an order of
	magnitude). These directives are ignored by flex and won't hurt it.

Index: arlex.l
===================================================================
RCS file: /cvs/src/src/binutils/arlex.l,v
retrieving revision 1.1.1.1
diff -c -3 -p -r1.1.1.1 arlex.l
*** arlex.l	1999/05/03 07:29:09	1.1.1.1
--- arlex.l	2000/04/13 19:50:48
***************
*** 1,3 ****
--- 1,5 ----
+ %a 10000
+ %o 25000
  %{
  /* arlex.l - Strange script language lexer */
  

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]