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
Classes | Typedefs | Enumerations
Package Loyc.Ecs.Parser

Enhanced C# parser More...

Classes

class  CommentSaver
 A helper class that removes comments from a token stream, saving them into a list. This class deletes whitespace, but adds tokens to a list. More...
 
class  EcsLexer
 Lexer for EC# source code (see ILexer{Token}). More...
 
class  EcsLexerTests
 
class  EcsParser
 Parses Enhanced C# code into a sequence of Loyc trees (LNode), one per top-level statement. More...
 
class  EcsPreprocessor
 Handles EC# processor directives. More...
 
class  TokenExt
 Provides the Type() extension method required by Token and the ToString(Token) method to express an EC# token as a string, for tokens that contain sufficient information to do so. More...
 

Typedefs

using TT = TokenType
 
using S = CodeSymbols
 
using EP = EcsPrecedence
 

Enumerations

enum  TokenType {
  EOF = 0, Spaces = TokenKind.Spaces + 1, Newline = TokenKind.Spaces + 2,
  SLComment = TokenKind.Comment, MLComment = TokenKind.Comment + 1, Shebang = TokenKind.Comment + 2,
  Id = TokenKind.Id, ContextualKeyword = TokenKind.Id + 1, Base = TokenKind.Id + 2,
  This = TokenKind.Id + 3, Literal = TokenKind.Literal, Comma = TokenKind.Separator,
  Semicolon = TokenKind.Separator + 1, LParen = TokenKind.LParen, RParen = TokenKind.RParen,
  LBrack = TokenKind.LBrack, RBrack = TokenKind.RBrack, LBrace = TokenKind.LBrace,
  RBrace = TokenKind.RBrace, AttrKeyword = TokenKind.AttrKeyword, TypeKeyword = TokenKind.TypeKeyword,
  Break = TokenKind.OtherKeyword + 1, Case = TokenKind.OtherKeyword + 2, Checked = TokenKind.OtherKeyword + 3,
  Class = TokenKind.OtherKeyword + 4, Continue = TokenKind.OtherKeyword + 5, Default = TokenKind.OtherKeyword + 6,
  Delegate = TokenKind.OtherKeyword + 7, Do = TokenKind.OtherKeyword + 8, Enum = TokenKind.OtherKeyword + 9,
  Event = TokenKind.OtherKeyword + 10, Fixed = TokenKind.OtherKeyword + 11, For = TokenKind.OtherKeyword + 12,
  Foreach = TokenKind.OtherKeyword + 13, Goto = TokenKind.OtherKeyword + 14, If = TokenKind.OtherKeyword + 15,
  Interface = TokenKind.OtherKeyword + 16, Lock = TokenKind.OtherKeyword + 17, Namespace = TokenKind.OtherKeyword + 18,
  Return = TokenKind.OtherKeyword + 19, Struct = TokenKind.OtherKeyword + 20, Switch = TokenKind.OtherKeyword + 21,
  Throw = TokenKind.OtherKeyword + 22, Try = TokenKind.OtherKeyword + 23, Unchecked = TokenKind.OtherKeyword + 24,
  Using = TokenKind.OtherKeyword + 25, While = TokenKind.OtherKeyword + 26, Operator = TokenKind.OtherKeyword + 32,
  Sizeof = TokenKind.OtherKeyword + 33, Typeof = TokenKind.OtherKeyword + 34, Else = TokenKind.OtherKeyword + 40,
  Catch = TokenKind.OtherKeyword + 41, Finally = TokenKind.OtherKeyword + 42, In = TokenKind.OtherKeyword + 48,
  As = TokenKind.OtherKeyword + 49, Is = TokenKind.OtherKeyword + 50, New = TokenKind.OtherKeyword + 56,
  Out = TokenKind.OtherKeyword + 57, Stackalloc = TokenKind.OtherKeyword + 58, PPif = TokenKind.Other + 64,
  PPelse = TokenKind.Other + 65, PPelif = TokenKind.Other + 66, PPendif = TokenKind.Other + 67,
  PPdefine = TokenKind.Other + 68, PPundef = TokenKind.Other + 69, PPwarning = TokenKind.Other + 70,
  PPerror = TokenKind.Other + 71, PPnote = TokenKind.Other + 72, PPline = TokenKind.Other + 73,
  PPregion = TokenKind.Other + 74, PPendregion = TokenKind.Other + 75, PPpragma = TokenKind.Other + 76,
  PPignored = TokenKind.Other + 77, Dot = TokenKind.Dot, PtrArrow = TokenKind.Dot + 1,
  ColonColon = TokenKind.Dot + 2, NullDot = TokenKind.Dot + 3, Set = TokenKind.Assignment,
  CompoundSet = TokenKind.Assignment + 1, QuickBindSet = TokenKind.Assignment + 2, Colon = TokenKind.Operator,
  At = TokenKind.Operator + 1, BQString = TokenKind.Operator + 2, Backslash = TokenKind.Operator + 4,
  Mul = TokenKind.Operator + 5, DivMod = TokenKind.Operator + 6, Power = TokenKind.Operator + 7,
  Add = TokenKind.Operator + 8, Sub = TokenKind.Operator + 9, IncDec = TokenKind.Operator + 10,
  And = TokenKind.Operator + 11, OrXor = TokenKind.Operator + 12, Not = TokenKind.Operator + 14,
  AndBits = TokenKind.Operator + 15, OrBits = TokenKind.Operator + 16, XorBits = TokenKind.Operator + 17,
  NotBits = TokenKind.Operator + 18, EqNeq = TokenKind.Operator + 19, LT = TokenKind.Operator + 20,
  GT = TokenKind.Operator + 21, LEGE = TokenKind.Operator + 22, DotDot = TokenKind.Operator + 23,
  QuestionMark = TokenKind.Operator + 24, NullCoalesce = TokenKind.Operator + 25, QuickBind = TokenKind.Operator + 26,
  Forward = TokenKind.Operator + 27, Substitute = TokenKind.Operator + 28, LambdaArrow = TokenKind.Operator + 29,
  Unknown = TokenKind.Other
}
 

Detailed Description

Enhanced C# parser