Re: Several usage questions...



On 19 Ott, 21:04, "news.rz.uni-karlsruhe.de" <u...@xxxxxxx
karlsruhe.de> 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

.



Relevant Pages

  • Re: call of ShellExecuteEx causes error message
    ... My Java program brings up its own window and is for drawing curves, ... //define pix vector from Photoshop image ... //make string from pix vector ... the call of ShellExecuteEx worked. ...
    (microsoft.public.win32.programmer.networks)
  • Re: call of ShellExecuteEx causes error message
    ... My Java program brings up its own window and is for drawing curves, ... //define pix vector from Photoshop image ... //make string from pix vector ... the call of ShellExecuteEx worked. ...
    (microsoft.public.win32.programmer.networks)
  • Re: Current Class Path
    ... | Could anyone tell me how to get the class path and not the jdk path? ... * Returns a string consisting of the current working directory. ...
    (comp.lang.java.programmer)
  • Re: Complete command arguments
    ... Is it possible, in a Java program, to get the complete command ... string that was used to start that program? ... Thats really quite easy, a mere "enhanced for loop" does the job quite nicely: ...
    (comp.lang.java.help)
  • Re: Reading contents for a text file and couting words
    ... > I am trying to write a Java program to read a text file and then ... > String line; ... Do you intend to ... I suspect this is the String processing code you had intended to ...
    (comp.lang.java.programmer)