Expand keyword lexing intelligence in the linespec parser.

Message ID 551078C8.60407@redhat.com
State New, archived
Headers

Commit Message

Keith Seitz March 23, 2015, 8:34 p.m. UTC
  On 03/23/2015 01:22 PM, Keith Seitz wrote:
> On 03/23/2015 06:31 AM, Joel Brobecker wrote:
>> LGTM. A few minor comments, but otherwise pre-approved.
>>
>>> +++ b/gdb/linespec.h
>>> @@ -152,4 +152,8 @@ extern struct symtabs_and_lines
>>> decode_line_with_current_source (char *, int);
>>>
>>>   extern struct symtabs_and_lines decode_line_with_last_displayed
>>> (char *, int);
>>>
>>> +/* Does P represent one of the keywords?  If so, return
>>> +   the keyword.  If not, return NULL.  */
>>> +
>>> +extern const char *linespec_lexer_lex_keyword (const char *p);
>>
>> You already have the function documented in linespec.c, so no need
>> to duplicate it here.
>
> Bah. I forgot all about that. It's been a hectic Monday. I'll push a
> patch to remove this very soon.

And I've pushed the following patch as a result. Sorry about that!

Keith

commit 32b40af94e919e235c21486110311647cbeecf2e
Author: Keith Seitz <keiths@redhat.com>
Date:   Mon Mar 23 13:32:01 2015 -0700

     Update comment of linespec_lexer_lex_keyword.

     gdb/ChangeLog

            * linespec.c (linespec_lexer_lex_keyword): Update comment.

  linespec_lexer_lex_keyword (const char *p)
  

Patch

diff --git a/gdb/linespec.c b/gdb/linespec.c
index 90c07a2..d2089b5 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -414,8 +414,7 @@  linespec_lexer_lex_number (linespec_parser *parser, 
linespec_token *tokenp)
    return 1;
  }

-/* Does P represent one of the keywords?  If so, return
-   the keyword.  If not, return NULL.  */
+/* See linespec.h.  */

  const char *