Click here to Skip to main content
15,892,927 members
Articles / Containers / Virtual Machine

Parsing Expression Grammar Support for C# 3.0 Part 1 - PEG Lib and Parser Generator

Rate me:
Please Sign up or sign in to vote.
4.95/5 (49 votes)
7 Oct 2008CPOL40 min read 204.5K   2.1K   118  
Introduction to the parsing method PEG with library and parser generator
public class Color
{
	public static readonly Color Black = new Color(0, 0, 0);
	public static readonly Color White = new Color(255, 255, 255);
	public static readonly Color Red = new Color(255, 0, 0);
	public static readonly Color Green = new Color(0, 255, 0);
	public static readonly Color Blue = new Color(0, 0, 255);
	private byte r, g, b;
	public Color(byte r, byte g, byte b) {
		this.r = r;
		this.g = g;
		this.b = b;
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Switzerland Switzerland
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions