help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Non-greedy wildcard possible? (Long)


From: Hans Aberg
Subject: Re: Non-greedy wildcard possible? (Long)
Date: Fri, 21 May 2004 19:19:10 +0200

At 00:44 +0200 2004/05/21, Magnus Lie Hetland wrote:
>> I think of things like if a book contains segments of chess in PGN or EPD.
>> Then one would want to extract and give proper translation of just those
>> portions. Then your current method might be too crude.
>
>Maybe -- unless PGN and EPD can be parsed using a CFG. If they can, I
>don't see the problem...

I think a CFG might be too restrictive for proper markup of texts; some
type of context sensitivities might be needed.

Another development, instead of outputting XML, you might decide to output
M4 macros. This is then combined with another macro-definition file, which
M4 uses to produce the final output file. This is then the method Bison
uses in order to accommodate for multilingual output support. This, in
turn, in fact derives from a suggestion by me, because I had my made my own
macro-language for producing output; Akim Demaille then picked up M4 for
use with Bison. I think M4 has been extended, so that it now can output
files.

These two approaches would then hand in hand require a more strict
"grammarization" of your ATOX program.

A situation where one may need dynamic grammars is when several documents
are combine into one. LaTeX made the mistake to build its syntax on Pascal,
with a top level "preamble", making such document combinations difficult.
One would expect every document to have its own definitions, and then the
program making the markup should be able to handle that.

Then one would also expect subportions of a document to be structured like
that. So in the chess example, a document might look like (say)
  environment chess-game PGN end chess-game.
  environment chess-board EPD end chess-board.
  ...
  text
  chess-game
    ...
  end chess-game
Then the PGN parts would only be valid in the chess-game environments.

The program making the markup would need to be able to handle such constructs.

  Hans Aberg






reply via email to

[Prev in Thread] Current Thread [Next in Thread]