473,385 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

coco/r and c#

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.

Nov 17 '05 #1
2 1859

"Locia" <ro********@yahoo.it> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
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.

Nov 17 '05 #2
It work.
Thanks very much.

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: frank.gog | last post by:
hallo, i want to use coco generated lexer and parser to parse c++ h/cpp files. where can i find a cpp.atg file for coco? i use the c# version of coco. i want generate a lexer and a parser für...
476
by: Xah Lee | last post by:
Microsoft Hatred, FAQ Xah Lee, 20020518 Question: U.S. Judges are not morons, and quite a few others are not morons. They find MS guilty, so it must be true. Answer: so did the German...
5
by: Crayon Coco | last post by:
Hi, I just want to check is it OK to set the password for ASPNET of my web server, will it impact my program
7
by: Coco | last post by:
Hi, I have 2 xml document the A and B, i want to to map some of the data from A to B using XSLT, but without creating a new XML Document. How can i do that? Thanks
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.