Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Compiler Tools JavaCC > Re: Several usa...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 483 of 555
Post > Topic >>

Re: Several usage questions...

by Cesare Zecca <Cesare.Zecca.prof@[EMAIL PROTECTED] > Oct 22, 2007 at 03:39 PM

On 19 Ott, 21:04, "news.rz.uni-karlsruhe.de" <u...@[EMAIL PROTECTED]
> wrote:
> Three questions:
>
> I need a parser which can do the following....
>
> 1.) getting called from my java program like parse( String MyString ) (
can
> be done by changing the main routine in *.jj file, ok ).

You can program your class in the .jj file as you prefer, provided
that you follow the JavaCC grammar.
Please, mind that, generally input output are not carried out by any
explicit argument. Instead input is associated to the grammar at
initialization time.
When you create the singleton grammar instance you have to specify a
Reader that, in turn, can be obtained from a String.

Please, refer to
3.2  How do I read from a string instead of a file?
http://www.engr.mun.ca/~theo/JavaCC-FAQ/javacc-faq-moz.htm#tth_sEc3.2

to get an example about how to read from a string.


Sorry if I do not answer to the questions for point 2), but I'm a
beginner yet.

Ciao
Cesare
 




 2 Posts in Topic:
Several usage questions...
"news.rz.uni-karlsru  2007-10-19 21:04:49 
Re: Several usage questions...
Cesare Zecca <Cesare.Z  2007-10-22 15:39:13 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Sep 7 8:05:08 CDT 2008.