[Top][All Lists]
[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: |
Mon, 17 May 2004 20:12:24 +0200 |
At 04:31 +0200 2004/05/17, Magnus Lie Hetland wrote:
Please cc the Help-Bison list in sequel replies.
>> >I'm working on a project (atox.sf.net) where I want to use Bison to
>> >add markup to plain text. I need a rule to represent the plain text
>> >segments (between the markup tokens) and that's proving a challenge.
>>
>> Normally, this is done by the lexer, sending back say a token "text". Why
>> is you not doing it that way?
>
>Because what tokens are significant (as opposed to "plain text")
>is described by a user-specified context-free grammar.
Normally this is handled by a look-up table that is accessed by the lexer,
also in the case when the grammar is not formally context-free. By tweaking
the lexer and the parser together, one can often handle languages that are
not formally context-free.
So if you say you "already have solved the lexer part", that is a
suspicious remark, because the lexer will in practise depend on the
limitations of the parser.
I think you need to describe a little better your language problem.
Examples? Then, one can determine what techniques you might need.
Hans Aberg
Re: Non-greedy wildcard possible? (Long), Hans Aberg, 2004/05/16
- Re: Non-greedy wildcard possible? (Long), Magnus Lie Hetland, 2004/05/16
- Re: Non-greedy wildcard possible? (Long),
Hans Aberg <=
- Re: Non-greedy wildcard possible? (Long), Magnus Lie Hetland, 2004/05/17
- Re: Non-greedy wildcard possible? (Long), Hans Aberg, 2004/05/18
- Re: Non-greedy wildcard possible? (Long), Magnus Lie Hetland, 2004/05/18
- Re: Non-greedy wildcard possible? (Long), Hans Aberg, 2004/05/19
- Re: Non-greedy wildcard possible? (Long), Magnus Lie Hetland, 2004/05/19
- Re: Non-greedy wildcard possible? (Long), Hans Aberg, 2004/05/20
- Re: Non-greedy wildcard possible? (Long), Magnus Lie Hetland, 2004/05/20
- Re: Non-greedy wildcard possible? (Long), Hans Aberg, 2004/05/20
- Re: Non-greedy wildcard possible? (Long), Magnus Lie Hetland, 2004/05/20
- Re: Non-greedy wildcard possible? (Long), Hans Aberg, 2004/05/23