coco/r and c#

  • Thread starter Thread starter Locia
  • Start date Start date
L

Locia

I need to pass a string to scanner coco/r.

Now my code is this:

I pass a file named "data.txt".
I would like pass instead a string.



Scanner scanner=new Scanner("data.txt");
Parser parser=new Parser(scanner);

coco/r class Scanner have two constructor:

Scanner(string filename);
Scanner(System.IO.Stream s);

Thanks.
 
Locia said:
I need to pass a string to scanner coco/r.

Now my code is this:

I pass a file named "data.txt".
I would like pass instead a string.

Write the string out to a byte array, create a MemoryStream around it, and
pass the stream in.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top