I am really happy to know there is such a project.

38 views
Skip to first unread message

yoco

unread,
Sep 8, 2010, 12:12:04 PM9/8/10
to scalpel-users
I had want to build such a library for a long time. But to build such
a library is totally out of my ability. Actually, I can not even parse
a C++ source successfully. The complicated syntax just kill me at the
very beginning. I had tried several times to build a C++ parser, but
every time I failed. It is really good to see such a library like
scalpel.

Florian Goujeon

unread,
Sep 8, 2010, 12:24:44 PM9/8/10
to scalpe...@googlegroups.com
Thank you Peter ;).
Unfortunately, it seems like I won't be able to complete this project.
Did you read the whole thread of the Boost mailing list?


AsmWarrior

unread,
Nov 1, 2010, 11:46:39 PM11/1/10
to scalpel-users


On Sep 9, 12:24 am, Florian Goujeon <florian.gouj...@42ndart.org>
wrote:
this is a nice parser. But I'm just concern about it's performance.

I come from the codeblocks IDE site, we now use a hind-written
recursive heuristic parser, not sure how we can improve the
codecompletion's parser in Codeblocks. but in the codecompletion's
parser, we don't do the type check, and we only do a simple syntax
analysis. like:

id id;
So, this is a variable definition.
id id();
this is a function declaration.

Also, I'm concerning a tokenizer, I currently pick this one:
http://sourceforge.net/projects/quex/

not sure how to integrate the parser grammar expression with the quex
lexer.


BTW: how to handle the parsing errors. do I have some error recovery
functions. I do not want just exit the parsing stage when I meet an
error. thanks.

ollydbg from codeblocks's site

http://forums.codeblocks.org/index.php?action=profile;u=9403

thanks.

Florian Goujeon

unread,
Jan 18, 2011, 7:39:59 AM1/18/11
to scalpe...@googlegroups.com
On 11/02/2010 04:46 AM, AsmWarrior wrote:
> this is a nice parser. But I'm just concern about it's performance.
>
> I come from the codeblocks IDE site, we now use a hind-written
> recursive heuristic parser, not sure how we can improve the
> codecompletion's parser in Codeblocks. but in the codecompletion's
> parser, we don't do the type check, and we only do a simple syntax
> analysis. like:
>
> id id;
> So, this is a variable definition.
> id id();
> this is a function declaration.
Scalpel acts the same way.
Its syntax analyzer is fully independent from its semantic analyzer.
I know there are some ambigous cases that a standalone syntax analyzer
couldn't manage,
but IMHO, they're way too rare and avoidable to be considered.

> Also, I'm concerning a tokenizer, I currently pick this one:
> http://sourceforge.net/projects/quex/
>
> not sure how to integrate the parser grammar expression with the quex
> lexer.

I'm not sure of what you're talking about.
You'd like to use Scalpel and Quex together?

> BTW: how to handle the parsing errors. do I have some error recovery
> functions. I do not want just exit the parsing stage when I meet an
> error. thanks.

AFAIK, Boost.Spirit doesn't provide such a functionality.
As long as Scalpel uses Spirit, I won't be able to implement such an
error recovery.
Do you know a good parser generator which provides error recovery?

Reply all
Reply to author
Forward
0 new messages