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

Code related to LLLPG, the Loyc LL(k) Parser Generator (LLLPG.exe). More...

Classes

class  ActionPred
 
class  Alts
 Describes a series of alternatives (branches), a kleene star (*), or an optional element (?). More...
 
class  AndPred
 Represents a zero-width assertion: either user-defined code to check a condition, or a predicate that scans ahead in the input and then backtracks to the starting point. More...
 
class  AutoValueSaverVisitor
 Helper class invoked just after StageTwoParser. Its job is to create variables referenced by labels (label:item) and by code blocks ($RuleName), to modify the code blocks to remove the $ operator, and to update the ResultSaver of each labeled predicate. Also supports $result. More...
 
class  CodeGenHelperBase
 Suggested base class for custom code generators. Each derived class is typically designed for a different kind of token. More...
 
class  DefaultErrorBranch
 A singleton to be used as the value of Alts.ErrorBranch, representing the default_error branch. More...
 
class  EndOfRule
 A container for the follow set of a Rule. More...
 
class  Gate
 Represents a "gate" (p => m), which is a mechanism to separate prediction from matching in the context of branching (Alts). More...
 
class  GeneralCodeGenHelper
 General-purpose code generator that supports any language with a finite number of input symbols represented by LNode expressions. This is the code generator helper for LLLPG parser {...}. More...
 
struct  IntRange
 Represents a range of single characters (e.g. 'A'..'Z'). More...
 
class  IntSet
 Represents a set of characters (e.g. 'A'..'Z' | 'a'..'z' | '_'), or a set of token IDs. More...
 
class  IntStreamCodeGenHelper
 Standard code generator for character/integer input streams and is the default code generator for LLParserGenerator. This is the code generator helper for LLLPG lexer {...}. More...
 
interface  IPGCodeGenHelper
 A class that implements this interface will generate small bits of code that the parser generator will use. The default implementation is IntStreamCodeGenHelper. To install a new code generator, set the LLParserGenerator.CodeGenHelper property or supply the generator in the constructor of LLParserGenerator. More...
 
interface  IPGTerminalSet
 This interface represents a set of terminals (and only a set of terminals, unlike TerminalPred which includes actions and a Basis Node). Typical lexers and parsers use PGIntSet and PGNodeSet, respectively. More...
 
class  LLParserGenerator
 Encapsulates LLLPG, the Loyc LL Parser Generator, which generates LL(k) recursive-descent parsers. More...
 
class  LlpgAutoValueSaverVisitorTests
 
class  LlpgBugsAndSlugs
 Tests for known slugs (slowness bugs) and fixed bugs (regressions) More...
 
class  LlpgCoreTests
 These are basic tests of the core engine, LLParserGenerator.
 
class  LlpgGeneralTests
 Tests LLLPG with the whole LeMP.MacroProcessor pipeline.
 
class  LlpgGeneralTestsBase
 Shared base class for "full-stack" LLLPG tests that use LeMP, the Ecs parser, and LLLPG macros in addition to the core engine. More...
 
class  LlpgHelpers
 Helper methods for making LLLPG grammar nodes. Used by LlpgCoreTests. More...
 
class  LlpgParserTests
 Tests the stage 1 parser and the stage 2 parser.
 
class  LlpgTestLargerExamples
 
class  PGIntSet
 Represents a set of characters (e.g. 'A'..'Z' | 'a'..'z' | '_'), or a set of integers, used in the grammar of a parser. More...
 
class  PGNodeSet
 An immutable set that implements IPGTerminalSet so that it can be used by LLParserGenerator. More...
 
class  PGTerminalSet
 Extension methods for IPGTerminalSet. More...
 
class  Pred
 Represents part of a grammar for the LLParserGenerator. More...
 
class  PredVisitor
 Base class for implementing a visitor that examines a tree of LLLPG Predicates. More...
 
class  Program
 Entry point of LLLPG.exe, with QuickRun() method to help invoke LLLPG programmatically. More...
 
class  RecursivePredVisitor
 Base class for implementing a visitor that examines a tree of LLLPG Predicates. The default implementation of Visit(P) for each predicate type P recursively visits the children of the P. More...
 
class  RecursiveReplacementPredVisitor
 Base class for visitors that can replace predicates entirely. More...
 
class  Rule
 Represents an LLLPG rule, which is a Predicate plus a Name and optional attributes (e.g. token, private, etc.). More...
 
class  RuleRef
 Represents a nonterminal, which is a reference to a rule. More...
 
class  Seq
 Represents a sequence of predicates (Preds). More...
 
class  TerminalPred
 Represents a terminal (which is a token or a character) or a set of possible terminals (e.g. 'A'..'Z'). More...
 
class  ZeroWidthPred
 

Typedefs

using S = Loyc.Ecs.EcsCodeSymbols
 
using TT = TokenType
 

Enumerations

enum  LoopMode { None, Opt, Star }
 Types of Alts objects. More...
 
enum  BranchMode {
  None, Default, ErrorExit,
  ErrorContinue
}
 Types of branches in an Alts object (used during parsing only). More...
 

Detailed Description

Code related to LLLPG, the Loyc LL(k) Parser Generator (LLLPG.exe).

Enumeration Type Documentation

◆ BranchMode

Types of branches in an Alts object (used during parsing only).

◆ LoopMode

Types of Alts objects.

Although x? can be simulated with (x|), we keep them as separate modes for reporting purposes.