From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fernando Nasser To: Jim Blandy Cc: Elena Zannoni , Daniel Berlin , gdb-patches@sources.redhat.com Subject: Re: [RFA] linespec.c change to stop "malformed template specification" error Date: Thu, 07 Jun 2001 06:00:00 -0000 Message-id: <3B1F7A4B.4626F9D9@redhat.com> References: <87ofsldrgr.fsf@dynamic-addr-83-177.resnet.rochester.edu> <15134.47162.825017.119342@kwikemart.cygnus.com> X-SW-Source: 2001-06/msg00118.html Jim Blandy wrote: > > So how does our poor little decode_line_1 handle that? Basically, we > need to replace decode_line_1 with a real parser. > It will be hard. As it accepts a variety of types of input, there are ambiguities in the allowed syntax that are hard to describe in any formal language. What I am trying to say is that, although the current implementation may be lame, the problem is more fundamental -- it is the concept of linespec itself with the "accept anything with any system variant and language variant from function names to filenames and line numbers and combinations thereof". With this search space, I guess the heuristic method that exists today became the only one that was feasible to implement. Maybe we could improve things if GDB commands were parsed under some language context (e.g. care about C++ stuff or not) and even some host context (to distinguish filename syntaxes between Unix and Windows for instance). Cheers, Fernando -- Fernando Nasser Red Hat Canada Ltd. E-Mail: fnasser@redhat.com 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9