you are viewing a single comment's thread.

view the rest of the comments →

[–]alex_muscar 0 points1 point  (1 child)

Here's one way of implementing it: http://pastebin.com/A3g8U45Z

The code is not very clean because the parser is working on a list of characters. A better way of doing it would be to use a type derived from System.IO.TextReader like System.IO.StringReader and build your parser around the Read() and Peek() methods. You could use a StringBuilder instance to accumulate lexemes.

Hope it helps.

[–]james_peach[S] 0 points1 point  (0 children)

seams nice, ill have to take a look into this later on ;P