Henrik Bach
2004-Aug-18 23:04 UTC
[LLVMdev] tblgen: Assertion failed: "Buffer[Length-1] == '"'", file FileLexer.l, line 114
Hi I've been investigating which characters that cause troubles: Length = 23 WhatsInBuffer=include "../Target.td" assert=false tblgen: Assertion failed: "Buffer[Length-1] == '"'", file FileLexer.l, line 128 idx hex char 0 69 i 1 6E n 2 63 c 3 6C l 4 75 u 5 64 d 6 65 e 7 20 8 22 " 9 2E . 10 2E . 11 2F / 12 54 T 13 61 a 14 72 r 15 67 g 16 65 e 17 74 t 18 2E . 19 74 t 20 64 d 21 22 " 22 D I can't see what's wrong here... Other than the " character at the end of the include statement, which the assertion is complaining about. /Henrik>From: Chris Lattner <sabre at nondot.org> >Date: Wed, 18 Aug 2004 00:39:31 -0500 (CDT) > >On Tue, 17 Aug 2004, Misha Brukman wrote: > > > On Tue, Aug 17, 2004 at 09:39:23PM -0500, Chris Lattner wrote: > > > > The next problem, on my system (Interix - you remember - Hey, some > > > > LLVM program is working :O ), is however, that it cannot find the > > > > ../Target.td file. At the moment I see some more bugs luring ahead > > > > in the TableGen code. More on that later. > > > > > > I'm sure this is because you hacked the assertion, but didn't fix the > > > problem. The question is: why is an extra char being included at the > > > end of the buffer? > > > > Does Windows-style double-char line terminator have anything to do with > > it? > >I thought about that, but no, no newlines of any sort are involved. > >-Chris > >-- >http://llvm.org/ >http://nondot.org/sabre/ > >_______________________________________________ >LLVM Developers mailing list >LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev_________________________________________________________________ Undg� pop-ups med MSN Toolbar - http://toolbar.msn.dk hent den gratis!
Misha Brukman
2004-Aug-18 23:11 UTC
[LLVMdev] tblgen: Assertion failed: "Buffer[Length-1] == '"'", file FileLexer.l, line 114
On Thu, Aug 19, 2004 at 01:04:55AM +0200, Henrik Bach wrote:> I've been investigating which characters that cause troubles: > > Length = 23 > WhatsInBuffer=include "../Target.td" > assert=false > tblgen: Assertion failed: "Buffer[Length-1] == '"'", file FileLexer.l, line > 128 > idx hex char > 0 69 i > 1 6E n > 2 63 c > 3 6C l > 4 75 u > 5 64 d > 6 65 e > 7 20 > 8 22 " > 9 2E . > 10 2E . > 11 2F / > 12 54 T > 13 61 a > 14 72 r > 15 67 g > 16 65 e > 17 74 t > 18 2E . > 19 74 t > 20 64 d > 21 22 " > 22 D > > I can't see what's wrong here... Other than the " character at the end > of the include statement, which the assertion is complaining about.What's wrong is the 'D' hex character at the end of the include line becoming part of the parsed string. 'D' is \013 which is carriage return. It is whitespace and shouldn't be in the parsed string. Since Length = 23, it expects Buffer[22] == ", but instead it's \013. That's an error, because Length should really be 22, and Buffer[21] really is the character ". So, the lexer is confused about what your whitespace is. However, llvm/utils/TableGen/FileLexer.l includes the following line: [ \t\n\r]+ { /* Ignore whitespace */ } which covers carriage returns (\r), so I am not sure *HOW* Length is set to 23, but it *IS* the problem. Unfortunately, we do not have access to Interix to replicate this problem. -- Misha Brukman :: http://misha.brukman.net :: http://llvm.cs.uiuc.edu
Apparently Analagous Threads
- [LLVMdev] tblgen: Assertion failed: "Buffer[Length-1] == '"'", file FileLexer.l, line 114
- [LLVMdev] tblgen: Assertion failed: "Buffer[Length-1] == '"'", file FileLexer.l, line 114
- [LLVMdev] tblgen: Assertion failed: "Buffer[Length-1] == '"'", file FileLexer.l, line 114
- [LLVMdev] tblgen: Assertion failed: "Buffer[Length-1] == '"'", file FileLexer.l, line 114
- [LLVMdev] Errors while building and installation of llvm-1.9