RegexEnumTerm<TValue> : RegexBasedTerminal where TValue : enum

A RegexBasedTerminal subclass that parses matched text to the supplied Enum type TValue. Yes, the compile-time constraint is really TValue : struct, but at run-time an exception is thrown if TValue is not an Enum type.

  • protected Func<string,TValue> FromString { get; set; }
  • protected Type EnumType { get; set; }
  • protected virtual TValue ConvertValue(ParsingContext context, string textValue);


TransientNonTerminal : NonTerminal

A NonTerminal subclass that automatically sets itself as transient, and will not accept an AstNode creation- specifier in its constructor.

TypedNonTerminal<TAstNodeType> : NonTerminal where TAstNodeType : AstNode<AstContext>

A NonTerminal_ subclass that automatically names itself by stripping "AstNode" from the name of the AstNodeType supplied to its constructor.
  • public TypedNonTerminal()

TypedNonTerminal<TAstContext,TAstNodeType> : NonTerminal where TAstNodeType : AstNode<TAstContext> where TAstContext : AstContext

As TypedNonTerminal<TAstNodeType>, but supporting a customized AstContext.
  • public TypedNonTerminal()

CommandNonTerminal <TClass,TValue : NonTerminal where TClass : new where TValue : struct

A NonTerminal subclass that designed to set an AstContext field in a type-safe manner.
  • public CommandNonTerminal(Expression<Func<TClass,TValue>> getter) : base(((MemberExpression)getter.Body).Member.Name)
Returns a NonTerminal publishing an internal AstNodeCreator using a <i>setter</i> for the given class constructed from the supplied <i>getter</i> as its fieldUpdater.

Last edited Nov 7, 2012 at 4:24 PM by pgeerkens, version 4


No comments yet.