I am working in vb.net to devlope a c++ compiler that will read the
whole .cpo file and search for the keywords ,identiferis,opertaors and
others and also check the syntax for the whole code.
SO would any body there to tell about any algorithem which will serach
the whole .cpp file and return me that file into an array (ervry index
of array hold one word.)
sO PLZ HELP mE AS SOON AS POSSIBLE
From myside any information will be regarded. 4 1853
Max wrote:
I am working in vb.net to devlope a c++ compiler that will read the
whole .cpo file and search for the keywords ,identiferis,opertaors and
others and also check the syntax for the whole code.
SO would any body there to tell about any algorithem which will serach
the whole .cpp file and return me that file into an array (ervry index
of array hold one word.)
sO PLZ HELP mE AS SOON AS POSSIBLE
From myside any information will be regarded.
I think your description here requires two quite different algorithms.
The first, to find all words used in a given text, just split out on any
non-text characters. You can use the Char class in .NET and its various
static methods for checking if a character is a digit, letter, symbol, etc.
If you construct a list of such delimited characters, you can pass this
to String.Split to split an existing strings into words.
However, to "check syntax for the whole code", in this you essentially
have to build a parser that understands C++ syntax. For this solution I
would really like to know why you want to do this.
--
Lasse Vågsæther Karlsen
mailto:la***@vkarlsen.no http://presentationmode.blogspot.com/
PGP KeyID: 0xBCDEA2E3
On Jan 17, 4:12 am, Lasse Vågsæther Karlsen <la...@vkarlsen.nowrote:
Max wrote:
I am working in vb.net to devlope a c++ compiler that will read the
whole .cpo file and search for the keywords ,identiferis,opertaors and
others and also check the syntax for the whole code.
SO would any body there to tell about any algorithem which will serach
the whole .cpp file and return me that file into an array (ervry index
of array hold one word.)
sO PLZ HELP mE AS SOON AS POSSIBLE
From myside any information will be regarded.
I think your description here requires two quite different algorithms.
The first, to find all words used in a given text, just split out on any
non-text characters. You can use the Char class in .NET and its various
static methods for checking if a character is a digit, letter, symbol, etc..
If you construct a list of such delimited characters, you can pass this
to String.Split to split an existing strings into words.
However, to "check syntax for the whole code", in this you essentially
have to build a parser that understands C++ syntax. For this solution I
would really like to know why you want to do this.
I, too, would like to know why he *urgently* needs to develop a C++
compiler, in VB.NET, and is asking about it on a C# newsgroup.
Jesse
"Jesse McGrew" <jm*****@gmail.comwrote in message
news:de**********************************@k2g2000h se.googlegroups.com...
On Jan 17, 4:12 am, Lasse Vågsæther Karlsen <la...@vkarlsen.nowrote:
Max wrote:
I am working in vb.net to devlope a c++ compiler that will read the
whole .cpo file and search for the keywords ,identiferis,opertaors and
others and also check the syntax for the whole code.
SO would any body there to tell about any algorithem which will serach
the whole .cpp file and return me that file into an array (ervry index
of array hold one word.)
sO PLZ HELP mE AS SOON AS POSSIBLE
From myside any information will be regarded.
I think your description here requires two quite different algorithms.
The first, to find all words used in a given text, just split out on any
non-text characters. You can use the Char class in .NET and its various
static methods for checking if a character is a digit, letter, symbol,
etc.
If you construct a list of such delimited characters, you can pass this
to String.Split to split an existing strings into words.
However, to "check syntax for the whole code", in this you essentially
have to build a parser that understands C++ syntax. For this solution I
would really like to know why you want to do this.
>I, too, would like to know why he *urgently* needs to develop a C++ compiler, in VB.NET, and is asking about it on a C# newsgroup.
Sounds like the course "Compiler Construction" to me. I had the exact same
lab exercise when I studied it at university (although the languages
differed). Maybe the OP is running late with his assignments...
/claes This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Nikola Skoric |
last post by:
Is the a PHP compiler? A program that compiles PHP code to executable
which doesn't need php interpreter to execute...
--
Pozdrav/Regards, Nikola Skoric.
"...Usne, tice-rugalice - a u oku...
|
by: Anton Gavrilov |
last post by:
Hi all,
I seek your advice on where to start if I want to write a compiler for a
toy C-like language I invented (or, rather, am in the process of
inventing). Yes, yes, I know I'm crazy and the...
|
by: Sebastian |
last post by:
Do you have a simple example for creating a simple hello
world compiler in c# or vb.net?
thanks
Sebastian
|
by: Stuart Carnie |
last post by:
I suspect it's unlikely, but you'll never know until you ask, but are there any attributes that would allow us to contribute to
the compiled output?
e.g.
// this class exists in a separate,...
|
by: smnoff |
last post by:
Ok, I am think I am a little more knowledgeable about C and pointers, ughh.
And likewise, I want to fix C.....and not so much to make a C++ or Java or
C# or even D like language.
So, if I...
|
by: JohnQ |
last post by:
I like, non-copyable, non-assignable and, most often,
non-default-constructable also, as a starting point for class design:
class SomeClass
{
SomeClass(); // disallow default construction...
|
by: JohnQ |
last post by:
Are a default constructor, destructor, copy constructor and assignment
operator generated by the compiler for a struct if they are not explicitely
defined?
I think the answer is yes, because...
|
by: Nickolai Leschov |
last post by:
Hello all,
I am programming an embedded controller that has a 'C' library for using
its system functions (I/O, timers, all the specific devices). The
supplied library has .LIB and .H files.
...
|
by: =?GB2312?B?yum09MXt?= |
last post by:
today I forgot to include some header,then I found the error message by the compiler is quite strange.
so I want to know exactly the inner details of the compiler impletation,if possible.
and I...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |