help-bison
[Top][All Lists]
Advanced

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

Re: parsing the content of a terminal


From: Dan Haggarty
Subject: Re: parsing the content of a terminal
Date: Fri, 25 Nov 2005 17:45:04 -0500

At 10:04 AM 11/25/05, Arkadius Nowakowski wrote:
>Hello again,
>
>I've got to parse a grammar (BSDL) that contains strings.
>That strings furthermore contain information which has to be parsed.
>The problem lies in the concatenation of the BSDL strings:
>
>" substring_1 " &
>" substring_2 " &
>...
>" substring_n "
>
>What I have to do now is build the whole string and parse its content:
>" substring_1 substring_2 ... substring_n "
>
>Don't know if I'm right, but I guess the complete string has to be a
>terminal. And I have to call bison in a recursvie way to parse the
>content of the string. I've searched the internet but I could not find
>enough information how to do this.

Well, if it was my problem, I might try to have the lexer detect cases where a 
substring terminating " is followed by a & and another " (with possible 
intermediate whitespace) and throw away these characters without terminating 
the substring.  Make the opening " change the lexer state to start looking for 
tokens of your second grammar and make the closing " change the lexer state 
back to the initial state.

Dan

--
Dan Haggarty
Principal Consultant
Dunhaven Inc.
"advanced data architectures and business systems analysis"
416.234.8202 





reply via email to

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