On Sun, 21 Oct 2007, [EMAIL PROTECTED] wrote: > Ilyes Gouta wrote: > > > Hmm.. So bison is able to read from data buffers instead of a FILE*. > > How can I achieve that? > > I don't remember off-hand. It's documented in the manual, or you can look > in my source code. It involves `yyin'. >
Sorry, I was confused. Input seems to be a matter for the scanner rather than the parser. I didn't find much about this in the Bison manual, so I think I meant something in the Flex manual. While I do use Flex in the 3DLDF package, I don't use it in combination with the parser. The point is, you can read from whatever you want: a C++ `string', a C++ `istream', an array of `chars' or a pipe. You could even read from a source using a file descriptor. (These are all the possible sources that occur to me, but perhaps I'm forgetting something.) You could even generate tokens directly or indirectly from your actions, as I described before. Laurence _______________________________________________ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison