Related articles |
---|
Lazy/tolerant parsers mritun@gmail.com (2004-07-13) |
RE: Lazy/tolerant parsers quinn-j@shaw.ca (Quinn Tyler Jackson) (2004-07-14) |
Re: Lazy/tolerant parsers mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2004-07-14) |
Re: Lazy/tolerant parsers mritun@gmail.com (2004-07-15) |
Re: Lazy/tolerant parsers mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2004-07-17) |
From: | mritun@gmail.com (Akhilesh Mritunjai) |
Newsgroups: | comp.compilers |
Date: | 13 Jul 2004 22:30:21 -0400 |
Organization: | http://groups.google.com |
Keywords: | parse, question |
Posted-Date: | 13 Jul 2004 22:30:21 EDT |
Hi
I tried searching in archives, but could not find helpful results.
I have a (Ada like) grammar for which I need to create a parser which
should be usable for code as user types (syntax highlighting, code
assist etc). So the parser should correctly deal with -
- partial sententences
- Incomplete/missing closures
Which method would you recommend to write such a parser ?
As I understand, the parser needs to flag off error conditions,
"synch" the state machine and continue parsing. However, this synching
itself will be problematic in the first place and parser may be
required to-
- User context informaction (i.e. keep an eye on what user is doing)
- Use grammar context to find next synch point
- Re-iterate several times to find the most "fitting" synch location
that makes best sense.
- Do some special juggelary at closely located error-points to avoid
iterating too much.
Right now I'm looking at eclipse's JDT java compiler/parser for hints.
Of course its too big a piece to bite at this stage, so progress is
kinda slow :)
Waiting for inputs
Thanks
- Akhilesh
Return to the
comp.compilers page.
Search the
comp.compilers archives again.