Hello !
I've been building a simple designer which accepts source code in c and parses c keywords to display appropriate symbols.
I've finished designing all the shapes.

I've got a textbox to accept input. I would like to parse the entered c code.
How would I parse a C code in C#? What would be a simple way to check for the keywords in the textbox and parse them?
How should I do it? Any suggestion would be helpful.

Thanks !

I once made a console calculator who can parse variables and some reserved words.
Perhaps you could convert that to fit your needs.
This is the first snippet : Part 1 : the scanner
You can find part 2 the parser and part 3 the main program, in my posted snippets. Hope it helps

commented: Thanks, that was definitely useful! I'm gonna go through that now. +0
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.