Re: Setting scanner input using a KI_CHARACTER_INPUT_STREAM
Eric Bezault <ericb-D6Qt/9opevxWk0Htik3J/[email protected]>
| Newsgroups | gmane.comp.lang.eiffel.gobo.general |
|---|---|
| Organization | Gobo |
| Message-ID | <[email protected]> |
Nicholas Allen wrote: > Hi Eric, > > I have one other question I hope you can help me with. I want to create my own > custom input stream and use this with a gernerated scanner/parser. The > set_input_buffer takes a buffer but I want to use an input stream. > > I expected that the scanner/parser would take a KI_CHARACTER_INPUT_STREAM and > create the buffers itself if it needs it. > > I don't want to read the entire stream into a buffer and then call > set_input_buffer. > > Am I supposed to subclass YY_BUFFER's fill feature? You can do that: my_stream: KI_CHARACTER_INPUT_STREAM ... my_scanner.set_input_buffer (my_scanner.new_file_buffer (my_stream)) -- Eric Bezault mailto:ericb-D6Qt/9opevxWk0Htik3J/[email protected] http://www.gobosoft.com 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/