From: Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
To: "gcc-help@gcc.gnu.org" <gcc-help@gcc.gnu.org>
Subject: Re: libcpp backtrack lexer
Date: Wed, 26 Feb 2014 19:30:00 -0000 [thread overview]
Message-ID: <CAJXstsAis7e1HxbDJ93oUZ6nCtD+UF72QWbrg3=9gZW2w+m9Ng@mail.gmail.com> (raw)
In-Reply-To: <CAJXstsC6TaOfmRhrwhuMEN3v50cZNgHsy7vW6xgJ3TXGW86bAA@mail.gmail.com>
Ping ?
On Tue, Feb 25, 2014 at 12:55 AM, Prathamesh Kulkarni
<bilbotheelffriend@gmail.com> wrote:
> How do I backtrack the lexer to restart lexing from a particular token
> on the same
> line ?
> Shall this be correct: ?
> cpp_token *cur_token = pfile->cur_token;
> if (foo (pfile) == 0) // foo advances pfile->cur_token
> pfile->cur_token = cur_token; // restart lexing from cur_token
>
> foo does not advance pfile->cur_token beyond the same line, so I guess
> cur_token shall still be pointing to a valid token (since tokens on
> the same line are preserved) ?
>
> Thanks and Regards,
> Prathamesh
prev parent reply other threads:[~2014-02-26 19:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-24 19:25 Prathamesh Kulkarni
2014-02-26 19:30 ` Prathamesh Kulkarni [this message]
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='CAJXstsAis7e1HxbDJ93oUZ6nCtD+UF72QWbrg3=9gZW2w+m9Ng@mail.gmail.com' \
--to=bilbotheelffriend@gmail.com \
--cc=gcc-help@gcc.gnu.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).