[antlr-interest] Re: C++ input

kordeul tom_kra at hotmail.com
Thu Mar 21 01:28:27 PST 2002


--- In antlr-interest at y..., Ric Klaren <klaren at c...> wrote:
> On Thu, Mar 21, 2002 at 08:36:19AM -0000, kordeul wrote:
> > I'm new to the antlr and I have problem feeding the parser with 
some 
> > input (like file or memory char* input). Or I get the 
> > NoViableAltException exception or the InputBuffer fails during 
fill
> > () call inside LA() function (when searching for lookahead).
> > 
> > Can someone write me the code that will feed the parser (lexer) 
with 
> > some input? I don't know java, so please use C++.
> 
> Look at Main2.cpp of examples/cpp/calc in the 2.7.2a1 distro. That 
shows
> one way (with istringstream) the other way is to grab one of the
> CharInputBuffers in the archives. For normal file streams it's 
just a
> matter of instantiating the lexer with it.
> 
> Ric
> --
> -----
+++++*****************************************************+++++++++--
-----
>     ---- Ric Klaren ----- klaren at c... ----- +31 53 4893722  ----
> -----
+++++*****************************************************+++++++++--
-----
> Wit is cultured insolence. --- Aristotle


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list