×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Charles Wilt wrote:
I'm not an expert ( it's been a while since my formal languages course
:) but recursive decent parsing provides an answer to your OQ in the
following manner:
At the point that the parser is looking at /*ALL or /*PART1 the parser
wouldn't be looking for a comment.
Which was exactly my point.
Although I admit that for this to work, your scanner needs to be smart
enough to know when it is or is not acceptable to return a "comment"
token to the parser. Not that this is terribly difficult; you could
simply pass a "comment allowed" flag as a parameter, assuming that your
parser calls your scanner directly (which it presumably does, unless you
have some sort of pre-tokenization pass).
Welcome to compiler construction 101. ;-) (And it's been about a
quarter-century for me, but only a few years since I had to design one,
and only a few weeks since I had to maintain one.)
--
JHHL
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.