Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Berlin <dberlin@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] Handle comments in the C expression parser
Date: Tue, 13 Feb 2001 20:07:00 -0000	[thread overview]
Message-ID: <x78zn96h7n.fsf@dynamic-addr-83-177.resnet.rochester.edu> (raw)

This patch adds C-style comment handling to the expression parser.

That way, we can add comments to output of various places, and still
be able to paste it back in.
(gdb) p 5 /* / */ / 3
$1 = 1
(gdb) p 5 /* / */ / 3 */* 333333 blah */ 2
$2 = 2
(gdb) p 5 /* / */ / 3 */* 333333 blah */ 2
$3 = 2
(gdb) p 5 /* / */ / 3 */* 333333 blah */ 2
$4 = 2
(gdb) p 5 /* / */ / 3 */* 333333 blah *// 2
A parse error in expression, near ` 2'.
(gdb) p 5 /* / */ / 3 */* 333333 blah *// 2
A parse error in expression, near ` 2'.
(gdb) p 5 /* / */ / 3 */* 333333 blah */2/ 2
$5 = 1
(gdb)


(The parse errors are because, if you look closely, it's really 5 / 3
* / 2, so the parse error is correct. )

2001-02-13  Daniel Berlin  <dberlin@redhat.com>

        * c-exp.y : Handle C style comments in expression parser,
        ignoring them.


             reply	other threads:[~2001-02-13 20:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-13 20:07 Daniel Berlin [this message]
2001-02-13 23:28 ` Eli Zaretskii
2001-02-13 21:01 Michael Elizabeth Chastain
2001-02-13 21:30 ` Daniel Berlin
2001-02-13 21:43 Michael Elizabeth Chastain
2001-02-13 22:03 ` Daniel Berlin
2001-02-13 22:09 Michael Elizabeth Chastain
2001-02-13 22:25 ` Daniel Berlin
2001-02-13 22:49 Michael Elizabeth Chastain
2001-02-13 22:50 Michael Elizabeth Chastain

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=x78zn96h7n.fsf@dynamic-addr-83-177.resnet.rochester.edu \
    --to=dberlin@redhat.com \
    --cc=gdb-patches@sources.redhat.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