help-bison
[Top][All Lists]
Advanced

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

Re: Flex: token value more than what regexp matches


From: Hans Aberg
Subject: Re: Flex: token value more than what regexp matches
Date: Fri, 8 Jul 2005 18:15:08 +0200

On 7 Jul 2005, at 23:53, Frans Englich wrote:
I have the problem that the value of a token appears to be more than what the
regexp matches.

When parsing the expression "fn:false()", I get a QNAME token with the value
"fn:false" -- what I expect & want.

However, when parsing the expression "false()", I get the token NCNAME with the value "false(". The token is right, but I don't want the parantese to be
included.

This is frequently asked question: The Flex lexer merely provides a pointer to the identified text in a buffer, temporarily '0'- terminated, and in order to preserve that in subsequent lexer calls, you need to copy it over. The Bison parser does indeed make several calls to the lexer before the rule action is invoked.

  Hans Aberg






reply via email to

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