Enhanced C#
Language of your choice: library documentation

Documentation moved to ecsharp.net

GitHub doesn't support HTTP redirects, so you'll be redirected in 3 seconds.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Public fields | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
LeMP.TestCompiler Class Reference

A simple version of Compiler that takes a single input and produces a StringBuilder. Pre-opens LeMP.Prelude namespace. More...


Source file:
Inheritance diagram for LeMP.TestCompiler:
LeMP.Compiler Loyc.LLParserGenerator.LlpgGeneralTestsBase.TestCompiler

Remarks

A simple version of Compiler that takes a single input and produces a StringBuilder. Pre-opens LeMP.Prelude namespace.

Public fields

StringBuilder Output
 
VList< LNodeResults
 
- Public fields inherited from LeMP.Compiler
List< InputOutputFiles
 
bool Parallel = true
 
string IndentString = "\t"
 
string NewlineString = "\n"
 
MacroProcessor MacroProcessor
 
IParsingService InLang
 
LNodePrinter OutLang
 
string OutExt
 
bool ForceInLang
 

Public Member Functions

 TestCompiler (IMessageSink sink, ICharSource text, string fileName="")
 
- Public Member Functions inherited from LeMP.Compiler
 Compiler (IMessageSink sink, Type prelude=null, bool registerEcsAndLes=true)
 
 Compiler (IMessageSink sink, Type prelude, IEnumerable< InputOutput > sourceFiles)
 
BMultiMap< string, string > ProcessArguments (IList< string > args, bool warnAboutUnknownOptions, bool autoOpenInputFiles, IList< string > inputFiles=null)
 Processes command-line arguments to build a BMultiMap and sends those options to the other overload of this method. More...
 
bool ProcessArguments (BMultiMap< string, string > options, bool warnAboutUnknownOptions, IList< string > inputFiles=null)
 Processes all standard command-line arguments from KnownOptions, except –help. More...
 
void AddStdMacros ()
 Adds standard macros from LeMP.StdMacros.dll, and adds the namespaces LeMP and LeMP.Prelude to the pre-opened namespace list. More...
 
void CompleteInputOutputOptions ()
 Fills in all fields of Files that are still null, based on the command-line options. Calling this is optional, since Run() calls it anyway. More...
 
void CompleteInputOutputOptions (InputOutput file)
 
bool AddMacros (Assembly assembly)
 
void Run ()
 Runs the MacroProcessor on all input Files. More...
 

Static Public Member Functions

static void Test (string input, string output, IMessageSink sink, int maxExpand=0xFFFF)
 
static string StripExtraWhitespace (string a, string[] commentPrefixes=null)
 Strips whitespace and single-line comments from a string. Helps test whether two blocks of code are "sufficiently equal". More...
 
- Static Public Member Functions inherited from LeMP.Compiler
static void Main (string[] args)
 
static void WarnAboutUnknownOptions (BMultiMap< string, string > options, IMessageSink sink, IDictionary< string, Pair< string, string >> knownOptions)
 
static bool MaybeShowHelp (ICollection< KeyValuePair< string, string >> options, ICollection< KeyValuePair< string, Pair< string, string >>> knownOptions, TextWriter @out=null)
 
static void ShowHelp (IEnumerable< KeyValuePair< string, Pair< string, string >>> knownOptions, TextWriter @out=null, bool includeUsageLine=true)
 
static List< InputOutputOpenSourceFiles (IMessageSink sink, IEnumerable< string > fileNames)
 Opens a set of source files by file name, and creates a text file for each. More...
 

Protected Member Functions

override void WriteOutput (InputOutput io)
 

Additional Inherited Members

- Public static fields inherited from LeMP.Compiler
static InvertibleSet< string > TwoArgOptions = new InvertibleSet<string>(new[] { "macros" })
 
static Dictionary< char, string > ShortOptions
 
static MMap< string, Pair
< string, string > > 
KnownOptions
 
- Properties inherited from LeMP.Compiler
IMessageSink Sink [get, set]
 
int MaxExpansions [get, set]
 
TimeSpan AbortTimeout [get, set]
 
bool Verbose [get]
 

Member Function Documentation

static string LeMP.TestCompiler.StripExtraWhitespace ( string  a,
string[]  commentPrefixes = null 
)
inlinestatic

Strips whitespace and single-line comments from a string. Helps test whether two blocks of code are "sufficiently equal".