Enhanced C#
Language of your choice: library documentation
Classes | Typedefs | Enumerations
Loyc.Syntax.Les Namespace Reference

Contains classes related to Loyc Expression Syntax (LES), including the parser and printer (reachable through Loyc.Syntax.Les.LesLanguageService). More...

Classes

struct  CustomLiteral
 A custom literal is a normal number or string paired with a (typically unrecognized) type prefix or suffix. More...
 
class  DefaultNodePrinterWriter
 Base class for the helper classes of Les2Printer and Ecs.EcsNodePrinter, called LesNodePrinterWriter and EcsNodePrinterWriter. See INodePrinterWriter. More...
 
interface  INodePrinterWriter
 This interface is implemented by helper objects that handle the low-level details of node printing. It is used by Les2Printer. More...
 
class  Les2LanguageService
 The Value property provides easy access to the lexer, parser and printer for Loyc Expression Syntax (LES). More...
 
class  Les2Lexer
 Lexer for EC# source code. More...
 
class  Les2Parser
 Parses LES (Loyc Expression Syntax) code into a sequence of Loyc trees (LNode), one per top-level statement. More...
 
class  Les2Printer
 Prints a Loyc tree in LES (Loyc Expression Syntax) format. More...
 
class  Les2PrinterOptions
 Options to control the way Loyc trees are printed by Les2Printer. More...
 
class  Les3LanguageService
 
class  Les3Lexer
 
class  Les3Parser
 
class  Les3PrettyPrinter
 A variant of Les3Printer that adds syntax highlighting in one of three ways: as console output, as HTML output, or as LesColorCode control codes. More...
 
class  Les3Printer
 
class  Les3PrinterOptions
 
class  LesLanguageService
 Alternate name for Les2LanguageService (will change to Les3LanguageService in the future) More...
 
class  LesPrecedence
 Contains Precedence objects that represent the precedence levels of LES. More...
 
class  LesPrecedenceMap
 This class's main job is to maintain a table of Precedence values for LES operators. When you ask about a new operator, its precedence is cached for future reference. More...
 
class  NodePrinterWriterBase
 Abstract base class for INodePrinterWriter. Has an protected _indentLevel field that is increased by Indent() and decreased by Dedent(). More...
 
class  TokenExt
 Provides the Type() extension method required by Token and the ToString(Token) method to express an LES token as a string, for tokens that contain sufficient information to do so. More...
 

Typedefs

using TT = TokenType
 
using S = CodeSymbols
 
using P = LesPrecedence
 

Enumerations

enum  LesColorCode {
  None = 0, Comment = 14, Id = 15,
  Number = 16, String = 17, CustomLiteral = 18,
  KeywordLiteral = 19, Operator = 21, Separator = 22,
  Attribute = 23, Keyword = 25, SpecialId = 26,
  Unknown = 28, Opener = 29, Closer = 30
}
 These codes are produced as control characters (i.e. cast to char) in the output of Les3PrettyPrinter. More...
 
enum  TokenType {
  EOF = 0, Newline = TokenKind.Spaces + 2, SLComment = TokenKind.Comment,
  MLComment = TokenKind.Comment + 1, Shebang = TokenKind.Comment + 2, Id = TokenKind.Id,
  BQId = TokenKind.Id + 1, Literal = TokenKind.Literal, NegativeLiteral = TokenKind.Literal + 1,
  Dot = TokenKind.Dot, Assignment = TokenKind.Assignment, NormalOp = TokenKind.Operator,
  PreOrSufOp = TokenKind.Operator + 1, PrefixOp = TokenKind.Operator + 2, At = TokenKind.Operator + 5,
  Not = TokenKind.Operator + 6, BQOperator = TokenKind.Operator + 7, Colon = TokenKind.Operator + 8,
  Comma = TokenKind.Separator, Semicolon = TokenKind.Separator + 1, LParen = TokenKind.LParen,
  SpaceLParen = TokenKind.LParen + 1, RParen = TokenKind.RParen, LBrack = TokenKind.LBrack,
  RBrack = TokenKind.RBrack, LBrace = TokenKind.LBrace, LTokenLiteral = TokenKind.LBrace + 1,
  RBrace = TokenKind.RBrace, Unknown = TokenKind.Other
}
 

Detailed Description

Contains classes related to Loyc Expression Syntax (LES), including the parser and printer (reachable through Loyc.Syntax.Les.LesLanguageService).

Enumeration Type Documentation

These codes are produced as control characters (i.e. cast to char) in the output of Les3PrettyPrinter.

A note about implementation coupling: Les3PrettyPrinter relies on color codes provided to it by the base class Les3Printer.