On 14 Jun 2007, at 15:09, Alessandro Di Marco wrote:
One way around is feeding a UTF-8 .ly file to Flex, and require
that the
proper Unicode “...” be used, i.e. U+201C & U+201D. When U+201C
arrives, in
the lexer, start parsing a quotation string. If the closing U
+201D has not
arrived when the paragraph, or whatever block without the
construct cannot
survive, closes, issue an error.
Thanks for the suggestion; unfortunately it is not viable because
the text is
plain ascii. Considering the spaces around the quotes I could get a
similar
effect, but there should be something better... does it?
You might consider hooking up a translator that converts the ASCII to
a format like the above, as combining the many different writing
styles and the huge problem of correct natural parsing into one
parser is going to be very difficult to do. This will work if the
writing style does not depend on the grammar. The style that is best,
from the point of view of computer language construction point of
view, is with matching pairs, because then it is easy to detect input
errors.
Hans Aberg
_______________________________________________
[email protected] http://lists.gnu.org/mailman/listinfo/help-bison