473,396 Members | 1,676 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,396 software developers and data experts.

Need urgent help please.

Dear Friends,

I am struck up with logic. I am using one class(BMSLexer) which takes filename as arugument and the instance of the class is used my another class. example is shown below.

Now my requirement is parser should have a functionality in such a way that parser class should parse the file with the existing lexer funtionality and lexer class should have constructor with no arguments. Nxet when i call from Test calls by instancing the parser then i wil pass filename.

string inputFile = @"C:\test.txt";

System.IO.FileStream fs = new System.IO.FileStream(inputFile, System.IO.FileMode.Open);

Worksoft.Parsers.BMSLexer lexer = new Worksoft.Parsers.BMSLexer(fs);

Worksoft.Parsers.BMSParser parser = new Worksoft.Parsers.BMSParser(lexer);

string test = parser.parse();


--
Thanks & Regards,
P.Srinivasa Dinesh,
Developer,
ECMI.
Internet : sp********@worksoft.com
sr*****************@ecm-i.com
Mobile No: +91-9850607089.
Nov 16 '05 #1
1 1276
Hi,

You requirement is not clear but it seems not a hard thing??

let me go it this way

"lexer class should have constructor" OK

Worksoft.Parsers.BMSLexer lexer = new Worksoft.Parsers.BMSLexer(); //Fine right???

//If I assume that you need the fs in lexer as well..

lexer.setFileStream(fs);//Fine Right??

//As you said the lexer has some properties so depend on them you call methods in parser right

Worksoft.Parsers.BMSParser parser = new Worksoft.Parsers.BMSParser(lexer);

//I am not sure why you need the file name again here.. but if it is the requirement

string test = parser.parse(inputFile);

So ??? what is the problem??

Nirosh.
"Srinivasa Parupalli" <sp********@worksoft.com> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl...
Dear Friends,

I am struck up with logic. I am using one class(BMSLexer) which takes filename as arugument and the instance of the class is used my another class. example is shown below.

Now my requirement is parser should have a functionality in such a way that parser class should parse the file with the existing lexer funtionality and lexer class should have constructor with no arguments. Nxet when i call from Test calls by instancing the parser then i wil pass filename.

string inputFile = @"C:\test.txt";

System.IO.FileStream fs = new System.IO.FileStream(inputFile, System.IO.FileMode.Open);

Worksoft.Parsers.BMSLexer lexer = new Worksoft.Parsers.BMSLexer(fs);

Worksoft.Parsers.BMSParser parser = new Worksoft.Parsers.BMSParser(lexer);

string test = parser.parse();


--
Thanks & Regards,
P.Srinivasa Dinesh,
Developer,
ECMI.
Internet : sp********@worksoft.com
sr*****************@ecm-i.com
Mobile No: +91-9850607089.
Nov 16 '05 #2

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

Similar topics

1
by: Rahul S. | last post by:
Hey all: I need urgent information how to set the environment in Visual.NET wiritng in C. I am working with a licensed version of the Analyze 6.0 software from mayo clinic. I need to write...
3
by: Rahul S. | last post by:
Hey all: I need urgent information how to set the environment in Visual.NET wiritng in C. I am working with a licensed version of the Analyze 6.0 software from mayo clinic. I need to write...
15
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
3
by: Noremac | last post by:
My google skills must be dwindling. I am trying to determine how in ASP.NET 2.0 I can get the ReturnUrl querystring variable in Forms Authentication to contain the absolute url. Just like others...
10
by: David Thielen | last post by:
Hi; I have help html pages for each page of my ASP.NET webapp. So for the page datasource.aspx, I have help\datasource.htm. Bu what I want when the hyperlink is clicked, for it to look for the...
1
by: psantosh12 | last post by:
Hello Frnds Please need help to resolve error.......... it is very very urgent........ The error is Runtime Error Description: An application error occurred on the server. The current custom...
4
by: Linda Liu[MSFT] | last post by:
Hi Moondaddy, I downloaded your sample project and run it and did see the problem on my side. There're three problems in the source code of your project. 1. You should move the following...
5
by: =?Utf-8?B?SGVyYg==?= | last post by:
I need a Table object in my RDLC with 6 columns on the top several rows, but 1 column on the bottom two rows: COLUMN1 COLUMN2 COLUMN3 COLUMN4 COLUMN5 COLUMN6 COLUMN1 COLUMN2 COLUMN3 ...
5
by: Justin | last post by:
Here's my XML: <?xml version="1.0" ?> <AppMode Type="Network"> <CurrentFolder Path="c:\tabs"> <Tabs> <FilePath>tabs\Justin.tab</FilePath> <FilePath>tabs\Julie.tab</FilePath> *****There could...
9
by: moondaddy | last post by:
using c# 3.5 I have list of business objects which I will use in lists for databinding and I want to hide some of the fields so they don't show up in the list control. some of my list will be:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.