Project Description
A simple command line compiler for pre-building regular expressions into DLL assemblies. RegexC reads type names and regexes from a plain text source file, and calls Regex.CompileToAssembly() to package them into a reusable DLL.

The "source" language is simply a comma-delimited table of type names, regex options, and the regex pattern. Lines beginning with # are ignored. For example:

#
# Bootstrap.rgc
#
# Regular expressions used to parse the RegexC language, itself!
#
[version(2.0.0.0)]
[keyname(Jitsu)]

Jitsu.RegexC.RegularExpressions.CommandLineSwitch, IgnoreCase|IgnorePatternWhitespace|ExplicitCapture, ^[\-\/] (?<switch> \? | o(ut)?[:](?<outputpath> .* ) )$

Jitsu.RegexC.RegularExpressions.VersionLine, IgnoreCase|IgnorePatternWhitespace|ExplicitCapture, ^\[version\((?value\d\.\d\.\d\.\d)\)\]$
Jitsu.RegexC.RegularExpressions.KeynameLine, IgnoreCase|IgnorePatternWhitespace|ExplicitCapture, ^\[keyname\((?value.)\)\]$
Jitsu.RegexC.RegularExpressions.KeyfileLine, IgnoreCase|IgnorePatternWhitespace|ExplicitCapture, ^\[keyfile\((?value.)\)\]$
Jitsu.RegexC.RegularExpressions.CommentLine, IgnoreCase|IgnorePatternWhitespace|ExplicitCapture, ^\#.*$
Jitsu.RegexC.RegularExpressions.RegexLine, IgnoreCase|IgnorePatternWhitespace|ExplicitCapture, ^(?<namespace>(\w+\.)*)(?<typename>\w+),\s*(?<options>(\w+\|)*(\w+)),\s*(?<pattern>.+)$

Last edited Jun 21, 2008 at 1:56 AM by ShawnVN, version 6