Click here to Skip to main content
15,914,016 members
Home / Discussions / C#
   

C#

 
GeneralRe: dynami array Pin
DaveyM6928-Jul-09 6:15
professionalDaveyM6928-Jul-09 6:15 
GeneralRe: dynami array Pin
mypicturefaded28-Jul-09 6:17
mypicturefaded28-Jul-09 6:17 
QuestionUsing a Custom ScrollBar Within a TreeView C# Pin
Zap-Man28-Jul-09 5:42
Zap-Man28-Jul-09 5:42 
QuestionCalculate Accounting Period from Date Pin
drodgers28-Jul-09 4:51
drodgers28-Jul-09 4:51 
AnswerRe: Calculate Accounting Period from Date Pin
DaveyM6928-Jul-09 5:14
professionalDaveyM6928-Jul-09 5:14 
AnswerRe: Calculate Accounting Period from Date Pin
Nagy Vilmos28-Jul-09 5:17
professionalNagy Vilmos28-Jul-09 5:17 
AnswerRe: Calculate Accounting Period from Date Pin
DoctorMick28-Jul-09 5:19
DoctorMick28-Jul-09 5:19 
QuestionFor Loop Pattern to use in Parsing - C# code Pin
gamer112728-Jul-09 4:18
gamer112728-Jul-09 4:18 
Hello, I'm creating a program that will parse a for loop statement. I'm already done with some of the things that a parser does. Now my problem is about the pattern i created to check if the user's for loop syntax is correct.

First i ask the user to enter an example of a for loop statement syntax.

ex. for(int x=0; x<5; x++) Console.WriteLine("Hello World");

After that I'll just check if the example follows the syntax of a for loop statement.
To check if the syntax is correct i created a for loop statement pattern to compare it with the user's for loop statement.

Here is the pattern:

public static string forLoopPattern =
          @"([for])" +
          @"([(])" +
          @"([int]\ \\)" +
          @"([a-z])" +
          @"([=])" +
          @"([0-9])" +
          @"([;])" +
          @"([a-z])" +
          @"([>,<,=,<=,>=,=<,=>])" +
          @"([0-9])" +
          @"([;])" +
          @"([a-z])" +
          @"([++,--])" +
          @"([)])";


Is that pattern correct? If not what should i change or do to make it correct? Also, i don't know yet if that pattern really works or not. How will i be able to check if that pattern works?

Please Help..thanks..
AnswerRe: For Loop Pattern to use in Parsing - C# code Pin
musefan28-Jul-09 4:33
musefan28-Jul-09 4:33 
GeneralRe: For Loop Pattern to use in Parsing - C# code Pin
Chris Trelawny-Ross28-Jul-09 4:58
Chris Trelawny-Ross28-Jul-09 4:58 
GeneralRe: For Loop Pattern to use in Parsing - C# code Pin
PIEBALDconsult28-Jul-09 5:41
mvePIEBALDconsult28-Jul-09 5:41 
GeneralRe: For Loop Pattern to use in Parsing - C# code Pin
Vikram A Punathambekar28-Jul-09 6:35
Vikram A Punathambekar28-Jul-09 6:35 
GeneralRe: For Loop Pattern to use in Parsing - C# code Pin
PIEBALDconsult28-Jul-09 7:04
mvePIEBALDconsult28-Jul-09 7:04 
GeneralRe: For Loop Pattern to use in Parsing - C# code Pin
Vikram A Punathambekar28-Jul-09 7:19
Vikram A Punathambekar28-Jul-09 7:19 
GeneralRe: For Loop Pattern to use in Parsing - C# code Pin
PIEBALDconsult28-Jul-09 7:31
mvePIEBALDconsult28-Jul-09 7:31 
GeneralRe: For Loop Pattern to use in Parsing - C# code Pin
PIEBALDconsult29-Jul-09 6:22
mvePIEBALDconsult29-Jul-09 6:22 
AnswerRe: For Loop Pattern to use in Parsing - C# code Pin
gamer112728-Jul-09 4:43
gamer112728-Jul-09 4:43 
AnswerRe: For Loop Pattern to use in Parsing - C# code Pin
OriginalGriff28-Jul-09 4:49
mveOriginalGriff28-Jul-09 4:49 
AnswerRe: For Loop Pattern to use in Parsing - C# code Pin
Pete O'Hanlon28-Jul-09 4:51
mvePete O'Hanlon28-Jul-09 4:51 
AnswerRe: For Loop Pattern to use in Parsing - C# code Pin
gamer112728-Jul-09 5:15
gamer112728-Jul-09 5:15 
AnswerRe: For Loop Pattern to use in Parsing - C# code Pin
harold aptroot28-Jul-09 6:05
harold aptroot28-Jul-09 6:05 
AnswerRe: For Loop Pattern to use in Parsing - C# code Pin
PIEBALDconsult28-Jul-09 6:11
mvePIEBALDconsult28-Jul-09 6:11 
QuestionFiring up the event when string text is changed Pin
Blubbo28-Jul-09 4:15
Blubbo28-Jul-09 4:15 
AnswerRe: Firing up the event when string text is changed Pin
Vimalsoft(Pty) Ltd28-Jul-09 4:19
professionalVimalsoft(Pty) Ltd28-Jul-09 4:19 
GeneralRe: Firing up the event when string text is changed Pin
Blubbo28-Jul-09 4:22
Blubbo28-Jul-09 4:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.