Re: Digest Number 374

Thomas Beale <thomas-JBqMug/[email protected]>
Newsgroups gmane.comp.lang.eiffel.gobo.general
Message-ID <[email protected]>

In my case, the file has long been read and its contents are in a String 
buffer - so I just want to set my second parser to work from "here" in 
the current input text, and when it is done, find out where it stopped 
(how many characters it read before an 'accept' was done).

- thomas

[email protected] wrote:

>
>Message: 2         
>   Date: Thu, 14 Oct 2004 16:11:47 +0200
>   From: Eric Bezault <ericb-D6Qt/9opevxWk0Htik3J/[email protected]>
>Subject: Re: Q: how to parse embedded sections in a different syntax
>
>Cheng-Chang Wu wrote:
>  
>
>>how can I let the scanner start scanning from the
>>beginning of the file when EOF is read?
>>    
>>
>
>There is something similar to that in the code of gepp
>($GOBO/src/gepp) when reading #include instructions. The
>difference is that in that case we open a new file.
>
>  
>
>>I've the following rule,
>>
>><searching_n><<EOF>> {
>>   if not is_rewinded and then file.is_rewindable then
>>      is_rewinded := True
>>      file.rewind
>>      -- (what should be done here?)
>>    
>>
>
>Try that:
>
>         set_input_buffer (new_file_buffer (file))
>
>  
>
>>   else
>>      is_rewinded := False
>>      terminate
>>   end }
>>    
>>
>
>Let me know if it works or not.
>
>  
>


-- 
___________________________________________________________________________________
CTO Ocean Informatics (http://www.OceanInformatics.biz)
Hon. Research Fellow, University College London

openEHR (http://www.openEHR.org)
Archetypes (http://www.oceaninformatics.biz/adl.html)
Community Informatics (http://www.deepthought.com.au/ci/rii/Output/mainTOC.html)




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

To Post a message, send it to:   [email protected]
To Unsubscribe, send a blank message to: [email protected] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/gobo-eiffel/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.