Enhanced C#
Language of your choice: library documentation
Namespaces | Classes | Typedefs | Enumerations | Functions
LeMP Namespace Reference

The lexical macro processor. Main classes: LeMP.Compiler and LeMP.MacroProcessor. More...

Namespaces

namespace  Prelude
 Defines prelude macros, which are predefined macros that normally do not have to be explicitly imported before use (in LES or EC#).
 
namespace  Tests
 Contains tests for the LeMP.MacroProcessor and for standard LeMP macros.
 

Classes

class  Compiler
 A class that helps you invoke MacroProcessor on on a set of source files, given a set of command-line options. More...
 
class  ContainsMacrosAttribute
 Marks a class to be searched for macros. More...
 
interface  IMacroContext
 This interface provides services offered by the lexical macro processor (LeMP). More...
 
class  InputOutput
 For LeMP: an input file plus per-file options (input and output language) and output code. More...
 
class  LexicalMacroAttribute
 Marks a method as a LeMP lexical macro. More...
 
class  MacroContext
 Standard extension methods for IMacroContext. More...
 
class  MacroInfo
 Data returned from IMacroContext.AllKnownMacros More...
 
class  MacroProcessor
 Encapsulates the LeMP engine, a simple LISP-style macro processor, suitable for running LLLPG and other lexical macros. More...
 
class  MacroProcessorTests
 
class  TestCompiler
 A simple version of Compiler that takes a single input and produces a StringBuilder. Pre-opens LeMP.Prelude namespaces. More...
 

Typedefs

using S = CodeSymbols
 

Enumerations

enum  MacroMode {
  MacroMode.Normal = 0, MacroMode.NoReprocessing = 1, MacroMode.ProcessChildrenAfter = 2,
  MacroMode.ProcessChildrenBefore = 4, MacroMode.Passive = 8, MacroMode.AllowDuplicates = 16,
  MacroMode.DropRemainingListItems = 32, MacroMode.MatchIdentifier = 64, MacroMode.PriorityFallbackMin = 0x100,
  MacroMode.PriorityFallback = 0x300, MacroMode.PriorityInternalFallback = 0x400, MacroMode.PriorityNormal = 0x500,
  MacroMode.PriorityInternalOverride = 0x600, MacroMode.PriorityOverride = 0x700, MacroMode.PriorityOverrideMax = 0x900,
  MacroMode.PriorityMask = 0xF00
}
 Flags that affect the way that LeMP.MacroProcessor uses a LexicalMacro. More...
 

Functions

delegate LNode LexicalMacro (LNode node, IMacroContext context)
 Method signature of an LeMP macro. More...
 

Detailed Description

The lexical macro processor. Main classes: LeMP.Compiler and LeMP.MacroProcessor.

Enumeration Type Documentation

◆ MacroMode

enum LeMP.MacroMode
strong

Flags that affect the way that LeMP.MacroProcessor uses a LexicalMacro.

Enumerator
Normal 

The macro's result is reprocessed directly (this is the default behavior).

NoReprocessing 

The macro's result (including children) is not processed further. This flag only takes effect when the macro accepts the input by returning a non-null result.

ProcessChildrenAfter 

The macro's result is not reprocessed, but the result's children are processed. This flag only takes effect when the macro accepts the input by returning a non-null result.

ProcessChildrenBefore 

The result is pre-processed before calling the macro, and not processed afterward (if the macro accepts the input by returning a non-null result).

Passive 

It is normal for this macro not to change the code, so a warning should not be printed when the macro "rejects" the input by returning null.

AllowDuplicates 

If this macro is ambiguous with one or more macro of the same priority, this flag blocks the ambiguity error message if all the macros produce equivalent results.

DropRemainingListItems 

If this macro succeeds, all nodes after this one in the current attribute or statement/argument list are dropped.

This option may be used by macros that splice together the list of IMacroContext.RemainingNodes into their own result. It is more common, however, to set the IMacroContext.DropRemainingNodes property inside the macro.

MatchIdentifier 

If this flag is present, the macro can match a plain identifier. By default, only calls can be treated as macros.

This flag does not prevent the macro from matching calls.

PriorityFallbackMin 

Lowest priority. If this macro is ambiguous with another macro that doesn't have this flag, the results produced by the other macro are used (note: only one priority flag can be used at a time).

PriorityFallback 

Low priority. If this macro is ambiguous with another macro that doesn't have this flag nor FallbackMin, the results produced by the other macro are used (note: only one priority flag can be used at a time).

PriorityInternalFallback 

Used to order behavior of standard macros.

PriorityNormal 

Normal priority (this is the default and does not need to be specified.)

PriorityInternalOverride 

Used to order behavior of standard macros.

PriorityOverride 

High priority. If this macro is ambiguous with another macro that doesn't have this flag nor OverrideAll, this macro takes precedence (note: only one priority flag can be used at a time).

PriorityOverrideMax 

Highest priority. If this macro is ambiguous with another macro that doesn't have this flag, the results produced by this macro are used (note: only one priority flag can be used at a time).

PriorityMask 

For internal use to isolate the priority of a macro.

Function Documentation

◆ LexicalMacro()

delegate LNode LeMP.LexicalMacro ( LNode  node,
IMacroContext  context 
)

Method signature of an LeMP macro.

Parameters
nodeThe node that caused the macro to be invoked (includes the name of the macro itself, and any attributes applied to the macro)
contextThis is a dual-purpose object. Firstly, this object implements IMessageSink. if the input does not have a valid form, the macro rejects it by returning null. Before returning null, the macro should explain the reason for the rejection (including a pattern that the macro accepts) by writinga message to this object. Secondly, this object contains additional information including the ancestors of the current node and a list of "scoped properties" (see IMacroContext.)
Returns
A node to replace the original node, or null if this macro rejects the input node. Returning null can allow a different macro to accept the node instead.

If there are multiple macros in scope with the same name, they are all called. Macro expansion succeeds if exactly one macro accepts the input. If no macros accept the input, the error message given by each macro is printed; if multiple macros accept the input, an ambiguity error is printed.

When the macro processor scans an assembly looking for macros, it requires ContainsMacrosAttribute on the containing class, and LexicalMacroAttribute on each macro in the class. The macros must be public static methods.

Referenced by LeMP.MacroInfo.GetMacros().

Loyc.TraceMessageSink.IsEnabled
bool IsEnabled(Severity type)
Always returns true.
Definition: BasicSinks.cs:160
Loyc.Collections.VListBlockOfTwo.RGet
override T RGet(int index, int localCount)
Gets an item at distance 'index' from the back (beginning of a VList)
Definition: VListBlockOfTwo.cs:78
Loyc.Collections.MinHeap
Encapsulates algorithms for a min-heap, i.e. a priority queue that always knows the smallest item and...
Definition: Heap.cs:239
Loyc.Collections.Impl.CPByteTrie.Remove
bool Remove(byte[] key, int offset, int length, ref TValue oldValue)
Removes the specified key and associated value, returning true if the entry was found and removed.
Definition: CPByteTrie.cs:118
Loyc.Collections.ISetOperations
Set-combining operations: With, Without, Union, Intersect, Except, Xor.
Definition: ISetImm.cs:24
Loyc.Ecs.Tests
Unit tests for the Enhanced C# lexer, parser and printer.
Definition: AmbiguityTests.cs:9
Loyc.Either.Select< L2, R2 >
Either< L2, R2 > Select< L2, R2 >(Func< L, L2 > selectL, Func< R, R2 > selectR)
Converts an Either to another with different types.
Loyc.Ecs.Parser.EcsParser.StartExpr
static readonly Precedence StartExpr
Below lowest precedence.
Definition: EcsParserGrammar.out.cs:138
Loyc.Collections.Impl.AListNode.HasListChanging
bool HasListChanging(AListBase< K, T > tree)
Allows derived classes of AListNode to fire the AListBase.ListChanging event.
Definition: AListNode.cs:283
Loyc.Syntax.Lexing.IndentTokenGenerator
A preprocessor usually inserted between the lexer and parser that inserts "indent",...
Definition: IndentTokenGenerator.cs:58
Loyc.Collections.MSet.IsProperSubsetOf
bool IsProperSubsetOf(MSet< T > other)
Definition: MSet.cs:272
Loyc.Collections.SelectReadOnlyCollection
Helper class for LinqToLists.
Definition: SelectCollection.out.cs:39
Loyc.Symbol.For
static Symbol For(string s)
Alias for GSymbol.Get(string). This function was introduced to match the equivalent ES6 API Symbol....
Definition: Symbol.cs:133
LeMP.IMacroContext.PreProcessChildren
LNode PreProcessChildren()
Applies all available macros to the current node's children and returns the result.
Loyc.Collections.Impl.CPByteTrie.TryGetValue
bool TryGetValue(byte[] key, out TValue value)
Finds the specified key and gets its associated value, returning true if the key was found.
Definition: CPByteTrie.cs:127
Loyc.Syntax.LNode.CallsMin
virtual bool CallsMin(string name, int minArgCount)
Returns true if this is a call with the specified name and the specified minimum number of arguments.
Definition: LNode.cs:712
Loyc.Syntax.Les.Les3LanguageService.Parse
IListSource< LNode > Parse(ILexer< Token > input, IMessageSink msgs, ParsingMode inputType=null, bool preserveComments=true)
If HasTokenizer is true, this method accepts a lexer returned by Tokenize() and begins parsing.
Definition: Les3LanguageService.cs:66
Loyc.Collections.VListBlock.MuMove
static void MuMove(WListProtected< T > w, int dffFrom, int dffTo, int count)
Moves a series of elements from one location to another in a mutable block.
Definition: VListBlock.cs:972
Loyc.Collections.BList.AddRange
int AddRange(IEnumerable< T > e)
Adds a set of items to the list, one at a time.
Definition: BList.cs:215
Loyc.Syntax.CallNode.CallsMin
override bool CallsMin(Symbol name, int argCount)
Returns true if this is a call with the specified name and the specified minimum number of arguments.
Definition: AbstractNodes.cs:140
Loyc.LLParserGenerator.LoopMode
LoopMode
Types of Alts objects.
Definition: Predicates.cs:746
Loyc.Syntax.ParsingMode.FormalArguments
static readonly ParsingMode FormalArguments
Tells IParsingService.Parse to treat the input as a formal argument list (parameter names with types)...
Definition: ParsingMode.cs:35
Loyc.LLParserGenerator.LLParserGenerator.NoDefaultArm
bool NoDefaultArm
Normally, the last arm in a list of alternatives is chosen as the default. For example,...
Definition: LLParserGenerator.cs:61
Loyc.Collections.VList.BlockChainLength
int? BlockChainLength
Gets the number of blocks used by this list.
Definition: VList.cs:274
Loyc.Math.INumTraits.SignificantBits
int SignificantBits
Returns the normal maximum number of significant (mantissa) bits for this type (not counting the sign...
Definition: Interfaces.cs:135
Loyc.Collections.Impl.InternalList.BinarySearchByIndex< Anything >
static int BinarySearchByIndex< Anything >(Anything data, int count, Func< int, Anything, int > compare, bool lowerBound)
A binary search function that knows nothing about the list being searched.
Definition: InternalList.cs:593
Loyc.LLParserGenerator.IntSet.ContainsEverything
bool ContainsEverything
Returns true iff the set covers all integers. This includes the common scenario that the set is empty...
Definition: IntSet.cs:227
Loyc.Collections.CPStringTrie.KeyEnumerator
Enumerates keys of a CPStringTrie.
Definition: CPStringTrie.cs:251
Loyc.Threading.TinyReaderWriterLock
A fast, tiny 4-byte lock to support multiple readers or a single writer. Designed for low-contention,...
Definition: ThreadEx.cs:342
Loyc.Collections.Impl.InternalList.Capacity
int Capacity
Gets or sets the array length.
Definition: InternalList.cs:93
Loyc.ITags.Tags
IDictionary< Symbol, T > Tags
Returns a dictionary that can be used to store additional state beyond the standard content of the ob...
Definition: MiscInterfaces.cs:24
System.Collections.Generic
Definition: IReadOnlyCollections.cs:6
Loyc.Collections.CPStringTrie.KeyCollection
Return value of CPStringTrie<T>.Keys.
Definition: CPStringTrie.cs:271
Loyc.Syntax.LNodePrinter.PrintMultiple
static StringBuilder PrintMultiple(ILNodePrinter printer, IEnumerable< LNode > nodes, StringBuilder sb, IMessageSink sink, ParsingMode mode, ILNodePrinterOptions options)
Converts a sequences of LNodes to strings, adding a line separator between each.
Definition: ILNodePrinter.cs:65
Loyc.MiniTest
A stripped-down NUnit lookalike which allows you to put simple unit tests in an assembly without havi...
Definition: NamespaceDocs.cs:94
Loyc.Syntax.Les.Les2PrecedenceMap.IsOpCharEx
static bool IsOpCharEx(char c)
Returns true if this character is one of those that can appear in "extended" LESv3 operators that sta...
Definition: LesPrecedenceMap.cs:232
Loyc.Collections.ListSourceAsList.CopyTo
void CopyTo(T[] array, int arrayIndex)
Copies the elements of the collection to an Array, starting at a particular array index.
Definition: ListSourceAsList.cs:75
Loyc.Collections.BMultiMap.FindLowerBound
int FindLowerBound(ref K key, out V value, out bool found)
Definition: BMultiMap.cs:371
Loyc.Syntax.Precedence.CanAppearIn
bool CanAppearIn(Precedence context, bool prefix)
For use in printers. Returns true if an operator with this precedence can appear in the specified con...
Definition: Precedence.cs:284
Loyc.Collections.Impl.InternalSet.ExceptWith
int ExceptWith(InternalSet< T > other, IEqualityComparer< T > thisComparer)
Definition: InternalSet.cs:1400
Loyc.Collections.IndexedAList.VerifyCorrectness
void VerifyCorrectness()
Definition: IndexedAList.cs:117
Loyc.LLParserGenerator.IPGTerminalSet.WithEOF
IPGTerminalSet WithEOF(bool wantEOF=true)
Adds or removes EOF from the set. If the set doesn't change, this method may return this.
Loyc.Collections.MaxHeap.Push
void Push(T item)
Adds an item to the heap. Complexity: O(Count).
Definition: Heap.cs:91
Loyc.Collections.IRange< T >
Loyc.Syntax.LineAndCol
Holds a line number (Line) and a position in the line (PosInLine). This class isn't really needed in ...
Definition: SourcePos.cs:15
Loyc.Collections.NegList.Slice
IRange< T > Slice(int start, int count=int.MaxValue)
Returns a sub-range of this list.
Definition: NegList.cs:109
Loyc.LLParserGenerator.IPGCodeGenHelper
A class that implements this interface will generate small bits of code that the parser generator wil...
Definition: IPGCodeGenHelper.cs:25
Loyc.Threading.ThreadEx.Join
bool Join(int milliseconds)
Blocks the calling thread until a thread terminates or the specified time elapses,...
Definition: ThreadEx.cs:266
Loyc.MiniTest.Assert.Contains
static void Contains(object expected, IEnumerable actual, string message, params object[] args)
Asserts that an object is contained in a list.
Definition: MiniTest.cs:970
Loyc.Collections.CG.Cache
static object Cache(ushort o)
Special overload to avoid treating argument as int32 in C#.
Definition: CG.cs:56
LeMP.ContainsMacrosAttribute
Marks a class to be searched for macros.
Definition: MacroAttributes.cs:44
Loyc.Syntax.EmptySourceFile.LineToIndex
int LineToIndex(int lineNo)
Returns the index in a source file of the beginning of the specified line, where the first line is nu...
Definition: EmptySourceFile.cs:38
Loyc.Collections.VListTransformer< T >
delegate XfAction VListTransformer< T >(int i, ref T item)
User-supplied list transformer function.
Loyc.LLParserGenerator.LLParserGenerator.PredictionAnalysisVisitor
Performs prediction analysis using the visitor pattern to visit the predicates in a rule....
Definition: AnalysisVisitors.cs:30
Loyc.Collections.AListBase.SwapHelper
void SwapHelper(AListBase< K, T > other, bool swapObservers)
Swaps two ALists.
Definition: AListBase.cs:1072
Loyc.LLParserGenerator.IPGCodeGenHelper.ExampleChar
char? ExampleChar(IPGTerminalSet set)
Returns an example of a character in the set, or null if this is not a set of characters or if EOF is...
Loyc.Localize.GlobalDefaultFormatter
static FormatterDelegate?? GlobalDefaultFormatter
Gets or sets the formatter used when one has not been assigned to the current thread with SetFormatte...
Definition: Localize.cs:217
Loyc.IMessageSink.Write
void Write(Severity level, TContext context, [Localizable] string format)
Writes a message to the target that this object represents.
Loyc.Syntax.Lexing.LexerSource.Reset
virtual new void Reset(CharSrc source, string fileName="", int inputPosition=0, bool newSourceFile=true)
Reinitializes the object. This method is called by the constructor.
Definition: LexerSource.cs:61
Loyc.Syntax.CallNode.HasSimpleHeadWithoutPAttrs
override bool HasSimpleHeadWithoutPAttrs()
Returns true if this is not a call, or if the call's Target is an Id or a Literal,...
Definition: AbstractNodes.cs:143
Loyc.Collections.CG
Contains global functions of Loyc.Collections that don't belong in any specific class.
Definition: CG.cs:9
Loyc.Syntax.IIndexPositionMapper
This interface is for classes that can convert indexes to SourcePos structures and back.
Definition: IIndexPositionMapper.cs:32
Loyc.Collections.LCInterfaces.SetAndGet< K, V >
static Maybe< V > SetAndGet< K, V >(this IDictionaryEx< K, V > dict, K key, V value)
Associates a key with a value in the dictionary, and gets the old value if the key was already presen...
Definition: IDictionaryEx.cs:157
Loyc.CheckParam
Helper methods for checking argument values that throw exceptions when an argument value is not accep...
Definition: Exceptions.cs:51
Loyc.Collections.VList.Push
VList< T > Push(T item)
Synonym for Add(); adds an item to the front of the list.
Definition: VList.cs:222
Loyc.WrapperBase.Equals
override bool Equals(object obj)
Returns true iff the parameter 'obj' is a wrapper around the same object that this object wraps.
Definition: WrapperBase.cs:23
Loyc.Collections.Impl.InternalSetStats.MaxDepthNodes
int MaxDepthNodes
Number of nodes that have an overflow list.
Definition: InternalSet.cs:1694
LeMP.MacroProcessor
Encapsulates the LeMP engine, a simple LISP-style macro processor, suitable for running LLLPG and oth...
Definition: MacroProcessor.cs:80
Loyc.Collections.FVList.Where
FVList< T > Where(Func< T, bool > filter)
Applies a filter to a list, to exclude zero or more items.
Definition: FVList.cs:539
Loyc.Ecs.Parser.EcsParser.TentativeState
Definition: EcsParser.cs:75
Loyc.Threading.TinyReaderWriterLock.EnterWriteLock
void EnterWriteLock()
Acquires the lock to protect write access to a shared resource.
Definition: ThreadEx.cs:385
Loyc.Syntax.BaseParserNoBacktracking
An base class designed for parsers that use LLLPG (Loyc LL(k) Parser Generator) and receive tokens fr...
Definition: BaseParserNoBacktracking.cs:29
Loyc.Ecs.Parser.TokenExt
Provides the Type() extension method required by Token and the ToString(Token) method to express an E...
Definition: TokenType.cs:152
Loyc.Collections.ReversedList.Equals
override bool Equals(object obj)
Returns true iff the parameter 'obj' is a wrapper around the same object that this object wraps.
Definition: ReversedList.cs:26
Loyc.Syntax.CodeSymbols.QuestionMark
static readonly Symbol QuestionMark
"?" Conditional operator. (a?b:c) <=> <tt>?(a,b,c) and int? <=> @'of(<tt>?, int)
Definition: CodeSymbols.cs:92
Loyc.Syntax.IParsingService.Tokenize
ILexer< Token > Tokenize(ICharSource text, string fileName, IMessageSink msgs)
Returns a lexer that is configured to begin reading the specified file.
Loyc.Syntax.CodeSymbols.Sub
static readonly Symbol Sub
"-" Subtraction or unary -
Definition: CodeSymbols.cs:32
Loyc.Syntax.LNode.HasSimpleHead
virtual bool HasSimpleHead()
Returns true if this is not a call, or if the call's Target is an Id or a Literal.
Definition: LNode.cs:714
Loyc.Geometry.IRectangle
Represents a mutable 2D rectangle.
Definition: IRectangle.cs:95
Loyc.LLParserGenerator.IPGCodeGenHelper.Done
void Done()
LLParserGenerator calls this method to notify the snippet generator that code generation is complete.
Loyc.Syntax.EmptySourceFile.IndexToLine
SourcePos IndexToLine(int index)
Returns the position in a source file of the specified index.
Definition: EmptySourceFile.cs:34
Loyc.Syntax.Lexing.BaseLexer.Reset
virtual void Reset(CharSrc chars, string fileName="", int inputPosition=0, bool newSourceFile=true)
Reinitializes the object. This method is called by the constructor.
Definition: BaseLexer.cs:103
Loyc.G.IsInRange
static bool IsInRange(this long num, long lo, long hi)
Returns true if num is between lo and hi.
Definition: GRange.out.cs:61
Loyc.Syntax.AbstractTriviaInjector.RunCore
IEnumerator< Pair< LNode, int > > RunCore(IEnumerator< Pair< LNode, int >> nodes, LNode parent)
Core trivia associaton algorithm.
Definition: AbstractTriviaInjector.cs:235
LeMP.IMacroContext.DropRemainingNodes
bool DropRemainingNodes
Gets or sets a value that indicates whether to drop all remaining node after the current one when the...
Definition: IMacroContext.cs:96
Loyc.Syntax.ILNodePrinterOptions.CompatibilityMode
bool CompatibilityMode
If there are multiple ways to print a given node, this option indicates that the printer should prefe...
Definition: ILNodePrinterOptions.cs:45
Loyc.Collections.Set.SetEquals
bool SetEquals(Set< T > other)
Definition: Set.cs:167
Loyc.Syntax.Les.Les3PrinterOptions.SpaceInsideGroupingParens
bool SpaceInsideGroupingParens
Whether to print a space inside grouping parentheses ( ... ).
Definition: Les3Printer.cs:1438
Loyc.Symbol.IsGlobal
bool IsGlobal
Returns true if this symbol is in the global pool (GSymbol.Pool).
Definition: Symbol.cs:75
Loyc.Collections.BList.FindLowerBound
int FindLowerBound(ref T item, out bool found)
Definition: BList.cs:363
Loyc.MiniTest.Assert.DoesNotThrow
static void DoesNotThrow(Action code)
Verifies that a delegate does not throw an exception.
Definition: MiniTest.cs:614
Loyc.ExceptionExt.ToDetailedString
static string ToDetailedString(this Exception ex)
Returns a string containing the exception type, message, Data pairs (if any) and stack strace,...
Definition: Extensions.cs:101
Loyc.Maybe.Or
T Or(T defaultValue)
Converts Maybe<T> to T, returning a default value if HasValue is false.
Loyc.G.IsInRangeExcludeHi
static bool IsInRangeExcludeHi(this int num, int lo, int hi)
Returns true if num is between lo and hi, excluding hi but not lo.
Definition: GRange.out.cs:23
Loyc.Collections.MSet.Toggle
bool Toggle(T item)
Toggle's an object's presence in the set.
Definition: MSet.cs:428
Loyc.Ecs.EcsNodePrinter.ErrorSink
IMessageSink?? ErrorSink
Any error that occurs during printing is printed to this object.
Definition: EcsNodePrinter.cs:94
Loyc.Syntax.CodeSymbols.Continue
static readonly Symbol Continue
e.g. #continue(); <=> continue;
Definition: CodeSymbols.cs:137
Loyc.Holder.Value
T Value
Any value of type T.
Definition: Holder.cs:24
Loyc.G.Verify
static bool Verify(bool condition)
Same as Debug.Assert except that the argument is evaluated even in a Release build.
Definition: G.cs:222
LeMP
The lexical macro processor. Main classes: LeMP.Compiler and LeMP.MacroProcessor.
Definition: IMacroContext.cs:8
Loyc.Collections.InvertibleSet.IsProperSupersetOf
bool IsProperSupersetOf(InvertibleSet< T > other)
Definition: InvertibleSet.cs:147
Loyc.Ecs.Parser.TokenExt.Type
static TokenType Type(this Token t)
Converts t.TypeInt to TokenType.
Definition: TokenType.cs:156
Loyc.Math.INumTraits.IsInteger
bool IsInteger
Returns true if the type represents only whole numbers.
Definition: Interfaces.cs:128
Loyc.Syntax.EscapeC.Quotes
@ Quotes
Escape single and double quotes
Loyc.Collections.VListBlock.TotalCount
int TotalCount
Returns the number of immutable elements in-use in the entire chain
Definition: VListBlock.cs:307
Loyc.Collections.VListBlock.EnsureMutable
static void EnsureMutable(WListProtected< T > w, int mutablesNeeded)
Ensures that at least the specified number of items at the front of a FWList or WList are mutable and...
Definition: VListBlock.cs:738
Loyc.Collections.ArrayOf4
Definition: ArrayOf4.cs:9
Loyc.Collections.MSet.AddUnique
void AddUnique(T item)
Adds the specified item to the set, or throws an exception if a matching item is already present.
Definition: MSet.cs:75
Loyc.Syntax.ILNodeVisitor
Interface for people that want to implement the visitor pattern with LNode. If your visitor does not ...
Definition: LNodeVisitor.cs:19
Loyc.Math.INumTraits.NegativeInfinity
T NegativeInfinity
Returns negative infinity, or throws NotSupportedException if T is unsigned.
Definition: Interfaces.cs:105
Loyc.Collections.LCInterfaces.IndexWhere< T >
static int IndexWhere< T >(this IReadOnlyList< T > source, Func< T, bool > pred)
Gets the lowest index at which a condition is true, or -1 if nowhere.
Loyc.Syntax.ILineAndColumn
A line/column pair representing a location in a text file. Numbering starts at one for both Line and ...
Definition: ILineColumnFile.cs:11
Loyc.LLParserGenerator.RecursivePredVisitor
Base class for implementing a visitor that examines a tree of LLLPG Predicates. The default implement...
Definition: PredVisitor.cs:36
Loyc.Syntax.LNodeExt.GetTrailingTrivia
static VList< LNode > GetTrailingTrivia(this VList< LNode > attrs)
Gets all trailing trivia attached to the specified node.
Definition: LNodeExt.cs:33
Loyc.Collections.Impl.InternalList.ToArray
T[] ToArray()
Makes a copy of the list, as an array
Definition: InternalList.cs:322
Loyc.Syntax.IdNode.WithArgs
override CallNode WithArgs(VList< LNode > args)
Creates a Node with a new argument list. If this node is not a call, a new node is created using this...
Definition: AbstractNodes.cs:28
Loyc.Syntax.Lexing.IndentTokenGenerator.MakeIndentToken
abstract Maybe< Token > MakeIndentToken(Token indentTrigger, ref Maybe< Token > tokenAfterward, bool newlineAfter)
Returns a token to represent indentation, or null to suppress generating an indent-dedent pair at thi...
Loyc.Threading.ThreadEx.CurrentThread
static Thread CurrentThread
Gets the currently running thread.
Definition: ThreadEx.cs:217
Loyc.Utilities.UG
Contains global functions of Loyc.Utilities that don't belong in any specific class.
Definition: UG.cs:15
Loyc.LLParserGenerator.IPGCodeGenHelper.GenerateTest
LNode GenerateTest(IPGTerminalSet set, LNode laVar)
Generates code to test whether the terminal denoted 'laVar' is in the set.
Loyc.Syntax.ILNode
A read-only interface for objects that act as Loyc trees.
Definition: ILNode.cs:44
Loyc.Collections.MMap.MMap
MMap(IEqualityComparer< K > comparer)
Creates an empty map with the specified key comparer.
Definition: MMap.cs:47
Loyc.Collections.Set.Overlaps
bool Overlaps(IEnumerable< T > other)
Returns true if this set contains at least one item from 'other'.
Definition: Set.cs:144
Loyc.Syntax.Lexing.BaseILexer.NextToken
abstract Maybe< Token > NextToken()
Scans the next token in the character stream and returns the token, or null when the end of the text ...
Loyc.Collections.Set.IsSupersetOf
bool IsSupersetOf(IEnumerable< T > other)
Returns true if all items in the other set are present in this set.
Definition: Set.cs:139
Loyc.Collections.BList.DoRange
int DoRange(AListOperation mode, IEnumerable< T > e)
Performs the same operation for each item in a series. Equivalent to calling Do(AListOperation,...
Definition: BList.cs:236
Loyc.Syntax.LineRemapper.AddRemap
void AddRemap(int realLine, int reportLine, string reportFileName=null)
Adds a mapping that starts on the specified real line.
Definition: LineRemapper.cs:91
Loyc.LLParserGenerator.AndPred.Not
new bool Not
Inverts the condition if Not==true, so that if the Pred matches, the AndPred does not match,...
Definition: Predicates.cs:866
LeMP.Tests.TestAlgebraicDataTypes
Definition: TestAlgebraicDataTypes.cs:9
Loyc.Collections.LCInterfaces.FirstIndexOf< T >
static ? int FirstIndexOf< T >(this IReadOnlyList< T > list, T item)
Determines the index of a specific value.
Definition: IListSource.cs:160
Loyc.Syntax.IndexPositionMapper.LineToIndex
int LineToIndex(int lineNo)
Returns the index in a source file of the beginning of the specified line, where the first line is nu...
Definition: IndexPositionMapper.cs:102
Loyc.Syntax.CodeSymbols.Where
static readonly Symbol Where
"#where" e.g. class Foo<T> where T:class, Foo {} <=> #class(@'of(Foo, [#where(#class,...
Definition: CodeSymbols.cs:171
Loyc.Syntax.BaseParser.LT
abstract Token LT(int i)
Returns the token at lookahead i (e.g. Source[InputPosition + i] if the tokens come from a list calle...
Loyc.Syntax.ParsingService.PushedCurrent
Returned by PushCurrent(IParsingService).
Definition: IParsingService.cs:208
Loyc.Math.IMath
Provides operations available on all system numeric types (int, uint, double, etc....
Definition: Interfaces.cs:331
Loyc.Collections.VListBlock._immCount
int _immCount
number of immutable elements in our local array, plus a "mutable" flag in bit 30.
Definition: VListBlock.cs:254
Loyc.Syntax.NodeStyle.Reserved
@ Reserved
Unassigned.
Loyc.Ecs.EcsValidators.Pedantics
Pedantics
This is needed by the EC# node printer, but perhaps no one else.
Definition: EcsValidators.cs:33
Loyc.Collections.ISparseList.InsertSpace
void InsertSpace(int index, int count=1)
Inserts empty space starting at the specified index.
Loyc.Collections.Impl.AListNode.LocalCount
abstract int LocalCount
Gets the number of items (slots) used this node only.
Definition: AListNode.cs:161
Loyc.Syntax.AbstractTriviaInjector.NextIndex
int NextIndex
Index of next trivia to be injected.
Definition: AbstractTriviaInjector.cs:96
Loyc.Collections.VList.Transform
VList< T > Transform(VListTransformer< T > x)
Transforms a list (combines filtering with selection and more).
Definition: VList.cs:607
Loyc.Collections.VListBlockArray.Add
override VListBlock< T > Add(int localIndex, T item)
Inserts a new item at the "front" of a FVList where localCount is the number of items currently in th...
Definition: VListBlockArray.cs:140
Loyc.Collections.Impl.CPByteTrie.Remove
bool Remove(byte[] key)
Removes the specified key and associated value, returning true if the entry was found and removed.
Definition: CPByteTrie.cs:102
Loyc.LLParserGenerator.BranchMode
BranchMode
Types of branches in an Alts object (used during parsing only).
Definition: Predicates.cs:749
Loyc.Utilities.GoInterface.DefineCustomWrapperCreator
static void DefineCustomWrapperCreator(GoWrapperCreator from, GoWrapperCreator forceFrom)
Defines a custom wrapper class for the type pair (Interface, T). If you want to install a custom wrap...
Definition: GoInterface.cs:534
Loyc.Collections.FVList.WhereSelect
FVList< T > WhereSelect(Func< T, Maybe< T >> filter)
Filters and maps a list with a user-defined function.
Definition: FVList.cs:558
Loyc.Collections.Impl.InternalSet.ExceptWith
int ExceptWith(IEnumerable< T > other, IEqualityComparer< T > thisComparer)
Removes all items from this set that are present in 'other'.
Definition: InternalSet.cs:1389
Loyc.Syntax.CodeSymbols.And
static readonly Symbol And
"&&" Logical short-circuit 'and' operator
Definition: CodeSymbols.cs:42
Loyc.LLParserGenerator.TerminalPred.TerminalPred
TerminalPred(LNode basis, IPGTerminalSet set, bool allowEOF=false)
Initializes the object with the specified set.
Definition: Predicates.cs:963
Loyc.Collections.Impl.KeyWalker._key
byte[] _key
the buffer may be larger than the key
Definition: CPTrieMisc.cs:132
Loyc.Syntax.PrintHelpers.EscapeCStyle
static string EscapeCStyle(UString s, EscapeC flags, char quoteType)
Escapes characters in a string using C style.
Definition: PrintHelpers.cs:37
Loyc.Utilities.SimpleTimer.ClearAfter
int ClearAfter(int minimumMillisec)
Restarts the timer from zero if the specified number of milliseconds have passed, and returns the for...
Definition: SimpleTimer.cs:85
Loyc.Collections.IAdd< T >
Loyc.Severity
Severity
A linear scale to categorize the importance and seriousness of messages sent to IMessageSink.
Definition: IMessageSink.cs:123
Loyc.Syntax.NodeStyle.PrefixNotation
@ PrefixNotation
The node should be printed in prefix notation (even if it is not the natural notation to use)....
Loyc.MiniTest.AssertionException
Thrown when an assertion fails during a call to a method of Assert.
Definition: MiniTest.cs:193
Loyc.Collections.ListExt.SortPair< T >
static bool SortPair< T >(this IList< T > list, int i, int j, Comparison< T > comp)
Sorts two items to ensure that list[i] is less than list[j].
Definition: ListExt.cs:523
LeMP.Prelude.BuiltinMacros
Defines noMacro(...) for suppressing macro expansion and import macros your.namespace....
Definition: BuiltinMacros.cs:23
Loyc.Collections.Map.Xor
Map< K, V > Xor(MapOrMMap< K, V > other)
Duplicates the current map and then modifies it so that it contains only keys that are present either...
Definition: Map.cs:338
Loyc.Collections.LCInterfaces.LastIndexWhere< T >
static int LastIndexWhere< T >(this IReadOnlyList< T > source, Func< T, bool > pred)
Gets the highest index at which a condition is true, or -1 if nowhere.
Loyc.Collections.WList.ToFWList
FWList< T > ToFWList()
Returns this list as a FWList, which effectively reverses the order of the elements.
Definition: WList.cs:266
Loyc.Collections.Impl.KeylessHashtable
A fairly obscure space-saving hashtable that offers no built-in way to store keys,...
Definition: KeylessHashtable.cs:53
Loyc.Syntax.Lexing.Token.Equals
bool Equals(Token other)
Equality depends on TypeInt and Value, but not StartIndex and Length (this is the same equality condi...
Definition: Token.cs:346
Loyc.Collections.VListBlockOfTwo.FGet
override T FGet(int index, int localCount)
Gets an item at distance 'index' from the front (beginning of an FVList)
Definition: VListBlockOfTwo.cs:63
Loyc.Syntax.CodeSymbols.Splice
static readonly Symbol Splice
When a macro returns #splice(a, b, c), the argument list (a, b, c) is spliced into the surrounding co...
Definition: CodeSymbols.cs:178
Loyc.Collections.ListChangeInfo.Index
readonly int Index
Gets the index at which the add, remove, or change operation starts.
Definition: ListChangeInfo.cs:41
Loyc.Syntax.IndexPositionMapper.IndexToLine
SourcePos IndexToLine(int index)
Returns the position in a source file of the specified index.
Definition: IndexPositionMapper.cs:87
Loyc.StringExt.SafeSubstring
static string SafeSubstring(this string s, int startIndex, int length=int.MaxValue)
A variation on String.Substring() that never throws.
Definition: StringExt.cs:68
Loyc.Collections.SelectCollection
Helper class for LinqToLists.
Definition: SelectCollection.out.cs:16
Loyc.Syntax.Lexing.TriviaSaver.NextToken
override Maybe< Token > NextToken()
Returns the next (postprocessed) token. This method should set the _current field to the returned val...
Definition: TriviaSaver.cs:26
Loyc.Collections.Impl.InternalSet.Thaw
void Thaw()
Thaws a frozen root node by duplicating it, or creates the root node if the set doesn't have one.
Definition: InternalSet.cs:632
Loyc.Collections.BList.BList
BList(Func< T, T, int > compareItems)
Definition: BList.cs:67
Loyc.Ecs.EcsLanguageService.Print
void Print(LNode node, StringBuilder target, IMessageSink sink=null, ParsingMode mode=null, ILNodePrinterOptions options=null)
Serializes the specified syntax tree to a StringBuilder in the syntax supported by this object.
Definition: EcsLanguageService.cs:47
Loyc.Syntax.Lexing.TokenKind.TypeKeyword
@ TypeKeyword
e.g. int, bool, double, void
Loyc.Syntax.LiteralNode.WithValue
abstract override LiteralNode WithValue(object value)
Creates a new literal node with a different Value than the current literal node.
Loyc.Collections.Impl.CPByteTrie.TryAdd
bool TryAdd(byte[] key, int offset, int length, ref TValue value)
Adds the specified key-value pair only if the specified key is not already present in the trie.
Definition: CPByteTrie.cs:65
Loyc.Utilities.GoDecoratorFieldAttribute
This attribute marks a field in an abstract class as pointing to a wrapped object to which GoInterfac...
Definition: GoInterface.cs:2107
Loyc.MessageSink
Keeps track of the default message sink (Default); contains a series of helper methods; and contains ...
Definition: MessageSink.out.cs:21
Loyc.Syntax.ILNodePrinterOptions.OmitUnknownTrivia
bool OmitUnknownTrivia
Causes trivia that the printer does not recognize (other than comments, spaces and raw text) to be dr...
Definition: ILNodePrinterOptions.cs:29
Loyc.Collections.Impl.CPIntTrie.IntEnumerator
Definition: CPIntTrie.cs:857
Loyc.Syntax.LNode.HasSpecialName
bool HasSpecialName
Returns true if Name is a "special" name (i.e. starts with '#' or '\'' or '.' or any character below ...
Definition: LNode.cs:310
Loyc.Syntax.CodeSymbols.PreDec
static readonly Symbol PreDec
"--" Unary prefix decrement
Definition: CodeSymbols.cs:38
Loyc.Collections.Impl.InternalList.InsertionSort< T >
static void InsertionSort< T >(T[] array, int index, int count, Comparison< T > comp)
Performs an insertion sort.
Definition: InternalList.cs:847
Loyc.Collections.INegAutoSizeArray
An auto-sizing array is a list structure that allows you to modify the element at any index,...
Definition: INegListSource.cs:146
Loyc.Collections.IListSink
Represents a write-only indexable list class.
Definition: Sink interfaces.cs:29
Loyc.Collections.FVList.Equals
override bool Equals(object rhs_)
Returns whether the two list references are the same. Does not compare the contents of the lists.
Definition: FVList.cs:135
Loyc.Syntax.ParseNumberFlag.SkipSpacesInsideNumber
@ SkipSpacesInsideNumber
Skip spaces inside the number. Without this flag, spaces make parsing stop.
Loyc.Syntax.CodeSymbols._Bracks
static readonly Symbol _Bracks
Synonym for Array (@#[])
Definition: CodeSymbols.cs:70
Loyc.Syntax.ParserSource.ParserSource
ParserSource(List list, Token eofToken, ISourceFile file, int startIndex=0)
<inheridoc>
Definition: ParserSource.cs:38
Loyc.Syntax.Lexing.BaseILexer.SpacesPerTab
int SpacesPerTab
Number of spaces per tab, for the purpose of computing IndentLevel. Initial value: 4
Definition: BaseILexer.cs:56
Loyc.Syntax.NodeStyle.VerbatimStringLiteral
@ VerbatimStringLiteral
Used for an EC# verbatim string literal like "foo".
Loyc.Localize.Localized
static string Localized([Localizable] this string message, params object[] args)
Finds and formats a localization of the given message. If none is found, the original string is forma...
Definition: Localize.cs:343
Loyc.Collections.CG.Cache
static object Cache(bool value)
Returns G.BoxedTrue or G.BoxedFalse depending on the parameter.
Definition: CG.cs:59
Loyc.Syntax.BaseParserForList.Up
void Up()
Returns to the old token list saved by Down.
Definition: BaseParserForList.cs:164
Loyc.Syntax.AbstractTriviaInjector
Encapsulates an algorithm that consumes trivia (comments and newlines) from a list and adds it as tri...
Definition: AbstractTriviaInjector.cs:90
Loyc.Syntax.StandardTriviaInjector.HasImplicitLeadingNewline
virtual bool HasImplicitLeadingNewline(LNode child, LNode parent, int childIndex)
Called to find out if a newline is to be added implicitly before the current child of the specified n...
Definition: StandardTriviaInjector.cs:137
Loyc.Syntax.BaseParserForList
An base class designed for parsers that use LLLPG (Loyc LL(k) Parser Generator) and receive tokens fr...
Definition: BaseParserForList.cs:43
Loyc.Collections.CPTrie.Find
bool Find(ref KeyWalker key, ref T value)
Retrieves the value associated with the specified key; does nothing if the key does not exist.
Definition: CPTrie.cs:153
Loyc.Collections.ListExt.ZipLonger< A, B >
static IEnumerable< Pair< A, B > > ZipLonger< A, B >(this IEnumerable< A > a, IEnumerable< B > b)
Returns a sequence as long as the longer of two sequences. Items from the first and second sequence a...
Definition: ListExt.cs:257
Loyc.Syntax.LNodeExt.MatchesPattern
static bool MatchesPattern(this LNode candidate, LNode pattern, ref MMap< Symbol, LNode > captures, out VList< LNode > unmatchedAttrs)
Determines whether one Loyc tree "matches" another. This is different from a simple equality test in ...
Definition: LNodeExt.cs:328
Loyc.ReferenceComparer
An IEqualityComparer<T> based on reference equality
Definition: ValueComparer.cs:45
Loyc.Syntax.CodeSymbols.Base
static readonly Symbol Base
"#base" e.g. base.X <=> #base.X; base(arg) <=> #base(arg).
Definition: CodeSymbols.cs:173
Loyc.MiniTest.Assert.Fail
static void Fail()
Short for Fail("").
Definition: MiniTest.cs:314
Loyc.LLParserGenerator.IPGCodeGenHelper.ResolveAlias
LNode ResolveAlias(LNode node)
Returns the node for an alias. If the specified node is not an alias, returns the same node unchanged...
Loyc.Syntax.NodeStyle.Alternate
@ Alternate
If this node has two styles in which it can be printed, this selects the second (the less common styl...
Loyc.Syntax.BaseParser.MatchError
virtual void MatchError(bool inverted, IEnumerable< MatchType > expected)
Handles an error that occurs during Match() or MatchExcept()
Definition: BaseParser.cs:396
Loyc.Syntax.Lexing.Token.TypeInt
readonly int TypeInt
Token type.
Definition: Token.cs:229
Loyc.Syntax.Lexing.TokenKind.Other
@ Other
For token types not covered by other token kinds.
Loyc.Compatibility
Important interfaces of newer .NET versions than the version for which Loyc was compiled
Definition: NamespaceDocs.cs:78
Loyc.Collections.Impl.InternalList.CopyTo
void CopyTo(T[] array, int arrayIndex)
Copies the elements of the collection to an Array, starting at a particular array index.
Definition: InternalList.cs:372
Loyc.LLParserGenerator.GeneralCodeGenHelper.AllowSwitch
bool AllowSwitch
Specified whether this class is allowed to generate C# switch() statements.
Definition: GeneralCodeGenHelper.cs:50
Loyc.Syntax.CodeSymbols.ShlAssign
static readonly Symbol ShlAssign
"<<=" shift-left-by operator
Definition: CodeSymbols.cs:121
Loyc.Syntax.NodeStyle.OldStyle
@ OldStyle
Use an older or backward-compatible notation.
Loyc.MessageSinkFromDelegate.IsEnabled
bool IsEnabled(Severity level)
Returns true if messages of the specified type will actually be printed, or false if Write(type,...
Definition: BasicSinks.cs:202
Loyc.Syntax.LNode.Name
abstract Symbol Name
Returns the Symbol if IsId. If this node is a call (IsCall) and Target.IsId is true,...
Definition: LNode.cs:304
Loyc.LLParserGenerator.CodeGenHelperBase.BeginRule
virtual void BeginRule(Rule rule)
Notifies the snippet generator that code generation is starting for a new rule.
Definition: CodeGenHelperBase.cs:137
Loyc.G.PutInRange
static float PutInRange(this float n, float min, float max)
Returns num clamped to the range min and max.
Definition: GRange.out.cs:99
Loyc.Collections.Impl.AListNode.GetLastItem
abstract T GetLastItem()
Gets the last item in the last leaf node (needed by B+ trees, but is also called by AListBase<K,...
Loyc.LLParserGenerator.CodeGenHelperBase.CodeToTerminalPred
abstract Pred CodeToTerminalPred(LNode expr, ref string errorMsg)
Creates a terminal predicate from a code expression.
Loyc.Collections.BDictionary.FindLowerBound
int FindLowerBound(ref K key)
Definition: BDictionary.cs:219
Loyc.Collections.IDictionaryAndReadOnly
This interface is meant to be implemented by read-only dictionary classes that originally implemented...
Definition: Disambiguation interfaces.cs:102
Loyc.NoValue
NoValue.Value is meant to be used as the value of a property that has "no value", meaning no value is...
Definition: NoValue.cs:21
Loyc.Collections.VListBlock.EnsureImmutable
static FVList< T > EnsureImmutable(VListBlock< T > self, int localCount)
Returns an immutable FVList with the specified parameters, modifying blocks if necessary.
Definition: VListBlock.cs:695
Loyc.UString.UString
UString(string str, int start, int count=int.MaxValue)
Initializes a UString slice.
Definition: UString.cs:74
Loyc.LLParserGenerator.IPGCodeGenHelper.CreateTryWrapperForRecognizer
LNode CreateTryWrapperForRecognizer(Rule rule)
Generates the try-wrapper for a recognizer rule.
Loyc.Collections.MaxHeap.MaxHeap
MaxHeap(TList list, TComparer comparer, Action< T, int > onItemMoved=null)
Initializes the heap wrapper with the list and comparer to use. Both parameters must not be null.
Definition: Heap.cs:64
Loyc.Ecs.EcsValidators.MethodDefinitionKind
static Symbol MethodDefinitionKind(LNode n, bool allowDelegate, Pedantics p=Pedantics.Lax)
If the given node has a valid syntax tree for a method definition, a constructor, or (when orDelegate...
Definition: EcsValidators.cs:190
Loyc.Collections.ReversedList.CopyTo
void CopyTo(T[] array, int arrayIndex)
Copies the elements of the collection to an Array, starting at a particular array index.
Definition: ReversedList.cs:88
Loyc.Syntax.CodeSymbols.ShrAssign
static readonly Symbol ShrAssign
">>=" shift-right-by operator
Definition: CodeSymbols.cs:120
Loyc.Collections.FWList.SmartWhere
FWList< T > SmartWhere(Func< T, bool > keep)
Applies a filter to a list, to exclude zero or more items.
Definition: FWList.cs:148
Loyc.Collections.LCExt.Slice< T >
static NegListSlice< T > Slice< T >(this INegListSource< T > list, int start, int count=int.MaxValue)
Definition: NegListSlice.cs:11
Loyc.Collections.MMap
A dictionary class built on top of InternalSet<KeyValuePair<K,V>>.
Definition: MMap.cs:43
Loyc.Collections.UpCastListSource
Helper class for treating a collection of a derived type as a collection of a base type or interface.
Definition: LCExtensions.cs:121
Loyc.Collections.AListOperation.Add
@ Add
A new item will be added unconditionally, without affecting existing elements, in no particular order...
Loyc.Syntax.BaseParserNoBacktracking.BaseParserNoBacktracking
BaseParserNoBacktracking(Enumerator sequence, Token eofToken, ISourceFile file, int startIndex=0)
Initializes this object to begin parsing the specified tokens.
Definition: BaseParserNoBacktracking.cs:48
Loyc.Collections.Impl.TestHelpers.ExpectListByEnumerator< T >
static void ExpectListByEnumerator< T >(IListSource< T > list, params T[] expected)
When testing a buggy collection type, the enumerator might behave differently than the indexer,...
Definition: TestHelpers.cs:21
Loyc.Collections.Impl.InternalSet.Remove
bool Remove(ref T item, IEqualityComparer< T > comparer)
Removes an item from the set.
Definition: InternalSet.cs:736
Loyc.ExceptionExt.ExceptionMessageAndType
static string ExceptionMessageAndType(this Exception ex)
Returns a string of the form "{ex.Message} ({ex.GetType().Name})".
Definition: Extensions.cs:50
Loyc.Collections.CG.Cache
static object Cache(byte o)
Special overload to avoid treating argument as int32 in C#.
Definition: CG.cs:50
Loyc.StringExt.Join
static string Join(string separator, IEnumerable value)
Converts a series of values to strings, and concatenates them with a given separator between them.
Definition: StringExt.cs:96
LeMP.Compiler.Run
void Run()
Runs the MacroProcessor on all input Files.
Definition: Compiler.cs:529
Loyc.Collections.MapOrMMap
Common base class that contains code shared between Map<K,V> and MMap<K,V>.
Definition: Map.cs:35
Loyc.MiniTest.Assert.That
static void That(bool condition, string message)
Calls Fail(message) if condition is false.
Definition: MiniTest.cs:515
Loyc.Collections.Impl.IAListTreeObserver.ItemRemoved
void ItemRemoved(T item, AListLeafBase< K, T > parent)
Called when an item is removed from a leaf node.
Loyc.LLParserGenerator.LLParserGenerator.Sink
IMessageSink?? Sink
Called when an error or warning occurs while parsing a grammar or while generating code for a parser....
Definition: LLParserGenerator.cs:137
Loyc.Collections.Impl
Contains helper classes and base classes for implementing collections (Loyc.Collections....
Definition: BaseDictionary.cs:7
Loyc.Syntax.Les.Les2LanguageService.Parse
IListSource< LNode > Parse(ILexer< Token > input, IMessageSink msgs, ParsingMode inputType=null, bool preserveComments=true)
If HasTokenizer is true, this method accepts a lexer returned by Tokenize() and begins parsing.
Definition: Les2LanguageService.cs:63
Loyc.Syntax.ParsingService.PushCurrent
static PushedCurrent PushCurrent(IParsingService newValue)
Sets the current language service, returning a value suitable for use in a C# using statement,...
Definition: IParsingService.cs:205
Loyc.Syntax.CodeSymbols.Mod
static readonly Symbol Mod
"%" Remainder operator
Definition: CodeSymbols.cs:41
Loyc.Syntax.Les.Les2LanguageService
The Value property provides easy access to the lexer, parser and printer for Loyc Expression Syntax (...
Definition: Les2LanguageService.cs:16
Loyc.LLParserGenerator.IPGCodeGenHelper.Begin
void Begin(WList< LNode > classBody, ISourceFile sourceFile)
Before the parser generator generates code, it calls this method.
Loyc.Collections.MMap.AddOrFind
bool AddOrFind(ref KeyValuePair< K, V > pair, bool replaceIfPresent)
For internal use. Adds a pair to the map if the key is not present, retrieves the existing key-value ...
Definition: MMap.cs:205
Loyc.Collections.FWList.WhereSelect
FWList< T > WhereSelect(Func< T, Maybe< T >> filter)
Filters and maps a list with a user-defined function.
Definition: FWList.cs:167
Loyc.Math.IIncrementer.NextHigher
T NextHigher(T a)
Returns the next representable number higher than a.
Loyc.Threading.TinyReaderWriterLock.ExitReadLock
void ExitReadLock()
Releases a read lock that was acquired with EnterRead().
Definition: ThreadEx.cs:378
Loyc.Ecs.Parser.EcsPreprocessor
Handles EC# processor directives.
Definition: EcsPreprocessor.cs:50
Loyc.LLParserGenerator.LLParserGenerator.GenerateCodeVisitor.Visit
override void Visit(Alts alts)
Visit(Alts) is the most important method in this class. It generates all prediction code,...
Definition: GenerateCodeVisitor.cs:143
Loyc.Collections.WList.Resize
void Resize(int newSize)
Resizes the list to the specified size.
Definition: WList.cs:288
Loyc.Collections.Impl.InternalSet.SymmetricExceptWith
int SymmetricExceptWith(IEnumerable< T > other, IEqualityComparer< T > comparer, bool xorDuplicates=true)
Modifies the current set to contain only elements that were present either in this set or in the othe...
Definition: InternalSet.cs:1442
Loyc.LLParserGenerator.PGNodeSet.WithEOF
IPGTerminalSet WithEOF(bool wantEOF=true)
Adds or removes EOF from the set. If the set doesn't change, this method may return this.
Definition: GeneralCodeGenHelper.cs:309
Loyc.Collections.XfAction.Keep
@ Keep
Include the original item in the output list
Loyc.Collections.WListProtected.SetAt
void SetAt(int index, T value)
Sets an item in a FWList or WList at the specified index.
Definition: WListBase.cs:131
Loyc.Collections.Impl.InternalSet.Overlaps
bool Overlaps(IEnumerable< T > other, IEqualityComparer< T > thisComparer)
Returns true if this set contains at least one item from 'other'.
Definition: InternalSet.cs:1521
Loyc.Collections.MutableListExtensionMethods.IListExt
Extension methods and helper methods for IList<T>.
Definition: ArraySlice.cs:10
Loyc.G.IsInRange
static bool IsInRange(this ulong num, ulong lo, ulong hi)
Returns true if num is between lo and hi.
Definition: GRange.out.cs:78
Loyc.Collections.ListAsListSource.CopyTo
void CopyTo(T[] array, int arrayIndex)
Copies the elements of the collection to an Array, starting at a particular array index.
Definition: ListAsListSource.cs:105
Loyc.Collections.VListBlock.AddRange
static FVList< T > AddRange(VListBlock< T > self, int localCount, FVList< T > front, FVList< T > back)
Adds a range of items to a FVList where localCount is the number of items in the FVList's first block...
Definition: VListBlock.cs:550
Loyc.Collections.Impl.InternalList.Enumerator
Definition: InternalList.cs:871
Loyc.Math.IMultiply
Provides the multiplication operation and the multiplicative identity, one.
Definition: Interfaces.cs:246
Loyc.Collections.Impl.AListNode.GetImmutableCount
abstract uint GetImmutableCount(bool excludeSparse)
Diagnostic method. See AListBase<K,T>.GetImmutableCount().
Loyc.StringBuilderExt.FirstIndexOf
static ? int FirstIndexOf(this StringBuilder sb, char value, int startIndex=0)
Gets the index of a character in a StringBuilder
Definition: StringBuilderExt.cs:73
Loyc.Collections.VList.ToFVList
FVList< T > ToFVList()
Returns this list as a FVList, which effectively reverses the order of the elements.
Definition: VList.cs:234
Loyc.Syntax.Lexing.Token.Range
SourceRange Range(ISourceFile sf)
Gets the SourceRange of a token, under the assumption that the token came from the specified source f...
Definition: Token.cs:304
Loyc.IMaybe< L >
Loyc.Collections.NegList.Min
int Min
Returns the minimum valid index.
Definition: NegList.cs:74
LeMP.MacroMode.Passive
@ Passive
It is normal for this macro not to change the code, so a warning should not be printed when the macro...
Loyc.Math.ISignedMath
Provides operations available on all signed numeric types (int, double, etc.); see also IUIntMath<T>,...
Definition: Interfaces.cs:345
Loyc.Syntax.CodeSymbols.Not
static readonly Symbol Not
"!" Logical 'not' operator
Definition: CodeSymbols.cs:56
Loyc.Syntax.CodeSymbols.PreInc
static readonly Symbol PreInc
"++" Unary prefix increment
Definition: CodeSymbols.cs:37
Loyc.Collections.BDictionary.SetAndGet
bool SetAndGet(ref K key, ref V value)
Associates the specified value with the specified key, while getting the old value if one exists.
Definition: BDictionary.cs:485
Loyc.Collections.BDictionary.BDictionary
BDictionary(Func< K, K, int > compareKeys, int maxNodeSize)
Definition: BDictionary.cs:64
Loyc.LLParserGenerator.IPGCodeGenHelper.VisitInput
LNode VisitInput(LNode stmt, IMessageSink sink)
In case the IPGCodeGenHelper is interested, the LLLPG macro calls this method on each statement in th...
Loyc.Syntax.Lexing.IndentTokenGenerator.IndentTokenGenerator
IndentTokenGenerator(ILexer< Token > lexer)
Initializes the indent detector.
Definition: IndentTokenGenerator.cs:62
Loyc.Syntax.Precedence.CanParse
bool CanParse(Precedence rightOp)
For use in parsers. Returns true if 'rightOp', an operator on the right, has higher precedence than t...
Definition: Precedence.cs:305
Loyc.Syntax.ParsingService.TokenizeFile
static ILexer< Token > TokenizeFile(this IParsingService parser, string fileName, IMessageSink msgs=null)
Opens the specified file and tokenizes it.
Definition: IParsingService.cs:276
Loyc.LLParserGenerator.PGTerminalSet
Extension methods for IPGTerminalSet.
Definition: IPGTerminalSet.cs:38
Loyc.Syntax.BaseParser.LT0
Token LT0
Next token to parse (cached; is set to LT(0) whenever InputPosition is changed).
Definition: BaseParser.cs:75
Loyc.Collections.IBRangeEx.InnerList
IEnumerable< T > InnerList
Gets the list upon which this range is based.
Definition: IRanges.cs:319
Loyc.Syntax.CodeSymbols.Alias
static readonly Symbol Alias
Definition: CodeSymbols.cs:159
Loyc.Collections.Impl.TestHelpers
Helpers methods for unit tests, especially used by Loyc collection classes but sometimes useful in ot...
Definition: TestHelpers.cs:11
Loyc.ExceptionExt.DataList
static string DataList(this Exception ex, string linePrefix, string keyValueSeparator, string newLine)
Converts Exception.Data to a string, separating each key from each value with keyValueSeparator,...
Definition: Extensions.cs:131
Loyc.SymbolPool.Get
Symbol Get(string name)
Gets a symbol from this pool, or creates it if it does not exist in this pool already.
Definition: Symbol.cs:231
Loyc.Syntax.LNode.WithValue
abstract LiteralNode WithValue(object value)
Creates a new literal node with a different Value than the current literal node.
Loyc.Collections.FWList.AdjustWListIndex
override int AdjustWListIndex(int index, int size)
This method implements the difference between FWList and WList: In FWList it returns index,...
Definition: FWList.cs:33
Loyc.Collections.BList.BList
BList(Func< T, T, int > compareItems, int maxLeafSize, int maxInnerSize)
Initializes an empty BList.
Definition: BList.cs:99
Loyc.LLParserGenerator.CodeGenHelperBase.SetListInitializer
void SetListInitializer(LNode varDecl)
Sets ListType and/or ListInitializer based on an expression. A statement like Type x = expr sets List...
Definition: CodeGenHelperBase.cs:75
Loyc.Syntax.Lexing.BaseLexer.MatchError
virtual void MatchError(bool inverted, IList< int > ranges)
Handles an error that occurs during Match(), MatchExcept(), MatchRange() or MatchExceptRange()
Definition: BaseLexer.cs:632
Loyc.Symbol.Name
string Name
Gets the name of the Symbol.
Definition: Symbol.cs:69
Loyc.G.With< T >
static T With< T >(this T obj, Action< T > action)
Calls action(obj), then returns the same object.
Definition: G.cs:109
Loyc.Collections.Impl.InternalSet.Enumerator
Definition: InternalSet.cs:1046
Loyc.Collections.Impl.AListIndexer.Detach
void Detach(AListBase< K, T > list, AListNode< K, T > root)
Called when the observer is being detached from an AList. Detach(), unlike Attach(),...
Loyc.Math.IRationalMath
Use this interface for floating-point, fixed-point, and rational types. Rational types support recipr...
Definition: Interfaces.cs:370
Loyc.Syntax.LNode.Clone
abstract LNode Clone()
Creates a copy of the node. Since nodes are immutable, there is little reason for an end-user to call...
Loyc.Collections.AListBase.Enumerator.CurrentIndex
int CurrentIndex
Index of the last item that was enumerated. If has been enumerated yet, this will typically be one be...
Definition: AListBase.cs:695
LeMP.MacroContext
Standard extension methods for IMacroContext.
Definition: IMacroContext.cs:136
Loyc.Collections.Impl.AListIndexer.Attach
bool? Attach(AListBase< K, T > list)
Called when the observer is being attached to an AList.
Loyc.Collections.EmptySequenceException
An exception thrown by methods or properties that require a non-empty sequence but were provided with...
Definition: Exceptions.cs:121
Loyc.Collections.Impl.CPIntTrie.TryAdd
bool TryAdd(int key, ref TValue value)
Adds the specified key-value pair only if the specified key is not already present in the trie.
Definition: CPIntTrie.cs:306
Loyc.Syntax.Lexing.LexerSource.LineStartAt
new int LineStartAt
Definition: LexerSource.cs:100
Loyc.Syntax.LNode.ReplaceOpt
ReplaceOpt
Definition: LNode.cs:952
Loyc.Collections.VListBlockOfTwo.Front
override T Front(int localCount)
Returns the "front" item in a FVList/FWList associated with this block (or back item of a VList) wher...
Definition: VListBlockOfTwo.cs:94
Loyc.Ecs.EcsPrinterOptions.DropNonDeclarationAttributes
bool DropNonDeclarationAttributes
Suppresses printing of attributes inside methods and inside subexpressions, except on declaration or ...
Definition: EcsNodePrinter.cs:1333
Loyc.Collections.CPTrie.Set
bool Set(ref KeyWalker key, ref T value, CPMode mode)
Associates the specified value with the specified key.
Definition: CPTrie.cs:179
Loyc.Collections.VListBlock.Add
abstract VListBlock< T > Add(int localCount, T item)
Inserts a new item at the "front" of a FVList where localCount is the number of items currently in th...
Loyc.LLParserGenerator.Alts.Clone
override Pred Clone()
Deep-clones a predicate tree. Terminal sets and Nodes referenced by the tree are not cloned; the clon...
Definition: Predicates.cs:508
Loyc.Ecs.Parser.EcsTriviaInjector.MakeTriviaAttribute
override LNode MakeTriviaAttribute(Token t)
Called to transform a trivia token into a trivia attribute.
Definition: EcsTriviaInjector.cs:66
Loyc.Syntax.EscapeC.Minimal
@ Minimal
Only \r, , \0 and backslash are escaped.
Loyc.Syntax.AbstractTriviaInjector.DoneAttaching
virtual LNode DoneAttaching(LNode node, LNode parent, int indexInParent)
This method is called after a node has been processed and any applicable trivia was attached.
Definition: AbstractTriviaInjector.cs:188
Loyc.Collections.WListProtected.SetAtDff
void SetAtDff(int distanceFromFront, T item)
Sets an item WITHOUT doing a range or mutability check
Definition: WListBase.cs:300
Loyc.Collections.SparseAList
A sparse A-List that implements ISparseList<T>.
Definition: SparseAList.cs:31
Loyc.Syntax.Les.Les3Lexer.NextToken
override Maybe< Token > NextToken()
Scans the next token and returns information about it.
Definition: Les3Lexer.out.cs:863
Loyc.Collections.MMap.Union
MMap< K, V > Union(MapOrMMap< K, V > other, bool replaceWithValuesFromOther)
Definition: MMap.cs:281
Loyc.SymbolSet.MayContain
bool MayContain(Symbol item)
Returns whether the bloom filter indicates that this set may contain the specified item....
Definition: SymbolSet.cs:47
Loyc.WrapperBase
Abstract class that helps you implement wrappers by automatically forwarding calls to Equals(),...
Definition: WrapperBase.cs:10
Loyc.Syntax.LNode.MergeLists
static LNode MergeLists(LNode node1, LNode node2, Symbol listName)
Some CallNodes are used to represent lists. This method merges two nodes, forming or appending a list...
Definition: LNode.cs:753
Loyc.Collections.CPTrie
Compact patricia tree class that stores keys as byte arrays. This class is intended to be use as a ba...
Definition: CPTrie.cs:37
Loyc.Collections.MSet.SymmetricExceptWith
int SymmetricExceptWith(IEnumerable< T > other)
Modifies the current set to contain only elements that were present either in this set or in the othe...
Definition: MSet.cs:241
Loyc.Collections.SparseAList.InsertSpace
void InsertSpace(int index, int count=1)
Inserts empty space starting at the specified index.
Definition: SparseAList.cs:257
Loyc.Collections.Impl.AListNode._childCount
byte _childCount
Number of children, if this is an inner node.
Definition: AListNode.cs:278
Loyc.Collections.WeakValueDictionary.Count
override int Count
Returns the number of dictionary entries. This value may be greater than the number of elements that ...
Definition: WeakValueDictionary.cs:61
Loyc.Collections.ListExt.ZipLonger< A, B, C >
static IEnumerable< C > ZipLonger< A, B, C >(this IEnumerable< A > a, IEnumerable< B > b, A defaultA, B defaultB, Func< A, B, C > resultSelector)
An alternate version of ZipLonger<A, B>(IEnumerable<A>, IEnumerable<B>, A, B) in which a user-defined...
Definition: ListExt.cs:291
Loyc.StringBuilderExt
Extension methods that add some functionality of string to StringBuilder.
Definition: StringBuilderExt.cs:10
Loyc.StringBuilderExt.FirstIndexOf
static ? int FirstIndexOf(this StringBuilder sb, UString searchStr, int startIndex=0, bool ignoreCase=false)
Gets the index of a substring in a StringBuilder
Definition: StringBuilderExt.cs:88
Loyc.Collections.BList.IndexOf
int IndexOf(T item)
Finds the lowest index of an item that is equal to or greater than the specified item.
Definition: BList.cs:310
Loyc.Syntax.LineRemapper.EndRemap
void EndRemap(int realLine)
Corresponds to #line default in C#.
Definition: LineRemapper.cs:96
Loyc.Collections.VListBlock.SubList
abstract FVList< T > SubList(int localIndex)
Returns a list in which this[localIndex-1] is the first item. Nonpositive indexes are allowed and ref...
LeMP.Tests
Contains tests for the LeMP.MacroProcessor and for standard LeMP macros.
Definition: MacroProcessorTests.cs:14
Loyc.Threading.ThreadLocalVariable.ThreadLocalVariable
ThreadLocalVariable(T initialValue, bool autoFallback=false)
Constructs a ThreadLocalVariable.
Definition: ThreadEx.cs:486
Loyc.LLParserGenerator.CodeGenHelperBase.ApiCall
virtual LNode ApiCall(Symbol apiName, params LNode[] args)
Returns an LNode representing a call to the specified LLLPG API. For example, if the user used a "inp...
Definition: CodeGenHelperBase.cs:467
Loyc.Syntax.Lexing.TokensToTree
A preprocessor usually inserted between the lexer and parser that converts a token list into a token ...
Definition: TokensToTree.cs:24
LeMP.MacroMode.PriorityOverride
@ PriorityOverride
High priority. If this macro is ambiguous with another macro that doesn't have this flag nor Override...
Loyc.Syntax.Les.INodePrinterWriter.Reset
void Reset()
Called when a new, separate printing operation begins.
Loyc.MessageSink.Null
static readonly NullMessageSink Null
The message sink that discards all messages.
Definition: MessageSink.out.cs:313
Loyc.Collections.IAutoSizeArray
An auto-sizing array is a list structure that allows you to modify the element at any index,...
Definition: Other interfaces.cs:63
Loyc.Collections.Bijection.Inverse
Bijection< K2, K1 > Inverse
Returns the inverse dictionary. Note: this.Inverse.Inverse == this.
Definition: Bijection.cs:90
Loyc.Syntax.LNodeKind
LNodeKind
The three kinds of nodes in a Loyc tree
Definition: ILNode.cs:10
Loyc.Collections.Impl.DictionaryBase
A base class for user-defined dictionaries that want to implement both IDictionary(K,...
Definition: BaseDictionary.cs:14
Loyc.Syntax.ParsingService.RegisteredLanguages
static IReadOnlyDictionary< string, IParsingService > RegisteredLanguages
Dictionary of registered parsing services, keyed by file extension (without leading dots)....
Definition: IParsingService.cs:141
Loyc.Syntax.LNode.Args
abstract VList< LNode > Args
Returns the argument list of this node. Always empty when IsCall==false.
Definition: LNode.cs:376
Loyc.Collections.BDictionary.FindLowerBound
int FindLowerBound(K key)
Definition: BDictionary.cs:194
Loyc.Collections.ICollectionSink
Represents a write-only collection: you can modify it, but you cannot learn what it contains.
Definition: Sink interfaces.cs:15
Loyc.Syntax.Les.Les2Parser.Start
IEnumerable< LNode > Start(Holder< TokenType > separator)
Top-level rule: expects a sequence of statements followed by EOF
Definition: Les2Parser.cs:110
Loyc.Syntax.StreamCharSource.Slice
new UString Slice(int startIndex, int length)
Returns a substring from the character source. If some of the requested characters are past the end o...
Definition: StreamCharSource.cs:95
System
Definition: IReadOnlyCollections.cs:6
Loyc.Collections.AListBase.Freeze
virtual void Freeze()
Prevents further changes to the list.
Definition: AListBase.cs:1032
Loyc.StringBuilderExt.LastOrDefault
static char LastOrDefault(this StringBuilder str, char @default='\0')
Returns the last character of the string, or a default character if the string is empty.
Definition: StringBuilderExt.cs:27
Loyc.Collections.SparseAList.NextLowerItem
T NextLowerItem(ref int? index)
Decreases index by at least one to reach the next index that is not classified as empty space,...
Definition: SparseAList.cs:302
Loyc.Collections.Impl.InternalList.Clone
InternalList< T > Clone()
Makes a copy of the list with the same capacity
Definition: InternalList.cs:312
Loyc.Collections.AListSumTracker
This class incrementally recomputes the sum of an AList<T> (or its variants - BList,...
Definition: AListStatisticTracker.cs:218
Loyc.Collections.BList
An sorted in-memory list that is efficient for all operations and offers indexed access to its list.
Definition: BList.cs:51
Loyc.Syntax.NodeStyle.Handled
@ Handled
Indicates that some part of a compiler, or a macro, has seen the node and done something with it.
Loyc.Geometry.ISize3Reader.Depth
T Depth
Gets the depth of a rectangle (the difference between Z coordinates).
Definition: IRectangle3.cs:13
Loyc.Collections.LinqToLists.Reverse< T >
static ReversedListSource< T > Reverse< T >(this IListSource< T > c)
Returns a reversed view of a read-only list.
Definition: LinqToLists.out.cs:223
Loyc.Syntax.EscapeC.UnicodeNonCharacters
@ UnicodeNonCharacters
Escape non-character unicode code points such as the Byte Order Mark and unpaired surrogate pair char...
Loyc.Collections.BList.Clone
BList< T > Clone()
Definition: BList.cs:262
Loyc.Collections.VListBlockOfTwo.SubList
override FVList< T > SubList(int localIndex)
Returns a list in which this[localIndex-1] is the first item. Nonpositive indexes are allowed and ref...
Definition: VListBlockOfTwo.cs:118
Loyc.Collections.Impl.AListNode.CallListChanging
void CallListChanging(AListBase< K, T > tree, ListChangeInfo< T > listChangeInfo)
Allows derived classes of AListNode to fire the AListBase.ListChanging event properly.
Definition: AListNode.cs:285
Loyc.SeverityMessageFilter
A decorator (wrapper) for IMessageSink that filters out some messages if their Severity is too low,...
Definition: WrapperSinks.cs:13
Loyc.Syntax.Les.Les3PrettyPrinter.PrintToHtml
static StringBuilder PrintToHtml(IEnumerable< ILNode > nodes, StringBuilder output=null, bool addPreCode=true, IMessageSink sink=null, ILNodePrinterOptions options=null)
Prints an LNode as LESv3 with HTML syntax highlighting elements.
Definition: Les3PrettyPrinter.cs:188
Loyc.Collections.VListBlock.PriorCount
abstract int PriorCount
Returns the number of immutable items in all previous blocks.
Definition: VListBlock.cs:266
Loyc.Collections.ListExt.InsertionSort< T >
static void InsertionSort< T >(this IList< T > array, int index, int count, Comparison< T > comp)
Performs an insertion sort.
Definition: ListExt.cs:509
Loyc.Collections.MutableListExtensionMethods.ICollectionExt
Extension methods for ICollection<T>.
Definition: ICollectionExt.cs:10
Loyc.Math.INumTraits.MaxInt
ulong MaxInt
Returns the maximum integer that this type can represent.
Definition: Interfaces.cs:143
Loyc.G.MakeValidFileName
static string MakeValidFileName(string text, char? replacement='_', bool fancy=true)
Replaces characters in text that are not allowed in file names with the specified replacement charact...
Definition: G.cs:196
Loyc.Collections.MMap.Add
void Add(KeyValuePair< K, V > item)
Definition: MMap.cs:94
Loyc.Syntax.CodeSymbols.Typeof
static readonly Symbol Typeof
Definition: CodeSymbols.cs:101
Loyc.Syntax.CodeSymbols.Enum
static readonly Symbol Enum
e.g. #enum(Foo, #(byte), { }); <=> enum Foo : byte { }
Definition: CodeSymbols.cs:158
Loyc.ConsoleMessageSink.IsEnabled
bool IsEnabled(Severity level)
Always returns true.
Definition: BasicSinks.cs:94
Loyc.Syntax.Lexing.TokenTree.Equals
bool Equals(TokenTree other)
Compares the elements of the token tree for equality.
Definition: Token.cs:107
Loyc.Collections.Impl.InternalDList.Add
void Add(T item)
An alias for PushLast().
Definition: InternalDList.cs:689
Loyc.Syntax.CallNode
Base class of all nodes that represent calls such as f(x), operator calls such as x + y,...
Definition: AbstractNodes.cs:83
Loyc.Collections.MaxHeapInList
This priority queue wrapper type is returned from the AsMaxHeap() extension method.
Definition: Heap.cs:293
Loyc.Syntax.LNode.IsFrozen
virtual bool IsFrozen
Returns true if the node is immutable, and false if any part of it can be edited. Currently,...
Definition: LNode.cs:274
Loyc.Syntax.LNodeExt.InParens
static LNode InParens(this LNode node, ISourceFile file, int startIndex, int endIndex)
Returns the same node with a parentheses attribute added.
Definition: LNodeExt.cs:261
Loyc.Syntax.CodeSymbols.UsingStmt
static readonly Symbol UsingStmt
e.g. #using(expr, {...}); <=> using(expr) {...} (note: use #import or CodeSymbols....
Definition: CodeSymbols.cs:131
Loyc.Collections.VList.IndexOf
int IndexOf(T item)
Searches for the specified object and returns the zero-based index of the first occurrence (lowest in...
Definition: VList.cs:299
Loyc.Collections.ListExt.ZipLeft< A, B, C >
static IEnumerable< C > ZipLeft< A, B, C >(this IEnumerable< A > a, IEnumerable< B > b, B defaultB, Func< A, B, C > resultSelector)
An alternate version of ZipLeft<A, B>(IEnumerable<A>, IEnumerable<B>, B) in which a user-defined func...
Definition: ListExt.cs:247
Loyc.Syntax.CodeSymbols.Throw
static readonly Symbol Throw
e.g. #throw(expr); <=> throw expr;
Definition: CodeSymbols.cs:141
Loyc.Collections.Set.SetEquals
bool SetEquals(MSet< T > other)
Definition: Set.cs:169
Loyc.Syntax.CodeSymbols.While
static readonly Symbol While
e.g. #while(condition,{...}); <=> while(condition) {...}
Definition: CodeSymbols.cs:130
Loyc.LLParserGenerator.GeneralCodeGenHelper.Example
override string Example(IPGTerminalSet set_)
Returns an example of an item in the set. If the example is a character, it should be surrounded by s...
Definition: GeneralCodeGenHelper.cs:112
Loyc.Collections.IDictionaryEx.GetAndRemove
Maybe< V > GetAndRemove(K key)
Gets the value associated with the specified key, then removes the pair with that key from the dictio...
Loyc.IMessageSink
A general-purpose interface for a class that accepts formatted messages with context information.
Definition: IMessageSink.cs:80
Loyc.Syntax.ILNode.Style
NodeStyle Style
Definition: ILNode.cs:56
Loyc.Collections.IBinumerable
Interface for a collection that can return IBinumerator<T>s pointing to the beginning and end of the ...
Definition: New enumerators.cs:70
Loyc.IReferenceEquatable
This is a tag which indicates that objects of this type are unique; specifically, any two different o...
Definition: MiscInterfaces.cs:36
Loyc.Collections.WList.SmartSelect
WList< T > SmartSelect(Func< T, T > map)
Maps a list to another list of the same length.
Definition: WList.cs:184
Loyc.Syntax.Lexing.LexerSourceWorkaround
This class only exists to work around a limitation of the C# language: "cannot change access modifier...
Definition: LexerSource.cs:169
Loyc.LLParserGenerator.AndPred
Represents a zero-width assertion: either user-defined code to check a condition, or a predicate that...
Definition: Predicates.cs:854
Loyc.Collections.EnumerableExt.IndexOf< T >
static int IndexOf< T >(this IEnumerable< T > list, T item)
Determines the index of a specific value.
Definition: EnumerableExt.cs:350
Loyc.Collections.Impl.InternalDList.AsDList
DList< T > AsDList()
Returns a DList<T> wrapped around this list.
Definition: InternalDList.cs:972
Loyc.Syntax.Lexing.BaseLexer.ErrorSink
IMessageSink?? ErrorSink
Gets or sets the object to which error messages are sent. The default object is LogExceptionErrorSink...
Definition: BaseLexer.cs:146
Loyc.StringExt.EliminateNamedArgs
static string EliminateNamedArgs(string format, params object[] args)
Called by Format to replace named placeholders with numeric placeholders in format strings.
Definition: StringExt.cs:177
Loyc.Collections.ROLSlice
Adapter: a random-access range for a slice of an IReadOnlyList<T>.
Definition: ROLSlice.cs:22
Loyc.MiniTest.RunTests
Searches for test methods and runs them, printing the name of each test to the console followed by er...
Definition: RunTests.cs:21
Loyc.Collections.IBRange.PopLast
T PopLast(out bool fail)
Removes the last item from the range and returns it.
Loyc.Syntax.LNode.Range
virtual SourceRange Range
Returns the location and range in source code of this node.
Definition: LNode.cs:222
Loyc.LLParserGenerator.IntStreamCodeGenHelper.Optimize
override IPGTerminalSet Optimize(IPGTerminalSet set, IPGTerminalSet dontcare)
Simplifies the specified set, if possible, so that GenerateTest() can generate simpler code for an if...
Definition: IntStreamCodeGenHelper.cs:83
Loyc.Collections.MaxHeap.Heapify
MaxHeap< T, TList, TComparer > Heapify()
Rearranges items to ensure that the underlying list has the heap property. Takes O(Count) time.
Definition: Heap.cs:73
Loyc.Syntax.IIndexPositionMapper.LineToIndex
int LineToIndex(int lineNo)
Returns the index in a source file of the beginning of the specified line, where the first line is nu...
Loyc.Syntax.Lexing.IndentTokenGenerator.IndexToMsgContext
virtual object IndexToMsgContext(Token token)
Gets the context for use in error messages, which by convention is a SourceRange.
Definition: IndentTokenGenerator.cs:150
Loyc.Syntax.Les.Les3LanguageService
Definition: Les3LanguageService.cs:10
Loyc.Collections.VList.WhereSelect
VList< T > WhereSelect(Func< T, Maybe< T >> filter)
Filters and maps a list with a user-defined function.
Definition: VList.cs:543
Loyc.Collections.ListChangeInfo.ListChangeInfo
ListChangeInfo(NotifyCollectionChangedAction action, int index, int sizeChange, IListSource< T > newItems)
Initializes the members of ListChangeInfo<T>.
Definition: ListChangeInfo.cs:22
Loyc.UString.ToUpper
UString ToUpper()
Converts the string to uppercase using the 'invariant' culture.
Definition: UString.cs:482
Loyc.Collections.VListBlock.InsertRange
static FVList< T > InsertRange(VListBlock< T > self, int localCount, IList< T > items, int distanceFromFront, bool isRVList)
Inserts a list of items in the middle of a FVList, where localCount is the number of items in the FVL...
Definition: VListBlock.cs:431
Loyc.LLParserGenerator.GeneralCodeGenHelper.GenerateMatchExpr
override LNode GenerateMatchExpr(IPGTerminalSet set_, bool savingResult, bool recognizerMode)
Generate code to match a set, e.g. MatchRange('a', 'z'); or MatchExcept(' ', '\r'); }....
Definition: GeneralCodeGenHelper.cs:185
Loyc.Syntax.LNodeExt.PlusTrailingTrivia
static VList< LNode > PlusTrailingTrivia(this VList< LNode > attrs, LNode trivia)
Adds additional trailing trivia to an attribute list.
Definition: LNodeExt.cs:104
LeMP.IMacroContext.PreProcess
VList< LNode > PreProcess(VList< LNode > input, bool asRoot=false, bool resetOpenNamespaces=false, bool resetProperties=false, bool areAttributes=false)
Runs the macro processor on the specified node(s).
Loyc.Collections.SparseAList.IsSet
bool IsSet(int index)
Determines whether a value exists at the specified index.
Definition: SparseAList.cs:274
Loyc.Collections.DictionaryExt.SetRange< K, V >
static void SetRange< K, V >(this IDictionary< K, V > dict, IEnumerable< KeyValuePair< K, V >> list)
Adds data to a dictionary (dict[key] = value for all pairs in a sequence.)
Definition: DictionaryExt.cs:96
Loyc.Collections.Impl.AListInnerBase< int, T >::LLInsert
virtual void LLInsert(int i, AListNode< K, T > child, uint indexAdjustment)
Inserts a child node into _children at index i (resizing _children if necessary), increments _childCo...
Definition: AListInnerBase.cs:316
Loyc.UString.DecodeAt
uchar DecodeAt(int index)
Returns the UCS code point that starts at the specified index.
Definition: UString.cs:233
Loyc.Collections.BList.Contains
bool Contains(T item)
Returns true if the list contains the specified item, and false if not.
Definition: BList.cs:324
Loyc.Syntax.Lexing.Token.Length
int Length
Length of the token in the source file, or 0 for a synthetic or implied token.
Definition: Token.cs:246
Loyc.ValueComparer
You'd think the .NET framework would have a built-in method–even a CIL opcode–to bitwise-compare two ...
Definition: ValueComparer.cs:24
Loyc.LLParserGenerator.IPGTerminalSet.UnionCore
IPGTerminalSet UnionCore(IPGTerminalSet other)
Merges two sets.
Loyc.LLParserGenerator.Rule.GetMethodSignature
LNode GetMethodSignature()
Returns Basis if it's a method signature; otherwise constructs a default signature.
Definition: Rule.cs:105
Loyc.Syntax.BaseParser.EofInt
abstract MatchType EofInt()
Returns the value used for EOF (normally 0)
Loyc.Syntax.ParsingService.Parse
static IListSource< LNode > Parse(this IParsingService parser, Stream stream, string fileName, ParsingMode inputType=null, IMessageSink msgs=null, bool preserveComments=true)
Parses a Stream.
Definition: IParsingService.cs:251
Loyc.Collections.AListBase.IndexOf
virtual int IndexOf(T item)
Finds an index of an item in the list.
Definition: AList.cs:769
Loyc.Collections.RangeEnumerator
Helper struct: enumerates through a forward range (IFRange<T>), calling the range methods through R i...
Definition: RangeEnumerator.cs:12
Loyc.LLPG.Macros.LLLPG_lexer
static LNode LLLPG_lexer(LNode node, IMacroContext context)
Helper macro that translates lexer in LLLPG(lexer, {...}) into a IntStreamCodeGenHelper object.
Definition: Macros.cs:76
Loyc.Collections.Impl.CPByteTrie.TryAdd
bool TryAdd(byte[] key, TValue value)
Adds the specified key-value pair only if the specified key is not already present in the trie.
Definition: CPByteTrie.cs:47
Loyc.LLParserGenerator.LLParserGenerator
Encapsulates LLLPG, the Loyc LL Parser Generator, which generates LL(k) recursive-descent parsers.
Definition: AnalysisVisitors.cs:17
Loyc.Either.From< L2, R2 >
static Either< L, R > From< L2, R2 >(Either< L2, R2 > x)
Does an upcast, e.g. Either{string,ArgumentException} to Either{object,Exception}....
Loyc.Collections.MMap.AddRange
int AddRange(IEnumerable< KeyValuePair< K, V >> data, bool replaceIfPresent=true)
Merges the contents of the specified sequence into this map.
Definition: MMap.cs:160
Loyc.Collections.CPValueCollection
Provides read-only access to the values of a CPTrie.
Definition: CPTrie.cs:257
Loyc.Collections.MutableListExtensionMethods
Contains extension methods for ICollection<T> and IList<T> that are possibly ambiguous when included ...
Definition: NamespaceDocs.cs:73
Loyc.Syntax.NodeStyle.BaseStyleMask
@ BaseStyleMask
If s is a NodeStyle, (s & NodeStyle.BaseStyleMask) is the base style (Default, Operator,...
Loyc.SymbolPool.TotalCount
int TotalCount
Returns the number of Symbols created in this pool.
Definition: Symbol.cs:378
Loyc.Collections.Impl.AListIndexer.NodeAdded
void NodeAdded(AListNode< K, T > child, AListInnerBase< K, T > parent)
Called when a child node is added to an inner node.
Definition: AListIndexer.cs:110
Loyc.Syntax.ParsingService.Unregister
static int Unregister(IParsingService service, IEnumerable< string > fileExtensions=null)
Unregisters a language service.
Definition: IParsingService.cs:168
Loyc.Collections.Impl.InternalSet.SetEquals
bool SetEquals(ISet< T > other, int myExactCount)
Returns true if this set and the other set have the same items.
Definition: InternalSet.cs:1621
Loyc.LLParserGenerator.Rule.CreateMethod
LNode CreateMethod(VList< LNode > methodBody)
Creates the default method definition to wrap around the body of the rule, which has already been gen...
Definition: Rule.cs:133
Loyc.Collections.MutableListExtensionMethods.LCExt
Definition: NegList.cs:16
Loyc.Collections.XfAction.Drop
@ Drop
Do not include the item in the output list
Loyc.Collections.BList.Remove
bool Remove(T item)
Removes a single instance of the specified item.
Definition: BList.cs:148
Loyc.MiniTest.TestAttribute
Identifies a method that contains a unit test, or that returns other tests or test fixtures.
Definition: MiniTest.cs:83
Loyc.Collections.Slice_
Adapter: a random-access range for a slice of an IListSource<T>.
Definition: Slice.cs:34
Loyc.Collections.MSet.IsProperSubsetOf
bool IsProperSubsetOf(IEnumerable< T > other)
Definition: MSet.cs:276
Loyc.Collections.NegList.ToString
override string ToString()
Returns ToString() of the wrapped list.
Definition: NegList.cs:135
Loyc.Syntax.ILNodePrinterOptions
A set of relatively universal printing options that LNodePrinters should understand.
Definition: ILNodePrinterOptions.cs:11
Loyc.Syntax.CodeSymbols.InitializerAssignment
static readonly Symbol InitializerAssignment
<tt>[]=(0, 1, x) <=> [0, 1]=x
Definition: CodeSymbols.cs:79
Loyc.Syntax.EscapeC.UnicodePrivateUse
@ UnicodePrivateUse
Escape unicode private-use code points.
Loyc.Collections.ListExt.RangeArray
static int[] RangeArray(int count)
Returns an array of Length count containing the numbers 0 through count-1.
Definition: ListExt.cs:298
Loyc.Collections.WListProtected.UserByte
byte UserByte
An additional byte that the derived class can optionally use.
Definition: WListBase.cs:69
Loyc.Syntax.CodeSymbols.Shl
static readonly Symbol Shl
"<<" Left-shift operator
Definition: CodeSymbols.cs:55
Loyc.LLParserGenerator.CodeGenHelperBase.VisitInput
virtual LNode VisitInput(LNode stmt, IMessageSink sink)
In case the IPGCodeGenHelper is interested, the LLLPG macro calls this method on each statement in th...
Definition: CodeGenHelperBase.cs:106
Loyc.Syntax.Les.Les2Lexer.UnescapeQuotedString
static void UnescapeQuotedString(ref UString sourceText, Action< int, string > onError, StringBuilder sb, UString indentation=default(UString), bool les3TQIndents=false)
Parses a normal or triple-quoted string that still includes the quotes (see documentation of the firs...
Definition: Les2Lexer.cs:182
Loyc.Ecs.EcsNodePrinter
Encapsulates the code for printing an LNode to EC# source code.
Definition: EcsNodePrinter.cs:81
Loyc.Collections.FVList.Tail
FVList< T > Tail
Returns a list without the first item. If the list is empty, an empty list is retured.
Definition: FVList.cs:98
Loyc.Collections.EnumerableExt.AdjacentPairsCircular< T >
static IEnumerable< Pair< T, T > > AdjacentPairsCircular< T >(this IEnumerable< T > list)
Returns all adjacent pairs, treating the first and last pairs as adjacent (e.g. for the list {1,...
Definition: EnumerableExt.cs:407
Loyc.Collections.CollectionAsReadOnly
Adapter: a read-only wrapper that implements ICollection(T) and IReadOnlyCollection(T),...
Definition: CollectionAsSource.cs:27
Loyc.Syntax.CodeSymbols.Async
static readonly Symbol Async
[#async] Task Foo(); <=> async Task Foo();
Definition: CodeSymbols.cs:74
LeMP.Prelude
Defines prelude macros, which are predefined macros that normally do not have to be explicitly import...
Definition: BuiltinMacros.cs:16
Loyc.Syntax.CodeSymbols.Array
static readonly Symbol Array
Used for list/array literals. Not used for attributes.
Definition: CodeSymbols.cs:69
Loyc.Geometry.INewRectangle
This interface exists to work around a limitation of C#; see IRectangle<T>.
Definition: IRectangle.cs:81
Loyc.Collections.FVList.ToVList
VList< T > ToVList()
Returns this list as a VList, which effectively reverses the order of the elements.
Definition: FVList.cs:227
Loyc.Collections.Impl.InternalList.Move
void Move(int from, int to)
Slides the array entry at [from] forward or backward in the list, until it reaches [to].
Definition: InternalList.cs:350
LeMP.InputOutput
For LeMP: an input file plus per-file options (input and output language) and output code.
Definition: MacroProcessor.cs:21
LeMP.Compiler.CompleteInputOutputOptions
void CompleteInputOutputOptions()
Fills in all fields of Files that are still null, based on the command-line options....
Definition: Compiler.cs:453
Loyc.Math.IBinaryMath.CountOnes
int CountOnes(T a)
Returns the number of '1' bits in 'a'.
Loyc.Collections.Impl.AListNode.GetObserver
IAListTreeObserver< K, T > GetObserver(AListBase< K, T > tree)
Allows derived classes of AListNode to access AListBase._observer.
Definition: AListNode.cs:281
Loyc.Collections.MSet.IsProperSubsetOf
bool IsProperSubsetOf(Set< T > other)
Definition: MSet.cs:270
Loyc.Syntax.CodeSymbols.ConcatAssign
static readonly Symbol ConcatAssign
"~=" concatenate-and-set operator
Definition: CodeSymbols.cs:119
Loyc.Syntax.Les.Les2PrecedenceMap.IsExtendedOperatorToken
static bool IsExtendedOperatorToken(UString name)
Returns true if the given Symbol can ever be used as an "extended" binary operator in LESv3.
Definition: LesPrecedenceMap.cs:260
Loyc.Collections.Set.IsSubsetOf
bool IsSubsetOf(IEnumerable< T > other)
Returns true if all items in this set are present in the other set.
Definition: Set.cs:133
Loyc.LLParserGenerator.GeneralCodeGenHelper.LA
override LNode LA(int k)
Generates code to read LA(k).
Definition: GeneralCodeGenHelper.cs:230
Loyc.Syntax.Lexing.ILexer.ErrorSink
IMessageSink ErrorSink
Event handler for errors.
Definition: ILexer.cs:22
Loyc.Collections.IDictionarySink
Represents a write-only dictionary class.
Definition: Sink interfaces.cs:57
Loyc.Syntax.Lexing.LexerSource.LexerSource
LexerSource(CharSrc source, string fileName="", int inputPosition=0, bool newSourceFile=true)
Initializes LexerSource.
Definition: LexerSource.cs:55
Loyc.Syntax.LNode.Equals
static bool Equals(ILNode a, ILNode b, CompareMode mode=CompareMode.Normal)
Definition: LNode.cs:609
Loyc.MiniTest.TestFixtureAttribute.Description
string Description
Descriptive text for this fixture
Definition: MiniTest.cs:33
Loyc.LLParserGenerator.IPGCodeGenHelper.CallTryRecognizer
LNode CallTryRecognizer(RuleRef rref, int lookahead)
Generates a call to the Try_Scan_*() function that wraps around a Scan_*() recognizer....
Loyc.Symbol.Id
int Id
Returns a numeric ID for the Symbol.
Definition: Symbol.cs:82
Loyc.LLParserGenerator.IPGCodeGenHelper.LA
LNode LA(int k)
Generates code to read LA(k).
Loyc.Collections.Impl.IAListTreeObserver.Attach
bool? Attach(AListBase< K, T > list)
Called when the observer is being attached to an AList.
Loyc.LLParserGenerator.CodeGenHelperBase.GenerateTest
virtual LNode GenerateTest(IPGTerminalSet set, LNode laVar)
Generates code to test whether the terminal denoted 'laVar' is in the set.
Definition: CodeGenHelperBase.cs:150
Loyc.LLParserGenerator.AndPred.PredUsesLA
bool PredUsesLA
Returns true if Pred contains $LA.
Definition: Predicates.cs:874
Loyc.Syntax.ParseHelpers.HexDigitValue
static int HexDigitValue(char c)
Gets the integer value for the specified hex digit, or -1 if the character is not a hex digit.
Definition: ParseHelpers.cs:44
Loyc.Collections.MSet.IntersectWith
int IntersectWith(Set< T > other)
Removes all items from this set that are not present in 'other'.
Definition: MSet.cs:232
Loyc.Syntax.AbstractTriviaInjector.AbstractTriviaInjector
AbstractTriviaInjector(IListSource< Trivia > sortedTrivia)
Initializes the SortedTrivia property.
Definition: AbstractTriviaInjector.cs:99
Loyc.Syntax.LNode.Select
virtual LNode Select(Func< LNode, Maybe< LNode >> selector, ReplaceOpt options=ReplaceOpt.ProcessAttrs)
Transforms the Target, parameters, and optionally the attributes of an LNode, returning another LNode...
Definition: LNode.cs:945
Loyc.Syntax.Les.Les3Lexer.SupportDotIndents
override bool SupportDotIndents()
The LES and EC# languages support "dot indents", which are lines that start with a dot (....
Definition: Les3.cs:59
Loyc.SymbolPool.GetById
Symbol GetById(int id)
Gets a symbol by its ID, or null if there is no such symbol.
Definition: Symbol.cs:361
Loyc.Syntax.CodeSymbols.Mul
static readonly Symbol Mul
"*" Multiplication (or dereference)
Definition: CodeSymbols.cs:29
Loyc.LLParserGenerator.CodeGenHelperBase.ListType
LNode ListType
Gets or sets the type of lists created with the +: operator (default: List<T>). The identifier "T" sh...
Definition: CodeGenHelperBase.cs:65
Loyc.LLParserGenerator.IntStreamCodeGenHelper.ExampleChar
override? char ExampleChar(IPGTerminalSet set_)
Returns an example of a character in the set, or null if this is not a set of characters or if EOF is...
Definition: IntStreamCodeGenHelper.cs:106
Loyc.Threading.ThreadEx.Start
virtual void Start(object parameter)
Causes the operating system to change the state of the current instance to System....
Definition: ThreadEx.cs:107
Loyc.Collections.AListBase
Common base class of AList<T> and SparseAList<T>. Most of the functionality of the two types is ident...
Definition: AList.cs:633
Loyc.Syntax.Impl.PrinterState.Length
int Length
Current length of the output string
Definition: PrinterState.cs:113
Loyc.Math.IZeroProvider
Provides the value of "zero" for type T.
Definition: Interfaces.cs:79
Loyc.Collections.MutableListExtensionMethods.IListExt.FinalIndexWhere< T >
static ? int FinalIndexWhere< T >(this IList< T > list, Func< T, bool > pred)
Gets the highest index at which a condition is true, or null if nowhere.
Loyc.LLParserGenerator.IPGCodeGenHelper.LAType
LNode LAType()
Returns the data type of LA(k)
Loyc.Collections.IContains.Contains
bool Contains(T item)
Returns true if and only if the collection contains the specified item.
Loyc.Collections.DictEditMode.AddIfNotPresent
@ AddIfNotPresent
Add a new item if the key doesn't match an existing pair, or do nothing if it does.
Loyc.Syntax.CodeSymbols.GE
static readonly Symbol GE
">=" Greater-than-or-equal-to operator
Definition: CodeSymbols.cs:50
Loyc.Collections.ICollectionImpl
This interface is intended to be implemented by editable collection classes that are not indexable li...
Definition: Disambiguation interfaces.cs:33
Loyc.Syntax.BaseParserNoBacktracking.InputPosition
new int InputPosition
Cumulative index of the next token to be parsed.
Definition: BaseParserNoBacktracking.cs:111
Loyc.Syntax.LNode.Style
NodeStyle Style
Indicates the preferred style to use when printing the node to a text string.
Definition: LNode.cs:245
Loyc.Collections.BDictionary
An sorted dictionary that is efficient for all operations and offers indexed access to its list of ke...
Definition: BDictionary.cs:40
Loyc.Collections.AList.Sort
void Sort()
Uses a specialized "tree quicksort" algorithm to sort this list using Comparer<T>....
Definition: AList.cs:355
Loyc.Collections.BList.BList
BList()
Initializes an empty BList.
Definition: BList.cs:58
Loyc.Syntax.Les.Les2PrecedenceMap.IsSuffixOperatorName
static bool IsSuffixOperatorName(Symbol name, out Symbol bareName)
Decides whether the name appears to represent a suffix operator.
Definition: LesPrecedenceMap.cs:307
Loyc.ServiceProvider
Adds extension methods to modernize .NET's simple built-in service locator.
Definition: IoC.cs:55
Loyc.MemoizedTypeName.Get
static string Get(Type type)
Computes a short language-agnostic name for a type, including generic parameters, e....
Definition: MemoizedTypeName.cs:24
Loyc.Math.IOrderedExt
Extension methods for IOrdered<T>.
Definition: Interfaces.cs:54
Loyc.Geometry.INewPoint
This interface exists to work around a limitation of C#; see IPoint<T>.
Definition: IPoint.cs:225
Loyc.Collections.ReversedList
Adapter: a reversed of an IList<T>. TODO: unit tests.
Definition: ReversedList.cs:12
Loyc.LLParserGenerator.CodeGenHelperBase.CreateRuleMethod
virtual LNode CreateRuleMethod(Rule rule, VList< LNode > methodBody)
Generates the method for a rule, given the method's contents.
Definition: CodeGenHelperBase.cs:388
Loyc.MiniTest.Assert.ReferenceEquals
static new void ReferenceEquals(object a, object b)
Verifies that two references are equal.
Definition: MiniTest.cs:475
Loyc.Collections.BMultiMap.RemoveAll
int RemoveAll(K key)
Removes all the items from the collection whose key compares equal to the specified key.
Definition: BMultiMap.cs:203
Loyc.Syntax.ParseNumberFlag.StopBeforeOverflow
@ StopBeforeOverflow
Changes overflow handling behavior when parsing an integer, so that the result does not overflow (wra...
Loyc.MiniTest.ExpectedExceptionAttribute
Marks a test that is expected to throw an exception of a particular type. The test fails if the expec...
Definition: MiniTest.cs:174
Loyc.Syntax.BaseParser.LA0Int
abstract MatchType LA0Int
Returns the token type of _lt0 (normally _lt0.TypeInt)
Definition: BaseParser.cs:93
Loyc.Syntax.ParseHelpers.UnescapeCStyle
static StringBuilder UnescapeCStyle(UString s, out EscapeC encountered, bool removeUnnecessaryBackslashes=false)
Unescapes a string that uses C-style escape sequences, e.g. "\\\n\\\r" becomes "\n\r".
Definition: ParseHelpers.cs:86
Loyc.Collections.AListBase.RemoveObserver
virtual bool RemoveObserver(IAListTreeObserver< K, T > observer)
Removes a previously attached tree observer from this list.
Definition: AListBase.cs:1176
Loyc.Collections.AList.Sort
void Sort(Comparison< T > comp)
Uses a specialized "tree quicksort" algorithm to sort this list using the specified Comparison<T>.
Definition: AList.cs:367
Loyc.Collections.Impl.AListInnerBase.SetAt
override void SetAt(uint index, T item, IAListTreeObserver< K, T > tob)
Sets an item at the specified sub-index.
Definition: AListInnerBase.cs:350
Loyc.Collections.Bijection.Bijection
Bijection(int capacity)
Constructs a bijection out of two Dictionary<TKey,TValue> objects, each with the specified capacity.
Definition: Bijection.cs:46
Loyc.Ecs.Parser.EcsPreprocessor.SaveComments
bool SaveComments
Controls whether comments and newlines are saved into TriviaList.
Definition: EcsPreprocessor.cs:59
Loyc.Collections.LCInterfaces
Extension methods for Loyc collection interfaces
Definition: Extended interfaces.cs:47
Loyc.G.BareHtmlEntityNameForAscii
static string BareHtmlEntityNameForAscii(char c)
Gets a bare HTML entity name for an ASCII character, or null if there is no entity name for the given...
Definition: G.cs:238
Loyc.Collections.Impl.AListNode.CountSizeInBytes
abstract long CountSizeInBytes(int sizeOfT, int sizeOfK)
Tallies the memory use of the current node and all child nodes, with the assumption that each object ...
Loyc.Collections.WListProtected.GetAtDff
T GetAtDff(int distanceFromFront)
Gets an item WITHOUT doing a range check
Definition: WListBase.cs:297
Loyc.Collections.NegListSource.Equals
override bool Equals(object obj)
Definition: NegListSource.cs:108
Loyc.Syntax.Lexing.IndentTokenGenerator.IndentToken
Token IndentToken
Gets or sets the prototype token for indentation markers.
Definition: IndentTokenGenerator.cs:556
Loyc.Geometry.INewPoint3
This interface exists to work around a limitation of C#; see IPoint<T> and IPoint3<T>.
Definition: IPoint3.cs:52
Loyc.Collections.EnumerableExt.FirstIndexWhere< T >
static ? int FirstIndexWhere< T >(this IEnumerable< T > list, Func< T, bool > pred)
Gets the lowest index at which a condition is true, or null if nowhere.
Definition: EnumerableExt.cs:40
Loyc.Syntax.Lexing.TokenListAsLexer
Adapter: converts IEnumerable(Token) to the ILexer<Token> interface.
Definition: TokenListAsLexer.cs:15
Loyc.Collections.Map.Map
Map(IEnumerable< KeyValuePair< K, V >> list)
Creates a map with the specified elements.
Definition: Map.cs:207
Loyc.Collections.CPStringTrie.TryAdd
bool TryAdd(string key, TValue value)
Adds the specified key-value pair only if the specified key is not already present in the trie.
Definition: CPStringTrie.cs:35
Loyc.Collections.MMap.Xor
MMap< K, V > Xor(MapOrMMap< K, V > other)
Definition: MMap.cs:302
Loyc.LLParserGenerator.Gate
Represents a "gate" (p => m), which is a mechanism to separate prediction from matching in the contex...
Definition: Predicates.cs:756
Loyc.Collections.LCInterfaces.GetAndEdit< K, V >
static bool GetAndEdit< K, V >(IDictionary< K, V > dict, K key, ref V value, DictEditMode mode)
Default implementation of IDictionaryEx<K, V>.GetAndEdit.
Definition: IDictionaryEx.cs:106
LeMP.IMacroContext.ScopedProperties
IDictionary< object, object > ScopedProperties
Returns a table of "properties" (arbitrary key-value pairs) that exist in the current scope....
Definition: IMacroContext.cs:27
Loyc.Collections.Set.CountMemory
long CountMemory(int sizeOfT)
Measures the total size of all objects allocated to this collection, in bytes, including the size of ...
Definition: Set.cs:330
Loyc.MiniTest.Assert.That
static void That(bool condition, string message, params object[] args)
Calls Fail(message, args) if condition is false.
Definition: MiniTest.cs:509
Loyc.Collections.IListSource.TryGet
T TryGet(int index, out bool fail)
Gets the item at the specified index, and does not throw an exception on failure.
Loyc.Collections.Impl.AListIndexer.NodeRemoved
void NodeRemoved(AListNode< K, T > child, AListInnerBase< K, T > parent)
Called when a child node is removed from an inner node.
Definition: AListIndexer.cs:116
Loyc.Syntax.Les.Les2Lexer.UnescapeString
static bool UnescapeString(ref UString sourceText, char quoteType, bool isTripleQuoted, Action< int, string > onError, StringBuilder sb, UString indentation=default(UString), bool les3TQIndents=false)
Parses a normal or triple-quoted string whose starting quotes have been stripped out....
Definition: Les2Lexer.cs:203
Loyc.Syntax.ILNode.Name
Symbol Name
Definition: ILNode.cs:50
Loyc.Collections.CG.Cache
static object Cache(char o)
Special overload to avoid treating argument as int32 in C#.
Definition: CG.cs:48
Loyc.Syntax.LNodeExt
Standard extension methods for LNode.
Definition: LNodeExt.cs:13
Loyc.LLParserGenerator.AndPred.Clone
override Pred Clone()
Deep-clones a predicate tree. Terminal sets and Nodes referenced by the tree are not cloned; the clon...
Definition: Predicates.cs:910
Loyc.Collections.EmptyList
Helper class: EmptyList<T>.Value is a read-only empty list.
Definition: EmptyList.cs:10
LeMP.IMacroContext
This interface provides services offered by the lexical macro processor (LeMP).
Definition: IMacroContext.cs:12
Loyc.Collections.LCInterfaces.NextHigherIndex< T >
static ? int NextHigherIndex< T >(this ISparseListSource< T > list, int? index)
Gets the next higher index that is not classified as an empty space, or null if there are no non-blan...
Definition: ISparseList.cs:90
Loyc.Syntax.AbstractTriviaInjector.IsNewline
abstract bool IsNewline(Trivia trivia)
Returns true if the trivia represents a newline, false otherwise.
Loyc.Collections.Impl.AListNode._isFrozen
volatile bool _isFrozen
Whether the node is knowingly cloned an therefore frozen.
Definition: AListNode.cs:266
LeMP.IMacroContext.IsTarget
bool IsTarget
Returns true if the current node is the target of its parent call node.
Definition: IMacroContext.cs:89
Loyc.LLParserGenerator
Code related to LLLPG, the Loyc LL(k) Parser Generator (LLLPG.exe).
Definition: NamespaceDocs.cs:120
Loyc.Collections.LCInterfaces.Any
static bool Any(this ICount c)
Returns true if the collection contains any elements.
Definition: ICount.cs:48
Loyc.Syntax.Lexing.BaseILexer.IndentString
UString IndentString
Gets a string slice that holds the spaces or tabs that were used to indent the current line.
Definition: BaseILexer.cs:63
Loyc.Ecs.EcsValidators.KeyNameComponentOf
static Symbol KeyNameComponentOf(LNode name)
Given a complex name such as global::Foo<int>.Bar<T>, this method identifies the base name component,...
Definition: EcsValidators.cs:755
Loyc.Collections.WListProtected.Add
void Add(T item)
Inserts an item at the "front" of the list, which is index 0 for FWList, or Count for WList.
Definition: WListBase.cs:142
Loyc.LLParserGenerator.PGNodeSet
An immutable set that implements IPGTerminalSet so that it can be used by LLParserGenerator.
Definition: GeneralCodeGenHelper.cs:266
Loyc.Collections.SparseAList.Prepend
virtual void Prepend(SparseAList< T > other)
Prepends an AList to this list in sublinear time.
Definition: SparseAList.cs:199
Loyc.Syntax.Lexing.LexerSource.Skip
new void Skip()
Definition: LexerSource.cs:98
Loyc.Syntax.Les.Les2Lexer.ParseNumberCore
static object ParseNumberCore(UString source, bool isNegative, int numberBase, bool isFloat, Symbol typeSuffix, out string error)
Parses the digits of a literal (integer or floating-point), not including the radix prefix (0x,...
Definition: Les2Lexer.cs:541
Loyc.LLParserGenerator.CodeGenHelperBase
Suggested base class for custom code generators. Each derived class is typically designed for a diffe...
Definition: CodeGenHelperBase.cs:26
Loyc.LLParserGenerator.GeneralCodeGenHelper.MatchCast
LNode MatchCast
If MatchCast is set, a cast to this type is added when calling Match() or NewSet() or set....
Definition: GeneralCodeGenHelper.cs:76
Loyc.G.True
static bool True(Action action)
This method simply calls the delegate provided and returns true. It is used to do an action in a cond...
Definition: G.cs:128
Loyc.Syntax.Les.Les2Lexer.SkipValueParsing
bool SkipValueParsing
Used for syntax highlighting, which doesn't care about token values. This option causes the Token....
Definition: Les2Lexer.cs:34
Loyc.Syntax.SourceRangeExt
Standard extension methods for ISourceRange.
Definition: ISourceRange.cs:15
Loyc.Collections.AListBase.Contains
bool Contains(T item)
Returns true if-and-only-if the specified item exists in the list.
Definition: AList.cs:775
Loyc.G.CountOnes
static int CountOnes(int x)
Returns the number of bits that are set in the specified integer.
Definition: G.cs:275
Loyc.Collections.AListBase.ObserverMgr.ItemAdded
void ItemAdded(T item, AListLeafBase< K, T > parent)
Called when an item is added to a leaf node.
Definition: AListNodeObserver.cs:76
Loyc.Syntax.ParserSource.ParserSource
ParserSource(IList< Token > list, Token eofToken, ISourceFile file, int startIndex=0)
<inheridoc>
Definition: ParserSource.cs:134
Loyc.Collections.INotifyListChanging.ListChanging
ListChangingHandler< T > ListChanging
Occurs when the collection associated with this interface is about to change.
Definition: INotifyListChanging.cs:49
Loyc.MiniTest.SuccessException
Thrown by Assert.Success().
Definition: MiniTest.cs:214
Loyc.Collections.VList.SmartSelectMany
VList< T > SmartSelectMany(Func< T, IList< T >> map)
Maps a list to another list by concatenating the outputs of a mapping function.
Definition: VList.cs:586
Loyc.Syntax.ParsingMode.Expressions
static readonly ParsingMode Expressions
Tells IParsingService.Parse to treat the input as a single expression or expression list (which,...
Definition: ParsingMode.cs:19
Loyc.Collections.FVList.SmartSelect
FVList< T > SmartSelect(Func< T, T > map)
Maps a list to another list of the same length.
Definition: FVList.cs:585
Loyc.Math.IIncrementer.SubOne
T SubOne(T a)
Returns a - 1.
Loyc.Localize
Localize is a global hook into which a string-mapping localizer can be installed. It makes your progr...
Definition: Localize.cs:194
Loyc.Collections.VListBlockArray.VListBlockArray
VListBlockArray(FVList< T > prior, T firstItem)
Inits an immutable block with one item.
Definition: VListBlockArray.cs:45
Loyc.Collections.MaxHeap.Add
void Add(T item)
Adds an item to the heap (synonym of Push()). Complexity: O(Count).
Definition: Heap.cs:85
Loyc.LLParserGenerator.IntStreamCodeGenHelper.CodeToTerminalPred
override Pred CodeToTerminalPred(LNode expr, ref string errorMsg)
Creates a terminal predicate from a code expression.
Definition: IntStreamCodeGenHelper.cs:39
Loyc.LLParserGenerator.CodeGenHelperBase.ListInitializer
LNode ListInitializer
Gets or sets the initializer expression for lists created with the +: operator (default: new List<T>(...
Definition: CodeGenHelperBase.cs:70
Loyc.Syntax.Lexing.ISimpleToken.StartIndex
int StartIndex
Character index where the token starts in the source file.
Definition: Token.cs:544
Loyc.LLParserGenerator.CodeGenHelperBase.GenerateSkip
virtual LNode GenerateSkip(bool savingResult)
Returns (Skip()), or (MatchAny()) if the result is to be saved.
Definition: CodeGenHelperBase.cs:206
Loyc.Collections.BList.IndexOfExact
int IndexOfExact(T item)
Specialized search function that finds the index of an item that not only compares equal to the speci...
Definition: BList.cs:423
Loyc.Syntax.ILNodePrinterOptions.IndentString
string IndentString
Specifies the string to use for each level of indentation of nested constructs in the language,...
Definition: ILNodePrinterOptions.cs:61
Loyc.MessageSink.ContextToString
static Func< object, string > ContextToString
Gets the strategy that message sinks should use to convert a context object to a string.
Definition: MessageSink.out.cs:129
Loyc.LLParserGenerator.IntStreamCodeGenHelper.GetRelativeCostForSwitch
override int GetRelativeCostForSwitch(IPGTerminalSet set)
Used to help decide whether a "switch" or an if statement will be used to handle a prediction tree,...
Definition: IntStreamCodeGenHelper.cs:213
Loyc.ExceptionExt.DataList
static string DataList(this Exception ex)
Converts Exception.Data to a string, separating each key-value pair by a newline.
Definition: Extensions.cs:123
LeMP.IMacroContext.NextTempCounter
int NextTempCounter
Gets the next number to use as a suffix for temporary variables (without incrementing).
Definition: IMacroContext.cs:120
Loyc.ConsoleMessageSink
Sends all messages to System.Console.WriteLine(), with hard-coded colors for Error,...
Definition: BasicSinks.cs:19
LeMP.MacroMode.PriorityInternalOverride
@ PriorityInternalOverride
Used to order behavior of standard macros.
Loyc.Collections.ListAsListSource
Helper type returned from LCExt.AsListSource<T>.
Definition: ListAsListSource.cs:39
Loyc.Collections.ReversedList.GetHashCode
override int GetHashCode()
Returns the hashcode of the wrapped object.
Definition: ReversedList.cs:31
Loyc.Geometry.ISizeReader.Width
T Width
Gets the width of a rectangle (the difference between X coordinates).
Definition: IRectangle.cs:14
Loyc.Syntax.BaseParserForList.BaseParserForList
BaseParserForList(IList< Token > list, Token eofToken, ISourceFile file, int startIndex=0)
<inheridoc>
Definition: BaseParserForList.cs:198
Loyc.Collections.NumRange
Represents a range of integers of a specified data type.
Definition: NumRange.cs:21
Loyc.Collections.ListExt.Resize< T >
static void Resize< T >(this List< T > list, int newSize)
Resizes a list by removing items from the list (if it is too long) or adding default(T) values to the...
Definition: ListExt.cs:163
Loyc.Collections.NestedEnumerable
Helper type. You pass a cloneable Frame object to the constructor, and then a copy of this Frame is u...
Definition: NestedEnumerator.cs:147
Loyc.Syntax.SourceFileWithLineRemaps.IndexToLine
SourcePos IndexToLine(int index)
Returns the position in a source file of the specified index.
Definition: LineRemapper.cs:54
Loyc.Syntax.Les.Les2PrecedenceMap.IsOpChar
static bool IsOpChar(char c)
Returns true if this character is one of those that operators are normally made out of in LES.
Definition: LesPrecedenceMap.cs:226
Loyc.Syntax.Lexing.IndentTokenGenerator.DedentToken
Token DedentToken
Gets or sets the prototype token for unindentation markers.
Definition: IndentTokenGenerator.cs:563
Loyc.Collections.ListExt
Extension methods and helper methods for List<T>, IList<T>, IReadOnlyList<T>, arrays,...
Definition: ROLSlice.cs:10
Loyc.Syntax.Impl.PrinterState.Newline
Checkpoint Newline(int changeIndentLevel=0)
Writes a newline and the appropriate amount of indentation afterward.
Definition: PrinterState.cs:123
Loyc.G.IsInRange
static bool IsInRange(this int num, int lo, int hi)
Returns true if num is between lo and hi.
Definition: GRange.out.cs:27
Loyc.LLParserGenerator.GeneralCodeGenHelper.CastLA
bool CastLA
Whether to cast the result of LA0 and LA(i) to LaType (default: true)
Definition: GeneralCodeGenHelper.cs:40
Loyc.LLParserGenerator.IntRange.CompareTo
int CompareTo(IntRange other)
Compares only the Lo values of two ranges.
Definition: IntSet.cs:625
Loyc.Collections.Slice_.Slice_
Slice_(IListSource< T > list, int start, int count=int.MaxValue)
Initializes a slice.
Definition: Slice.cs:53
Loyc.Collections.VListBlock.Capacity
abstract int Capacity
Returns the maximum number of elements in this block
Definition: VListBlock.cs:310
Loyc.Collections.MSet.IsProperSupersetOf
bool IsProperSupersetOf(IEnumerable< T > other)
Definition: MSet.cs:285
Loyc.Collections.BMultiMap.FindLowerBound
int FindLowerBound(K key, out V value, out bool found)
Finds the lowest index of an item that is equal to or greater than the specified item.
Definition: BMultiMap.cs:366
Loyc.Syntax.NodeStyle.StatementBlock
@ StatementBlock
The node's immediate children (and/or the node itself) should be printed in statement notation,...
Loyc.Syntax.Lexing.IToken< int >
Loyc.Collections.FWList
FWList is the mutable variant of the FVList data structure.
Definition: FWList.cs:31
Loyc.Collections.ICollectionEx
This interface is intended to be implemented by editable collection classes that are not indexable li...
Definition: Extended interfaces.cs:28
Loyc.Ecs.EcsValidators.SpaceDefinitionKind
static Symbol SpaceDefinitionKind(LNode n, Pedantics p=Pedantics.Lax)
Returns the space kind, which is one of the names #struct, #class, #enum, #interface,...
Definition: EcsValidators.cs:130
Loyc.Collections.INegDeque
Represents a Deque that supports negative indexes. In this kind of Deque, pushing and popping element...
Definition: INegListSource.cs:154
Loyc.LLParserGenerator.CodeGenHelperBase.ResolveAlias
LNode ResolveAlias(LNode expr)
Returns the node for an alias. If the specified node is not an alias, returns the same node unchanged...
Definition: CodeGenHelperBase.cs:98
Loyc.Collections.Impl.IAListTreeObserver.AddAll
void AddAll(AListNode< K, T > node)
Called when all children are being added to a node (leaf or inner). Notifications are not sent for in...
Loyc.Collections.Impl.IAListTreeObserver.CheckPoint
void CheckPoint()
Called when a tree modification operation is completed.
Loyc.Collections.BDictionary.FindLowerBound
int FindLowerBound(ref K key, out bool found)
Definition: BDictionary.cs:225
LeMP.MacroMode.NoReprocessing
@ NoReprocessing
The macro's result (including children) is not processed further. This flag only takes effect when th...
Loyc.Collections.LCExt.AsListSource< T >
static IListSource< T > AsListSource< T >(this IList< T > c)
Adapter: treats any IList{T} object as IListSource{T}.
Definition: ListAsListSource.cs:20
Loyc.Syntax.Les
Contains classes related to Loyc Expression Syntax (LES), including the parser and printer (reachable...
Definition: NamespaceDocs.cs:106
Loyc.Syntax.CodeSymbols.Braces
static readonly Symbol Braces
"{}" Creates a scope.
Definition: CodeSymbols.cs:66
Loyc.Collections.WList.AdjustWListIndex
override int AdjustWListIndex(int index, int size)
This method implements the difference between FWList and WList: In FWList it returns index,...
Definition: WList.cs:34
Loyc.Collections.LCInterfaces.AddOrGetExisting< K, V >
static Maybe< V > AddOrGetExisting< K, V >(this IDictionaryEx< K, V > dict, K key, V value)
Gets the existing value, or adds a new value if there was no existing value.
Definition: IDictionaryEx.cs:132
Loyc.Collections.IBRangeEx.SliceStart
int SliceStart
Index where this range starts within the InnerList.
Definition: IRanges.cs:321
Loyc.LLParserGenerator.LLParserGenerator.PrematchByDefault
bool PrematchByDefault
If true, rules that are not marked private, public, or internal are assumed not to be called from out...
Definition: LLParserGenerator.cs:126
Loyc.Collections.Impl.IEnumeratorFrame.MoveNext
int MoveNext(ref Frame frame, ref T current)
Enumerates the next item, or the next child collection.
Loyc.Collections.WList.Pop
T Pop()
Removes the back item (at index Count-1) from the list and returns it.
Definition: WList.cs:241
Loyc.Syntax.NodeStyle.BinaryLiteral
@ BinaryLiteral
Used for a binary (base-2) literal like 0b11111.
Loyc.Threading.ThreadEx.Start
void Start()
Causes the operating system to change the state of the current instance to System....
Definition: ThreadEx.cs:98
Loyc.Syntax.LNode.Target
abstract LNode Target
Returns the target of a method call, or null if IsCall is false. The target can be a symbol with no n...
Definition: LNode.cs:364
Loyc.Threading.ThreadEx.Abort
void Abort()
Definition: ThreadEx.cs:248
Loyc.LLParserGenerator.LlpgGeneralTestsBase.TestCompiler
Definition: LlpgGeneralTestsBase.cs:21
Loyc.Math.INumTraits.IsFloatingPoint
bool IsFloatingPoint
Returns true if T is floating-point, meaning that it can represent very large and very small numbers,...
Definition: Interfaces.cs:126
Loyc.Geometry.IRectangle3Base
Represents a mutable 3D rectangular prism.
Definition: IRectangle3.cs:67
Loyc.Collections.BMultiMap.TryGetValue
bool TryGetValue(K key, out V value)
Finds a value associated with the specified key.
Definition: BMultiMap.cs:213
Loyc.Collections.IFRange< T >
Loyc.Syntax.EscapeC.HasLongEscape
@ HasLongEscape
While unescaping, a valid \u escape was encountered with more than 4 digits. To detect whether the va...
Loyc.Collections.VList.operator!=
static bool operator!=(VList< T > lhs, VList< T > rhs)
Returns whether the two list references are different. Does not compare the contents of the lists.
Definition: VList.cs:132
Loyc.Syntax.Les.Les2LanguageService.Tokenize
ILexer< Token > Tokenize(ICharSource text, string fileName, IMessageSink msgs)
Returns a lexer that is configured to begin reading the specified file.
Definition: Les2LanguageService.cs:54
Loyc.Syntax.ILNodePrinterOptions.PrintTriviaExplicitly
bool PrintTriviaExplicitly
If supported by the printer, this option causes comments and spaces to be printed as attributes in or...
Definition: ILNodePrinterOptions.cs:36
LeMP.MacroProcessor.MacroProcessor
MacroProcessor(IMessageSink sink, Type prelude)
Initializes MacroProcessor.
Definition: MacroProcessor.cs:100
LeMP.Tests.TestStaticDeconstructMacro
Definition: TestStaticDeconstructMacro.cs:10
Loyc.Collections.BMultiMap.IndexOfExact
int IndexOfExact(K key)
Specialized search function that finds the first index of an item whose key compares equal to the spe...
Definition: BMultiMap.cs:441
Loyc.LLParserGenerator.AndPred.Pred
object Pred
The predicate to match and backtrack. Must be of type LNode or Pred.
Definition: Predicates.cs:889
Loyc.Syntax.Les.Les2PrecedenceMap.ToSuffixOpName
Symbol ToSuffixOpName(object symbol)
Given a normal operator symbol like (Symbol)"'++", gets the suffix form of the name,...
Definition: LesPrecedenceMap.cs:284
Loyc.Syntax.CodeSymbols.Eq
static readonly Symbol Eq
"==" Equality test operator
Definition: CodeSymbols.cs:45
Loyc.Syntax.LNodeExt.AsLNode
static LNode AsLNode(this VList< LNode > list, Symbol listIdentifier)
Converts a list of LNodes to a single LNode by using the list as the argument list in a call to the s...
Definition: LNodeExt.cs:127
Loyc.G.Log2Floor
static int Log2Floor(int x)
Returns the floor of the base-2 logarithm of x. e.g. 1024 -> 10, 1000 -> 9
Definition: G.cs:318
Loyc.Collections.Impl.InternalSet.Empty
static readonly InternalSet< T > Empty
An empty set.
Definition: InternalSet.cs:372
Loyc.Threading.ThreadEx.GetHashCode
override int GetHashCode()
Returns a hash code for the current thread.
Definition: ThreadEx.cs:256
Loyc.Collections.MutableListExtensionMethods.ICollectionExt.SelectArray< T, R >
static R[] SelectArray< T, R >(this ICollection< T > input, Func< T, R > selector)
Maps a list to an array of the same length.
Definition: ICollectionExt.cs:31
Loyc.Syntax.ParsingService.ParseFile
static IListSource< LNode > ParseFile(this IParsingService parser, string fileName, IMessageSink msgs=null, ParsingMode inputType=null, bool preserveComments=true)
Opens the specified file, parses the entire file, and closes the file.
Definition: IParsingService.cs:261
Loyc.Collections.ListSourceAsSparse.NextHigherItem
T NextHigherItem(ref int? index)
Increases index by at least one to reach the next index that is not classified as empty space,...
Definition: ListSourceAsSparse.cs:56
Loyc.Utilities.GoInterface.NumberOfUnmatchedMethods
static int NumberOfUnmatchedMethods
The number of methods in the interface for which a matching method in T could not be found.
Definition: GoInterface.cs:490
Loyc.Collections.AListBase.AListBase
AListBase(AListBase< K, T > items, bool keepListChangingHandlers)
Cloning constructor. Does not duplicate the observer (IAListTreeObserver<K,T>), if any,...
Definition: AListBase.cs:240
Loyc.Collections.Impl.InternalSet.IsProperSubsetOf
bool IsProperSubsetOf(IEnumerable< T > other, IEqualityComparer< T > comparer, int myExactCount)
Returns true if all items in this set are present in the other set, and the other set has at least on...
Definition: InternalSet.cs:1557
Loyc.Syntax.CodeSymbols.XorBits
static readonly Symbol XorBits
"^" Bitwise exclusive-or operator
Definition: CodeSymbols.cs:64
Loyc.Collections.WListBase
Shared base class of FWList and WList.
Definition: WListBase.cs:352
Loyc.LLParserGenerator.IPGTerminalSet.Inverted
IPGTerminalSet Inverted()
Creates a version of the set with IsInverted toggled.
Loyc.Collections.ReverseBinumerator
Adapter: a IBinumerator<T> that swaps the MoveNext() and MovePrev() methods.
Definition: ReverseBinumerator.cs:9
Loyc.Collections.Impl.IAListTreeObserver.NodeAdded
void NodeAdded(AListNode< K, T > child, AListInnerBase< K, T > parent)
Called when a child node is added to an inner node.
Loyc.Syntax.IParsingService.FileExtensions
IEnumerable< string > FileExtensions
Standard file extensions for this language, without leading dots, with the first one being the most c...
Definition: IParsingService.cs:30
Loyc.Syntax.Les.Les2LanguageService.Parse
IListSource< LNode > Parse(ICharSource text, string fileName, IMessageSink msgs, ParsingMode inputType=null, bool preserveComments=true)
Parses a source file into one or more Loyc trees.
Definition: Les2LanguageService.cs:58
Loyc.Syntax.LNode.WithArgs
abstract CallNode WithArgs(VList< LNode > args)
Creates a Node with a new argument list. If this node is not a call, a new node is created using this...
Loyc.Collections.Heap
Definition: Heap.cs:306
Loyc.Syntax.LNode.Calls
virtual bool Calls(Symbol name, int argCount)
Returns true if Name == name and Max + 1 == argCount (which implies Kind == LNodeKind....
Definition: LNode.cs:705
Loyc.Syntax.Lexing.BaseLexer.IndexToLine
SourcePos IndexToLine(int charIndex)
Returns the position in a source file of the specified index.
Definition: BaseLexer.cs:698
Loyc.Collections.FVList.CopyTo
void CopyTo(T[] array, int arrayIndex)
Copies the elements of the collection to an Array, starting at a particular array index.
Definition: FVList.cs:414
Loyc.Collections.Impl.AListNode.DetachedClone
abstract AListNode< K, T > DetachedClone()
Creates an unfrozen shallow duplicate copy of this node. The child nodes (if this is an inner node) a...
Loyc.Collections.FVList.Transform
FVList< T > Transform(VListTransformer< T > x)
Transforms a list (combines filtering with selection and more).
Definition: FVList.cs:725
Loyc.LLParserGenerator.Seq.Clone
override Pred Clone()
Deep-clones a predicate tree. Terminal sets and Nodes referenced by the tree are not cloned; the clon...
Definition: Predicates.cs:257
Loyc.Syntax.IParsingService.HasTokenizer
bool HasTokenizer
Returns true if the Tokenize method is available.
Definition: IParsingService.cs:33
LeMP.MacroMode.PriorityInternalFallback
@ PriorityInternalFallback
Used to order behavior of standard macros.
Loyc.Utilities.CastOptions.AllowUnmatchedMethods
@ AllowUnmatchedMethods
Allow the cast even if NumberOfUnmatchedMethods > 0
Loyc.Syntax.Lexing.LexerSourceWorkaround.Error
override void Error(int lookaheadIndex, string format, params object[] args)
This method is called to format and handle errors that occur during lexing. The default implementatio...
Definition: LexerSource.cs:179
Loyc.Collections.VListBlock.FGet
abstract T FGet(int index, int localCount)
Gets an item at distance 'index' from the front (beginning of an FVList)
Loyc.Syntax.LNode.IsSpecialName
static bool IsSpecialName(string name)
Returns true if name is considered a "special" name that starts with any character below 48 in ASCII,...
Definition: LNode.cs:324
Loyc.Collections.Impl.InternalList.Resize
void Resize(int newSize, bool allowReduceCapacity)
Makes the list larger or smaller, depending on whether newSize is larger or smaller than Count.
Definition: InternalList.cs:149
Loyc.Syntax.Lexing.TokenKind.AttrKeyword
@ AttrKeyword
e.g. public, private, static, virtual
Loyc.Syntax.Les.Les2PrinterOptions.AllowChangeParentheses
override bool AllowChangeParentheses
Introduces extra parenthesis to express precedence, without using an empty attribute list [] to allow...
Definition: Les2Printer.cs:686
Loyc.Collections.LinqToLists.SkipNowWhile< T >
static Slice_< T > SkipNowWhile< T >(this IListSource< T > list, Func< T, bool > predicate)
Returns a slice without the initial elements of the list that meet the specified criteria....
Definition: LinqToLists.out.cs:144
Loyc.Collections.EnumerationException
An exception thrown by an enumerator when it detects that the collection was modified after enumerati...
Definition: Exceptions.cs:101
Loyc.StringBuilderExt.LastIndexOf
static int LastIndexOf(this StringBuilder sb, UString searchStr, int startIndex=int.MaxValue, bool ignoreCase=false)
Gets the index of a substring in a StringBuilder
Definition: StringBuilderExt.cs:116
Loyc.Syntax.Les.Les3PrettyPrinter.Les3PrettyPrinter
Les3PrettyPrinter(StringBuilder target, IMessageSink sink, ILNodePrinterOptions options)
Creates an instance of this class, which produces plain LES augmented with control codes.
Definition: Les3PrettyPrinter.cs:35
Loyc.Collections.NegListSource.Max
int Max
Returns the maximum valid index, which is Min + OriginalList.Count - 1.
Definition: NegListSource.cs:76
Loyc.Syntax.Lexing.ILexer.LineNumber
int LineNumber
Current line number (1 for the first line).
Definition: ILexer.cs:31
Loyc.Collections.Map.Intersect
Map< K, V > Intersect(MapOrMMap< K, V > other)
Returns a copy of the current map with all keys removed from this map that are not present in the oth...
Definition: Map.cs:318
Loyc.Collections.NegListSource.OriginalList
IListSource< T > OriginalList
Gets the list that was passed to the constructor of this instance.
Definition: NegListSource.cs:43
Loyc.Collections.Impl.CPByteTrie.Add
void Add(byte[] key, int offset, int length, TValue value)
Adds the specified key-value pair to the trie, throwing an exception if the key is already present.
Definition: CPByteTrie.cs:33
Loyc.LLParserGenerator.IntSet.Size
long? Size
Gets the number of integers whose membership test would succeed (the maximum possible value is 0x1000...
Definition: IntSet.cs:429
Loyc.Syntax.Les.Les3PrecedenceMap.Reset
override void Reset()
Forgets previously encountered operators to save memory.
Definition: LesPrecedenceMap.cs:326
Loyc.Syntax.CodeSymbols._Dereference
static readonly Symbol _Dereference
Alias for Mul.
Definition: CodeSymbols.cs:33
Loyc.EzStopwatch
A wrapper around Stopwatch with a more convenient interface, currently oriented around measuring mill...
Definition: EzStopwatch.cs:50
Loyc.TypeExt
Extension methods for Type.
Definition: Extensions.cs:15
Loyc.SeverityMessageFilter.IsEnabled
bool IsEnabled(Severity level)
Returns true if messages of the specified type will actually be printed, or false if Write(type,...
Definition: WrapperSinks.cs:57
Loyc.Collections.Impl.AListInnerBase< int, T >::HandleUndersized
virtual bool HandleUndersized(int i, IAListTreeObserver< K, T > tob)
This is called by RemoveAt(), DoSingleOperation() for B+ trees, or by the constructor called by CopyS...
Definition: AListInnerBase.cs:442
Loyc.Geometry.ISize3Reader
Interface for reading the size of a 3D object.
Definition: IRectangle3.cs:10
Loyc.Collections.CollectionDebugView
This helper class gives a nice view of a custom collection within the debugger.
Definition: CollectionDebugView.cs:25
Loyc.Collections.Impl.IAListTreeObserver.RootChanged
void RootChanged(AListBase< K, T > list, AListNode< K, T > root, bool clear)
Called when the root of the tree changes, or when the list is cleared. Also called after Attach(),...
Loyc.Collections.MMap.MMap
MMap(IEnumerable< KeyValuePair< K, V >> copy, IEqualityComparer< K > comparer)
Creates a map with the specified elements and key comparer.
Definition: MMap.cs:51
Loyc.Syntax.Les.Les3PrinterOptions.SpaceInsideTuples
bool SpaceInsideTuples
Whether to print a space inside tuples like f( ...; ).
Definition: Les3Printer.cs:1441
Loyc.Geometry.IPoint
A mutable 2D point with X and Y coordinates.
Definition: IPoint.cs:219
Loyc.Collections.WListProtected.AdjustWListIndex
virtual int AdjustWListIndex(int index, int size)
This method implements the difference between FWList and WList: In FWList it returns index,...
Definition: WListBase.cs:95
Loyc.Collections.ListExt.Sort< T >
static void Sort< T >(this IList< T > list)
Definition: ListExt.cs:306
Loyc.Threading.ThreadEx.ThreadStarting
static EventHandler< ThreadStartEventArgs > ThreadStarting
This event is called in the context of a newly-started thread, provided that the thread is started by...
Definition: ThreadEx.cs:76
LeMP.MacroContext.GetOptions
static IEnumerable< KeyValuePair< LNode, LNode > > GetOptions(VList< LNode > optionList)
Transforms an option list in the format option1(v1), option2(v2) or option1: v1, option2: v2 into a s...
Definition: IMacroContext.cs:203
Loyc.Collections.ValueCollection
Adapter: this is a read-only collection of Values read from a generic IDictionary....
Definition: ValueCollection.cs:49
Loyc.Syntax.ParseHelpers.UnescapeCStyle
static string UnescapeCStyle(UString s, bool removeUnnecessaryBackslashes=false)
Unescapes a string that uses C-style escape sequences, e.g. "\\\n\\\r" becomes "\n\r".
Definition: ParseHelpers.cs:73
Loyc.LLParserGenerator.Alts
Describes a series of alternatives (branches), a kleene star (*), or an optional element (?...
Definition: Predicates.cs:309
Loyc.Collections.NegList.TrySet
bool TrySet(int index, T value)
Definition: NegList.cs:98
Loyc.Either
Holds a single value of one of two types (L or R).
Definition: Either.cs:12
Loyc.Collections.Set.IsProperSubsetOf
bool IsProperSubsetOf(Set< T > other)
Definition: Set.cs:149
Loyc.Collections.NegList.Equals
override bool Equals(object obj)
Definition: NegList.cs:124
Loyc.LLParserGenerator.CodeGenHelperBase.GenerateMatch
virtual LNode GenerateMatch(IPGTerminalSet set, bool savingResult, bool recognizerMode)
Generate code to match a set, e.g. MatchRange('a', 'z'); or MatchExcept(' ', '\r'); }....
Definition: CodeGenHelperBase.cs:254
Loyc.Syntax.Les.Les2Printer.StartStmt
static readonly Precedence StartStmt
Context: beginning of main expression (potential superexpression)
Definition: Les2Printer.cs:255
Loyc.Ecs.Parser.EcsParser.TentativeResult
Definition: EcsParser.cs:87
Loyc.Collections.AListReverseView
A reverse view of an AList.
Definition: AListBase.cs:1215
Loyc.Collections.Impl.InternalSetStats.ItemsInOverflow
int ItemsInOverflow
Number of items that are in overflow lists. Note that if a single item is in an overflow list,...
Definition: InternalSet.cs:1701
Loyc.Syntax.CodeSymbols.XorBitsAssign
static readonly Symbol XorBitsAssign
"^=" bitwise-xor-by operator
Definition: CodeSymbols.cs:123
Loyc.Collections.BDictionary.FindLowerBound
int FindLowerBound(K key, out bool found)
Finds the lowest index of an item with a key that is equal to or greater than the specified key.
Definition: BDictionary.cs:210
Loyc.Syntax.LNodeExt.InParens
static LNode InParens(this LNode node, SourceRange range)
Returns the same node with a parentheses attribute added.
Definition: LNodeExt.cs:256
Loyc.Syntax.Les.Les3PrinterOptions.SpaceAfterPrefixStopPrecedence
int SpaceAfterPrefixStopPrecedence
The printer avoids printing spaces after prefix operators that have the specified precedence or highe...
Definition: Les3Printer.cs:1495
Loyc.G.BoxedTrue
static readonly object BoxedTrue
Singleton true cast to object.
Definition: G.cs:131
Loyc.Collections.BList.BList
BList(int maxNodeSize)
Definition: BList.cs:61
Loyc.Collections.BMultiMap.Remove
int Remove(K key, int maxToRemove)
Removes up to a specified number of items from the collections that have the specified key.
Definition: BMultiMap.cs:177
Loyc.Syntax.ILNode.Range
SourceRange Range
Definition: ILNode.cs:54
Loyc.LLParserGenerator.IPGCodeGenHelper.ShouldGenerateSwitch
bool ShouldGenerateSwitch(IPGTerminalSet[] branchSets, MSet< int > casesToInclude, bool hasErrorBranch)
Returns true if a "switch" statement is the preferable code generation technique rather than the defa...
Loyc.Syntax.Lexing.TokenTree.Clone
new TokenTree Clone()
Gets a deep (recursive) clone of the token tree.
Definition: Token.cs:60
Loyc.Syntax.Lexing.Token
A common token type recommended for Loyc languages that want to use features such as token literals o...
Definition: Token.cs:211
Loyc.Utilities.TagsInWList
An implementation of ITags designed for AstNode.
Definition: TagsInWList.cs:17
Loyc.Collections.ListExt.Repeat< T >
static Repeated< T > Repeat< T >(T value, int count)
Returns a helper object that stores one value, but acts like a read-only list that repeats the value ...
Definition: Repeated.cs:21
Loyc.Triplet
Definition: Triplet.cs:7
LeMP.MacroProcessor.Current
static MacroProcessor Current
Returns the MacroProcessor running on the current thread, or null if none.
Definition: MacroProcessor.cs:89
Loyc.Ecs.EcsValidators.MethodDefinitionKind
static Symbol MethodDefinitionKind(LNode n, out LNode retType, out LNode name, out LNode args, out LNode body, bool allowDelegate, Pedantics p=Pedantics.Lax)
If the given node has a valid syntax tree for a method definition, a constructor, or (when orDelegate...
Definition: EcsValidators.cs:218
Loyc.Syntax.CodeSymbols._Destruct
static readonly Symbol _Destruct
Alias for NotBits.
Definition: CodeSymbols.cs:63
Loyc.Syntax.Lexing.BaseLexer.Newline
void Newline()
Default newline parser that matches ' ' or '\r' unconditionally.
Definition: BaseLexer.cs:257
Loyc.Syntax.ParsingMode.Statements
static readonly ParsingMode Statements
Tells IParsingService.Parse to treat the input as a list of statements. If the language makes a disti...
Definition: ParsingMode.cs:24
Loyc.Collections.Impl.InternalSet.Add
bool Add(ref T item, IEqualityComparer< T > comparer, bool replaceIfPresent)
Tries to add an item to the set, and retrieves the existing item if present.
Definition: InternalSet.cs:726
Loyc.Collections.BDictionary.BDictionary
BDictionary(Func< K, K, int > compareKeys, int maxLeafSize, int maxInnerSize)
Initializes an empty BDictionary.
Definition: BDictionary.cs:93
Loyc.Ecs.NewlineOpt
NewlineOpt
Flags to control situations in which newlines should be added automatically by the EC# printer.
Definition: EcsNodePrinter.cs:1213
Loyc.MiniTest.BenchmarkAttribute.RepeatForMs
int? RepeatForMs
Gets or sets the recommended minimum length of time to run the test. The test runner will run the tes...
Definition: MiniTest.cs:159
Loyc.Syntax.Les.LesLanguageService
Alternate name for Les2LanguageService (will change to Les3LanguageService in the future)
Definition: Les2LanguageService.cs:111
Loyc.Collections.WeakKeyDictionary.SetValue
override void SetValue(TKey key, TValue value)
Implementation of the setter for this[].
Definition: WeakKeyDictionary.cs:69
Loyc.Collections.IBinumerable.End
IBinumerator< T > End()
Returns a binumerator that points after the end of the current collection.
Loyc.LLParserGenerator.GeneralCodeGenHelper.GetCases
override IEnumerable< LNode > GetCases(IPGTerminalSet set_)
Gets the literals or symbols to use for switch cases of a set (just the values, not including the cas...
Definition: GeneralCodeGenHelper.cs:250
Loyc.Collections.Map.Except
Map< K, V > Except(MapOrMMap< K, V > other)
Returns a copy of the current map with all keys removed from this map that are present in the other m...
Definition: Map.cs:328
LeMP.Compiler.AddStdMacros
void AddStdMacros()
Adds standard macros from LeMP.StdMacros.dll, and adds the namespaces LeMP and LeMP....
Definition: Compiler.cs:376
Loyc.Collections.LCExt.AsList< T >
static IList< T > AsList< T >(this IListSource< T > c)
Converts any IListSource{T} object to a read-only IList{T}.
Definition: ListSourceAsList.cs:22
Loyc.Collections.LCExt.AsCollection< T >
static ICollection< T > AsCollection< T >(this IReadOnlyCollection< T > c)
Adapter: treats any IReadOnlyCollection{T} as a read-only ICollection{T}.
Definition: SourceAsCollection.cs:21
Loyc.Syntax.Lexing.BaseILexer.Reset
override void Reset(CharSrc source, string fileName="", int inputPosition=0, bool newSourceFile=true)
Reinitializes the object. This method is called by the constructor.
Definition: BaseILexer.cs:75
Loyc.Collections.FVList.Add
FVList< T > Add(T item)
Inserts an item at the front (index 0) of the FVList.
Definition: FVList.cs:394
Loyc.Collections.BMultiMap.AddIfUnique
bool AddIfUnique(K key, V value)
Adds a key-value pair if there is not already a pair that compares equal to the new one.
Definition: BMultiMap.cs:128
Loyc.Collections.Impl.KeyWalker
Internal implementation class. Represents a pointer to a location within a byte array.
Definition: CPTrieMisc.cs:130
Loyc.Syntax.LNode.Kind
abstract LNodeKind Kind
Returns the LNodeKind: Symbol, Literal, or Call.
Definition: LNode.cs:277
Loyc.MiniTest.Assert.DoesNotThrow
static void DoesNotThrow(Action code, string message, params object[] args)
Verifies that a delegate does not throw an exception
Definition: MiniTest.cs:602
System.Diagnostics.Contracts
Definition: Contract.Assert.cs:7
Loyc.Collections.IOptimize.Optimize
void Optimize()
Optimizes the data structure to consume less memory or storage space.
LeMP.MacroMode.AllowDuplicates
@ AllowDuplicates
If this macro is ambiguous with one or more macro of the same priority, this flag blocks the ambiguit...
Loyc.Math.INumTraits.NaN
T NaN
Not-a-number or null representation for this type.
Definition: Interfaces.cs:108
Loyc.Collections.RangeExt.Skip< R, T >
static int Skip< R, T >(ref R range, int count)
Advances by the specified number of elements.
Definition: Range.cs:18
Loyc.Syntax.CodeSymbols._UnaryPlus
static readonly Symbol _UnaryPlus
Alias for Add.
Definition: CodeSymbols.cs:35
Loyc.Syntax.Lexing.LexerSource
An implementation of the LLLPG Lexer API, used with the LLLPG options inputSource and inputClass.
Definition: LexerSource.cs:31
Loyc.Collections.ICount.Count
int Count
Gets the number of items in the collection.
Definition: ICount.cs:21
Loyc.Math.IMultiplicationGroup
This defines a Group with the operation *, the neutral element One, the inverse Inverse and an operat...
Definition: Interfaces.cs:273
Loyc.Syntax.PrintHelpers.EscapeCStyle
static string EscapeCStyle(UString s, EscapeC flags=EscapeC.Default)
Escapes characters in a string using C style, e.g. the string "Foo\" "</c> maps to <c>"Foo\"\ " by de...
Definition: PrintHelpers.cs:29
Loyc.Collections.Impl.InternalList.NextLargerSize
static int NextLargerSize(int than, int capacityLimit)
Same as NextLargerSize(int), but allows you to specify a capacity limit, to avoid wasting memory when...
Definition: InternalList.cs:655
Loyc.Collections.Impl.InternalSet.CloneFreeze
InternalSet< T > CloneFreeze()
Freezes the hashtrie so that any further changes require paths in the tree to be copied.
Definition: InternalSet.cs:599
Loyc.Collections.MSet.Add
bool Add(T item, bool replaceIfPresent)
Adds the specified item to the set.
Definition: MSet.cs:120
Loyc.LLParserGenerator.RuleRef
Represents a nonterminal, which is a reference to a rule.
Definition: Predicates.cs:212
Loyc.Collections.AListBase.ObserverMgr.Detach
void Detach(AListBase< K, T > list, AListNode< K, T > root)
Called when the observer is being detached from an AList. Detach(), unlike Attach(),...
Definition: AListNodeObserver.cs:61
Loyc.MiniTest.TestAttribute.Fails
object Fails
Setting this property is used to indicate that the test is known to fail. It is used to mark tests th...
Definition: MiniTest.cs:126
Loyc.Syntax.CodeSymbols.Missing
static readonly Symbol Missing
Indicates that a syntax element was omitted, e.g. Foo(, y) => Foo(@``, y)
Definition: CodeSymbols.cs:177
Loyc.Syntax.Les.Les3LanguageService.Parse
IListSource< LNode > Parse(IListSource< Token > input, ISourceFile file, IMessageSink msgs, ParsingMode inputType=null)
Parses a token tree, such as one that came from a token literal.
Definition: Les3LanguageService.cs:82
Loyc.Collections.WListProtected.ToVList
VList< T > ToVList()
Returns this list as a VList; if this is a FWList, the order of the elements is reversed at the same ...
Definition: WListBase.cs:337
Loyc.G.IsInRange
static bool IsInRange(this double num, double lo, double hi)
Returns true if num is between lo and hi.
Definition: GRange.out.cs:112
Loyc.Collections.IPopExt
Definition: IPush, IPop.cs:9
Loyc.Collections.IDictionaryEx.GetAndEdit
bool GetAndEdit(ref K key, ref V value, DictEditMode mode)
Combines a get and change operation into a single method call. You rarely need to call this method di...
Loyc.Collections.SelectReadOnlyList
Helper class: provides a modified view of an IListSource by transforming each element on-demand....
Definition: SelectListSource.out.cs:63
Loyc.Syntax.CodeSymbols.Operator
static readonly Symbol Operator
e.g. #fn(#bool, [#operator] <tt>==, #(Foo a, Foo b))
Definition: CodeSymbols.cs:174
Loyc.G.CountOnes
static int CountOnes(byte x)
Returns the number of bits that are set in the specified integer.
Definition: G.cs:262
Loyc.Geometry.IPoint3
A mutable 3D point with X, Y, and Z coordinates.
Definition: IPoint3.cs:46
Loyc.Collections.Impl.AListNode.IsFrozen
bool IsFrozen
Returns true if the node is explicitly marked read-only. Conceptually, the node can still be changed,...
Definition: AListNode.cs:211
Loyc.G.IsInRangeExcludeHi
static bool IsInRangeExcludeHi(this float num, float lo, float hi)
Returns true if num is between lo and hi, excluding hi but not lo.
Definition: GRange.out.cs:91
Loyc.Collections.IMFRange.First
new T First
Gets or sets the value of the first item in the range.
Definition: IRanges.cs:236
Loyc.Collections.LinqToLists.TakeNowWhile< T >
static Slice_< T > TakeNowWhile< T >(this IListSource< T > list, Func< T, bool > predicate)
Returns a slice of the initial elements of the list that meet the provided criteria....
Definition: LinqToLists.out.cs:129
Loyc.Syntax.Les.DefaultNodePrinterWriter
Base class for token-printing helper classes. See INodePrinterWriter.
Definition: Les2PrinterWriter.cs:11
Loyc.Geometry.IPointBase.Y
new T Y
Vertical coordinate of a point or vector.
Definition: IPoint.cs:37
Loyc.Symbol.Symbol
Symbol(Symbol prototype)
For use by a derived class to produce a statically-typed enumeration in a private pool....
Definition: Symbol.cs:116
Loyc.LLParserGenerator.IPGTerminalSet
This interface represents a set of terminals (and only a set of terminals, unlike TerminalPred which ...
Definition: IPGTerminalSet.cs:13
Loyc.Threading.ThreadLocalVariableBase
When used with ThreadEx, implementing this base class allows you to be notified when a child thread i...
Definition: ThreadEx.cs:420
Loyc.Syntax.CallNode.Select
sealed override LNode Select(Func< LNode, Maybe< LNode >> selector, ReplaceOpt options=ReplaceOpt.ProcessAttrs)
Transforms the Target, parameters, and optionally the attributes of an LNode, returning another LNode...
Definition: AbstractNodes.cs:152
Loyc.Syntax.ParsingService
Standard extension methods for IParsingService.
Definition: IParsingService.cs:103
Loyc.Syntax.Les.Les2Printer
Prints a Loyc tree in LES (Loyc Expression Syntax) format.
Definition: Les2Printer.cs:18
Loyc.Collections.ListSourceAsSparse
Adapter from IListSource<T> to ISparseListSource<T>.
Definition: ListSourceAsSparse.cs:28
Loyc.NullMessageSink.Count
int Count
Total number of messages that have been discarded.
Definition: BasicSinks.cs:108
Loyc.Collections.VListBlock.RGet
abstract T RGet(int index, int localCount)
Gets an item at distance 'index' from the back (beginning of a VList)
Loyc.Utilities.GoInterface.From
static Interface From(T obj, CastOptions opt)
Creates a wrapper if T matches Interface according to the specified CastOptions.
Definition: GoInterface.cs:447
Loyc.Collections.IContains
Definition: ICollectionSource.cs:9
Loyc.G.PutInRange
static long PutInRange(this long n, long min, long max)
Returns num clamped to the range min and max.
Definition: GRange.out.cs:65
Loyc.Collections.IFRange.First
T First
Returns the first value in the range, without popping it.
Definition: IRanges.cs:191
LeMP.Tests.A
Definition: MacroProcessorTests.cs:92
Loyc.Collections.EmptyArray
EmptyArray<T>.Value lets you avoid allocating an empty array on the heap.
Definition: EmptyArray.cs:9
Loyc.Threading.ThreadEx.Name
string Name
Gets or sets the name of the thread.
Definition: ThreadEx.cs:229
Loyc.MiniTest.BenchmarkAttribute.MinTrials
int? MinTrials
Gets or sets the recommended minimum number of times to run the benchmark in order to get an average....
Definition: MiniTest.cs:166
Loyc.Syntax.Lexing.ILexer.IndentString
UString IndentString
Gets a string slice that holds the spaces or tabs that were used to indent the current line.
Definition: ILexer.cs:29
Loyc.UString.Slice
UString Slice(int start, int count=int.MaxValue)
Returns a substring from the character source. If some of the requested characters are past the end o...
Definition: UString.cs:294
Loyc.Collections.FVList.BlockChainLength
int? BlockChainLength
Gets the number of blocks used by this list.
Definition: FVList.cs:267
Loyc.LLParserGenerator.CodeGenHelperBase.GenerateSwitch
virtual LNode GenerateSwitch(IPGTerminalSet[] branchSets, LNode[] branchCode, MSet< int > casesToInclude, LNode defaultBranch, LNode laVar)
Generates a switch statement with the specified branches where branchCode[i] is the code to run if th...
Definition: CodeGenHelperBase.cs:343
Loyc.Collections.ReverseComparer
Reverses the order used by an IComparer object.
Definition: ReverseComparer.cs:9
Loyc.Collections.Impl.IAListTreeObserver
An interface that is called to notify observers when items or nodes in the tree of a class derived fr...
Definition: IAListTreeObserver.cs:40
Loyc.MiniTest.TestFixtureAttribute
Identifies a class that contains unit tests, or methods that return other tests or test fixtures.
Definition: MiniTest.cs:25
Loyc.Ecs.EcsNodePrinter.Ambiguity
Ambiguity
Internal enum (marked public for an obscure technical reason). These are flags that represent special...
Definition: EcsNodePrinter.cs:363
Loyc.Collections.FVList.ToArray
T[] ToArray()
Returns the FVList converted to an array.
Definition: FVList.cs:255
Loyc.Collections.VList.Tail
VList< T > Tail
Returns a list without the last item. If the list is empty, an empty list is retured.
Definition: VList.cs:101
Loyc.Syntax.Lexing.BaseILexer.AfterNewline
void AfterNewline(bool ignoreIndent, bool skipIndent)
Definition: BaseILexer.cs:138
Loyc.Collections.Impl.DictionaryBase.SetValue
abstract void SetValue(TKey key, TValue value)
Implementation of the setter for this[].
Loyc.ByteArrayInString
Encodes and decodes BAIS (Byte Array In String) encoding, which preserves runs of ASCII characters un...
Definition: ByteArrayInString.cs:61
Loyc.Syntax.LNodePrinter.Print
static string Print(this ILNodePrinter printer, IEnumerable< LNode > nodes, IMessageSink sink=null, ParsingMode mode=null, ILNodePrinterOptions options=null)
Serializes a list of syntax trees to a string in the syntax supported by the specified ILNodePrinter.
Definition: ILNodePrinter.cs:54
Loyc.InvalidStateException
An exception thrown when an object detects that its own state is invalid, or in other words,...
Definition: Exceptions.cs:16
Loyc.Collections.Impl.AListInnerBase< int, T >::SplitAt
abstract AListInnerBase< K, T > SplitAt(int divAt, out AListNode< K, T > right)
Splits this node into two halves
Loyc.Collections.EnumerableExt.Upcast< Base, Derived >
static IEnumerable< Base > Upcast< Base, Derived >(this IEnumerable< Derived > list)
Upcasts a sequence.
Definition: EnumerableExt.cs:381
Loyc.Collections.MutableListExtensionMethods.LinqToLists.Skip< T >
static ListSlice< T > Skip< T >(this IList< T > list, int start)
Skips the specified number of elements immediately and returns a slice of part of the list that remai...
Definition: LinqToLists.out.cs:285
Loyc.MessageHolder
A message sink that puts the messages it receives in a list.
Definition: MessageHolder.cs:12
Loyc.LLParserGenerator.DefaultErrorBranch
A singleton to be used as the value of Alts.ErrorBranch, representing the default_error branch.
Definition: Predicates.cs:997
Loyc.Syntax.CodeSymbols.Yield
static readonly Symbol Yield
e.g. #return(x); <=> return x; [#yield] #return(x) <=> yield return x;
Definition: CodeSymbols.cs:184
Loyc.Threading.TinyReaderWriterLock.ExitWriteLock
void ExitWriteLock()
Releases a write lock that was acquired with EnterWrite().
Definition: ThreadEx.cs:411
Loyc.Syntax.Lexing.TokenKind.OtherKeyword
@ OtherKeyword
e.g. sizeof, struct. Does not include literal keywords (true, false, null)
Loyc.Syntax.Precedence.RightContext
Precedence RightContext(Precedence outerContext)
For use in printers. Auto-raises the precedence floor to prepare to print an expression on the right ...
Definition: Precedence.cs:261
LeMP.MacroMode.Normal
@ Normal
The macro's result is reprocessed directly (this is the default behavior).
Loyc.Collections.FVList.ToFWList
FWList< T > ToFWList()
Returns this list as a FWList.
Definition: FVList.cs:237
Loyc.Syntax.Les.Les2Lexer.UnescapeQuotedString
static string UnescapeQuotedString(ref UString sourceText, Action< int, string > onError, UString indentation=default(UString), bool les3TQIndents=false)
Parses a normal or triple-quoted string that still includes the quotes. Supports quote types '\'',...
Definition: Les2Lexer.cs:172
Loyc.Collections.Impl.IAListTreeObserver.ItemAdded
void ItemAdded(T item, AListLeafBase< K, T > parent)
Called when an item is added to a leaf node.
Loyc.Collections.ListChangeInfo.SizeChange
readonly int SizeChange
Gets the amount by which the collection size changes. When items are being added, this is positive,...
Definition: ListChangeInfo.cs:47
Loyc.Syntax.Lexing.WhitespaceFilter.NextToken
override Maybe< Token > NextToken()
Returns the next (postprocessed) token. This method should set the _current field to the returned val...
Definition: WhitespaceFilter.cs:14
Loyc.Collections.BDictionary.Clone
BDictionary< K, V > Clone(bool keepListChangingHandlers)
Clones a BDictionary.
Definition: BDictionary.cs:406
Loyc.LLParserGenerator.LLParserGenerator.Run
LNode Run(ISourceFile sourceFile)
Generates a braced block of code {...} for the grammar described by the rules that were previously ad...
Definition: LLParserGenerator.cs:722
Loyc.Collections.FWList.ToWList
WList< T > ToWList()
Returns this list as an WList, which effectively reverses the order of the elements.
Definition: FWList.cs:264
Loyc.Syntax.Les.Les2PrinterOptions.OmitMissingArguments
bool OmitMissingArguments
When an argument to a method or macro has the value @``, it will be omitted completely if this flag i...
Definition: Les2Printer.cs:697
Loyc.Collections.FVList.Enumerator
Enumerator for FVList; also used by FWList.
Definition: FVList.cs:450
Loyc.Syntax.Les.LesPrecedence
Contains Precedence objects that represent the precedence levels of LES.
Definition: LesPrecedence.cs:238
Loyc.MiniTest.TestAttribute.AllowParallel
bool? AllowParallel
Indicates whether this test can be run in parallel with other tests in different test fixtures.
Definition: MiniTest.cs:104
Loyc.LLParserGenerator.LLParserGenerator.AddCsLineDirectives
bool AddCsLineDirectives
Whether to add #line directives for C# before and after user actions.
Definition: LLParserGenerator.cs:121
Loyc.Collections.FWList.ToArray
T[] ToArray()
Returns the FWList converted to an array.
Definition: FWList.cs:271
Loyc.Collections.SelectDictionaryFromKeys.SelectDictionaryFromKeys
SelectDictionaryFromKeys(IReadOnlyCollection< K > keys, Func< K, Maybe< V >> tryGetValue, Func< K, V > getValue=null)
Initializes the adapter.
Definition: SelectDictionaryFromKeys.cs:71
Loyc.LLParserGenerator.LLParserGenerator.FullLLk
bool FullLLk
Whether to use full LL(k) or "partly approximate" lookahead.
Definition: LLParserGenerator.cs:100
Loyc.Syntax.CodeSymbols._Concat
static readonly Symbol _Concat
Alias for NotBits. Concat operator in D.
Definition: CodeSymbols.cs:62
Loyc.Syntax.Les.NodePrinterWriterBase.Reset
abstract void Reset()
Called when a new, separate printing operation begins.
Loyc.NullMessageSink.IsEnabled
bool IsEnabled(Severity level)
Always returns false.
Definition: BasicSinks.cs:129
Loyc.Utilities.Co
A structure that helps you to write coroutines, or to avoid the performance penalty of nested iterato...
Definition: Co.cs:74
Loyc.Collections.ISparseList.ClearSpace
void ClearSpace(int index, int count=1)
Unsets the range of indices index to index+count-1 inclusive. If index + count > Count,...
Loyc.Math.IConvertTo
Provides methods for converting common numeric types to another numeric type "T".
Definition: Interfaces.cs:27
Loyc.Collections.Map.Map
Map(IEnumerable< KeyValuePair< K, V >> list, IEqualityComparer< K > comparer)
Creates a map with the specified elements and key comparer.
Definition: Map.cs:209
Loyc.Syntax.Precedence.Precedence
Precedence(int left, int right)
Initializes an operator with different precedence on the left and right sides. For a right associativ...
Definition: Precedence.cs:229
Loyc.Collections.MMap.GetAndEdit
bool GetAndEdit(ref K key, ref V value, DictEditMode mode)
Combines a get and change operation into a single method call. You rarely need to call this method di...
Definition: MMap.cs:178
Loyc.Collections.INegListSource.Max
int Max
Returns the maximum valid index in the collection.
Definition: INegListSource.cs:27
Loyc.Collections.WeakValueDictionary
A dictionary in which the values are weak. When a value has been garbage- collected,...
Definition: WeakValueDictionary.cs:23
Loyc.Syntax.BaseParserNoBacktracking.LT
sealed override Token LT(int i)
Returns the Token at lookahead i, where 0 is the next token. This class does not support negative loo...
Definition: BaseParserNoBacktracking.cs:76
Loyc.Collections.Impl.CPEnumerator.IsValid
bool IsValid
Returns true if this enumerator points to an item and Current is valid.
Definition: CPTrieMisc.cs:94
Loyc.MiniTest.Assert.Contains
static void Contains(object expected, IEnumerable actual)
Asserts that an object is contained in a list.
Definition: MiniTest.cs:985
Loyc.Syntax.BaseParser.Error
virtual void Error(int lookaheadIndex, string format, params object[] args)
Definition: BaseParser.cs:165
Loyc.LLParserGenerator.IntSet.IsCharSet
bool IsCharSet
Controls the default stringization mode. When IsCharSet, the set "(36, 65..90, 126)" prints as "[$A-Z...
Definition: IntSet.cs:35
Loyc.Collections.ListChangeInfo.Action
readonly NotifyCollectionChangedAction Action
Gets a value that indicates the type of change being made to the collection.
Definition: ListChangeInfo.cs:38
Loyc.Syntax.CodeSymbols.This
static readonly Symbol This
"#this" e.g. this.X <=> #this.X; this(arg) <=> #this(arg).
Definition: CodeSymbols.cs:172
Loyc.Syntax.Les.Les2PrinterOptions.SpaceAroundInfixStopPrecedence
int SpaceAroundInfixStopPrecedence
The printer avoids printing spaces around infix (binary) operators that have the specified precedence...
Definition: Les2Printer.cs:735
Loyc.MiniTest.Assert.Catch
static Exception Catch(Action code, string message, params object[] args)
Verifies that a delegate throws an exception when called and returns it.
Definition: MiniTest.cs:582
Loyc.Collections.Impl.InternalSet.Enumerator.RemoveCurrent
bool RemoveCurrent(ref InternalSet< T > set)
Removes the current item from the set, and moves to the next item.
Definition: InternalSet.cs:1195
Loyc.Collections.Set.Enumerator
Enumerator for MSet<T>.
Definition: Set.cs:107
Loyc.Pair
Pair.Create(a, b) is a helper method for making pairs.
Definition: Pair.cs:11
Loyc.Collections.Impl.InternalSet
A hash-trie data structure for use inside other data structures.
Definition: InternalSet.cs:367
Loyc.Syntax.LineRemapper
A small helper class for languages such as C# and C++ that permit the locations reported by error mes...
Definition: LineRemapper.cs:81
Loyc.LLParserGenerator.PGNodeSet.UnionCore
IPGTerminalSet UnionCore(IPGTerminalSet other)
Merges two sets.
Definition: GeneralCodeGenHelper.cs:280
Loyc.Math.IOneProvider.One
T One
Returns the "one" or identity value of this type.
Definition: Interfaces.cs:88
LeMP.Tests.TestUseSymbolsMacro
Definition: TestUseSymbolsMacro.cs:10
Loyc.Syntax.BaseParser.Error
virtual void Error(int lookaheadIndex, string message)
Records an error or throws an exception.
Definition: BaseParser.cs:160
Loyc.Collections.Impl.IAListTreeObserver.NodeRemoved
void NodeRemoved(AListNode< K, T > child, AListInnerBase< K, T > parent)
Called when a child node is removed from an inner node.
Loyc.Ecs.EcsValidators.IsNormalMethod
static bool IsNormalMethod(LNode n, Pedantics p=Pedantics.Lax)
Alias for MethodDefinitionKind(LNode,bool,Pedantics) that returns true if MethodDefinitionKind return...
Definition: EcsValidators.cs:198
Loyc.LLParserGenerator.IPGCodeGenHelper.TerminalType
LNode TerminalType
Type of variables auto-declared when you use labels in your grammar (e.g. x:Foo (list+:Bar)*)
Definition: IPGCodeGenHelper.cs:262
Loyc.Syntax.ParseHelpers.TryParseUInt
static bool TryParseUInt(ref UString s, out BigInteger result, int radix=10, ParseNumberFlag flags=0)
Definition: ParseHelpers.cs:357
Loyc.StringExt.Left
static string Left(this string s, int count)
Returns the leftmost 'count' characters of 's', or s itself if count > s.Length.
Definition: StringExt.cs:35
Loyc.LLParserGenerator.CodeGenHelperBase.MakeInitializedVarDecl
virtual LNode MakeInitializedVarDecl(LNode type, bool wantList, Symbol varName)
Gets a variable declaration for the specified type, e.g. if type is Foo and wantList == true and varN...
Definition: CodeGenHelperBase.cs:505
Loyc.Collections.IArray
This interface models the capabilities of an array: getting and setting elements by index,...
Definition: Other interfaces.cs:21
Loyc.Ecs.EcsValidators.IsPropertyDefinition
static bool IsPropertyDefinition(LNode n, Pedantics p=Pedantics.Lax)
Returns true iff the given node has a valid syntax tree for a property definition.
Definition: EcsValidators.cs:255
Loyc.Collections.WList.WhereSelect
WList< T > WhereSelect(Func< T, Maybe< T >> filter)
Filters and maps a list with a user-defined function.
Definition: WList.cs:160
Loyc.MiniTest.Assert.Ignore
static void Ignore()
Short for Ignore("").
Definition: MiniTest.cs:319
Loyc.Ecs.EcsPrinterOptions.SpaceOptions
SpaceOpt SpaceOptions
Controls the locations where spaces should be emitted.
Definition: EcsNodePrinter.cs:1375
Loyc.UString.Left
UString Left(int length)
Returns the leftmost length code units of the string, or fewer if the string length is less than leng...
Definition: UString.cs:371
Loyc.Collections.VList.SmartSelect
VList< T > SmartSelect(Func< T, T > map)
Maps a list to another list of the same length.
Definition: VList.cs:567
Loyc.Collections.AListBase.ObserverMgr.RootChanged
void RootChanged(AListBase< K, T > list, AListNode< K, T > newRoot, bool clear)
Called when the root of the tree changes, or when the list is cleared. Also called after Attach(),...
Definition: AListNodeObserver.cs:66
Loyc.LLParserGenerator.Program.QuickRun
static string QuickRun(string input, params Assembly[] macroAssemblies)
Run macro processor for LLLPG on the specified input, with the specified command-line option map,...
Definition: Program.cs:54
Loyc.LLParserGenerator.IntStreamCodeGenHelper.GetCases
override IEnumerable< LNode > GetCases(IPGTerminalSet set)
Gets the literals or symbols to use for switch cases of a set (just the values, not including the cas...
Definition: IntStreamCodeGenHelper.cs:221
Loyc.Syntax.ILNodePrinterOptions.CompactMode
bool CompactMode
When this flag is set, the amount of whitespace in the output is reduced in a printer-defined way,...
Definition: ILNodePrinterOptions.cs:52
Loyc.Collections.AList.Append
virtual void Append(AList< T > other, bool move)
Appends another AList to this list in sublinear time.
Definition: AList.cs:337
Loyc.Threading.ThreadEx.ThreadStopping
static EventHandler< ThreadStartEventArgs > ThreadStopping
This event is called when a thread is stopping, if the thread is stopping gracefully and provided tha...
Definition: ThreadEx.cs:83
Loyc.Collections.AListBase.ClearInternal
virtual void ClearInternal(bool forceClear)
Clears the tree.
Definition: AListBase.cs:574
Loyc.StringExt.Right
static string Right(this string s, int count)
Returns the rightmost 'count' characters of 's', or s itself if count > s.Length.
Definition: StringExt.cs:26
Loyc.Collections.NegListSource.Slice
IRange< T > Slice(int start, int count=int.MaxValue)
Returns a sub-range of this list.
Definition: NegListSource.cs:93
Loyc.Collections.AListBase.CopyTo
void CopyTo(T[] array, int arrayIndex)
Copies the elements of the collection to an Array, starting at a particular array index.
Definition: AListBase.cs:641
Loyc.ExceptionExt.Description
static string Description(this Exception ex)
Definition: Extensions.cs:62
Loyc.Collections.INotifyListChanging
Encapsulates the ListChanging event that notifies listeners of dynamic changes to an indexed list,...
Definition: INotifyListChanging.cs:33
Loyc.Ecs.EcsPrecedence
Contains Precedence objects that represent the precedence rules of EC#.
Definition: EcsPrecedence.cs:51
Loyc.Collections.IMBRange
A mutable bidirectional range.
Definition: IRanges.cs:275
Loyc.Collections.Impl.AListNode.IsUndersized
abstract bool IsUndersized
Returns true if the node is undersized, meaning it would prefer to have more immediate children.
Definition: AListNode.cs:167
Loyc.Syntax.BaseParser
An base class designed for parsers that use LLLPG (Loyc LL(k) Parser Generator). Note: this is the ol...
Definition: BaseParser.cs:16
Loyc.Collections.EnumerableExt.AsReadOnlyDictionary< K, V >
static IReadOnlyDictionary< K, V > AsReadOnlyDictionary< K, V >(this IReadOnlyCollection< K > keys, Func< K, Maybe< V >> tryGetValue, Func< K, V > getValue=null)
Converts a collection of keys to an IReadOnlyDictionary, based on a function that can obtain a value ...
Definition: SelectDictionaryFromKeys.cs:49
Loyc.Syntax.AbstractTriviaInjector.GetEmptyResultSet
virtual LNode GetEmptyResultSet()
A method called to create a virtual node, in order to apply trivia to a source file that is completel...
Definition: AbstractTriviaInjector.cs:169
Loyc.IHasValue< T >
Loyc.LLParserGenerator.IPGCodeGenHelper.MakeInitializedVarDecl
LNode MakeInitializedVarDecl(LNode type, bool wantList, Symbol varName)
Gets a variable declaration for the specified type, e.g. if type is Foo and wantList == true and varN...
Loyc.MiniTest.RunTests.RunMany
static int RunMany(params object[] os)
Runs all tests in an array of test objects.
Definition: RunTests.cs:92
Loyc.Collections.NegList.NegList
NegList(IList< T > list, int zeroOffset)
Initializes a NegListSource wrapper.
Definition: NegList.cs:63
Loyc.Syntax.ParsingService.ParseSingle
static LNode ParseSingle(this IParsingService parser, ICharSource text, string fileName, IMessageSink msgs=null, ParsingMode inputType=null, bool preserveComments=true)
Parses a string and expects exactly one output.
Definition: IParsingService.cs:236
Loyc.ByteArrayInString.Convert
static string Convert(ArraySlice< byte > bytes, bool allowControlChars=true)
Encodes a byte array to a string with BAIS encoding, which preserves runs of ASCII characters unchang...
Definition: ByteArrayInString.cs:78
Loyc.Collections.VListBlockArray.Front
override T Front(int localCount)
Returns the "front" item in a FVList/FWList associated with this block (or back item of a VList) wher...
Definition: VListBlockArray.cs:130
Loyc.Syntax.CodeSymbols.Event
static readonly Symbol Event
e.g. #event(EventHandler, Click, { }) <=> event EventHandler Click { }
Definition: CodeSymbols.cs:166
Loyc.Threading.ThreadEx.ThreadDestructor
See PropagateVariables for more information.
Definition: ThreadEx.cs:178
Loyc.Math.INumTraits.IsOrdered
bool IsOrdered
Returns true for "normal" numbers, false for ones that aren't necessarily comparable (notably complex...
Definition: Interfaces.cs:131
Loyc.Collections.BDictionary.BDictionary
BDictionary(Func< K, K, int > compareKeys)
Definition: BDictionary.cs:61
Loyc.Collections.Impl.CPByteTrie.Add
void Add(byte[] key, TValue value)
Adds the specified key-value pair to the trie, throwing an exception if the key is already present.
Definition: CPByteTrie.cs:23
Loyc.Syntax.CodeSymbols.Goto
static readonly Symbol Goto
e.g. #goto(label) <=> goto label;
Definition: CodeSymbols.cs:139
LeMP.Tests.B.AliasTest
Definition: MacroProcessorTests.cs:107
Loyc.Utilities.CastOptions.As
@ As
If there is a mismatch, return null instead of throwing InvalidCastException
Loyc.Collections.VListBlock.MuAddEmpty
static void MuAddEmpty(WListProtected< T > w, int count, int newBlockSizeLimit)
Adds empty item(s) to the front of the list.
Definition: VListBlock.cs:905
Loyc.Syntax.Lexing.BaseLexer.LogExceptionErrorSink
static readonly IMessageSink LogExceptionErrorSink
Throws LogException when it receives an error. Non-errors are sent to MessageSink....
Definition: BaseLexer.cs:124
Loyc.Collections.WListBase.CopyTo
new void CopyTo(T[] array, int arrayIndex)
Copies the elements of the collection to an Array, starting at a particular array index.
Definition: WListBase.cs:372
Loyc.Collections.Impl.InternalList.Resize
void Resize(int newSize)
Definition: InternalList.cs:139
Loyc.Collections.MSet.Add
bool Add(T item)
Adds the specified item to the set if it is not present.
Definition: MSet.cs:151
Loyc.Syntax.IParsingService.Parse
IListSource< LNode > Parse(ICharSource text, string fileName, IMessageSink msgs=null, ParsingMode mode=null, bool preserveComments=true)
Parses a source file into one or more Loyc trees.
Loyc.Collections.LCInterfaces.NextLowerIndex< T >
static ? int NextLowerIndex< T >(this ISparseListSource< T > list, int? index)
Gets the next lower index that is not classified as an empty space, or null if there are no non-blank...
Definition: ISparseList.cs:99
Loyc.Collections.KeyAlreadyExistsException
An exception thrown by dictionary objects when they are asked to "add" a key-value pair that already ...
Definition: Exceptions.cs:111
Loyc.Collections.Impl.AListInnerBase.LLDelete
virtual bool LLDelete(int i, bool adjustIndexesAfterI)
Deletes the child _children[i], shifting all entries afterward to the left, and decrements _childCoun...
Definition: AListInnerBase.cs:513
Loyc.LLParserGenerator.CodeGenHelperBase.LAType
abstract LNode LAType()
Returns the data type of LA(k)
Loyc.Collections.WeakKeyReference
Provides a weak reference to an object of the given type to be used in a WeakDictionary along with th...
Definition: WeakKeyComparer.cs:96
Loyc.Collections.MaxHeap.Peek
T Peek()
Gets the largest item from the heap (or the smallest item, if this is a MinHeap).
Definition: Heap.cs:201
Loyc.Syntax.CodeSymbols.NullCoalesce
static readonly Symbol NullCoalesce
"??": a ?? b <=> <tt>??(a, b)
Definition: CodeSymbols.cs:106
Loyc.LLParserGenerator.IntStreamCodeGenHelper.LAType
override LNode LAType()
Returns the data type of LA(k)
Definition: IntStreamCodeGenHelper.cs:208
Loyc.Syntax.CodeSymbols.Class
static readonly Symbol Class
e.g. #class(Foo, #(IFoo), { }); <=> class Foo : IFoo { }
Definition: CodeSymbols.cs:155
Loyc.Collections.FVList.Pop
T Pop()
Removes the front item (at index 0) from the list and returns it.
Definition: FVList.cs:206
LeMP.Compiler.ProcessArguments
bool ProcessArguments(BMultiMap< string, string > options, bool warnAboutUnknownOptions, IList< string > inputFiles=null)
Processes all standard command-line arguments from KnownOptions, except –help.
Definition: Compiler.cs:220
Loyc.Collections.BDictionary.Clone
BDictionary< K, V > Clone()
LeMP.Tests.MacroTesterBase
Definition: MacroTesterBase.cs:14
Loyc.G.PutInRange
static ulong PutInRange(this ulong n, ulong min, ulong max)
Returns num clamped to the range min and max.
Definition: GRange.out.cs:82
Loyc.Syntax.ILNodePrinterOptions.AllowChangeParentheses
bool AllowChangeParentheses
Indicates that it is preferable to add (or remove) parenthesis to produce good-looking output,...
Definition: ILNodePrinterOptions.cs:19
Loyc.Syntax.Lexing.LexerSourceFile< CharSrc >
Loyc.Collections.IBinumerator
Extends the "enumerator" concept to allow backward enumeration.
Definition: New enumerators.cs:19
Loyc.Syntax.LNode
All nodes in a Loyc syntax tree share this base class.
Definition: LNode.cs:57
Loyc.Syntax.CodeSymbols.Namespace
static readonly Symbol Namespace
e.g. #namespace(NS, @``, { }); <=> namespace NS { }
Definition: CodeSymbols.cs:162
Loyc.Collections.Impl.AListLeaf
Internal implementation class. Shared code of non-sparse AList leaf nodes.
Definition: AListLeaf.cs:20
Loyc.Collections.NegList.Max
int Max
Returns the maximum valid index, which is Min + OriginalList.Count - 1.
Definition: NegList.cs:76
Loyc.Collections.EnumerableExt.AsReadOnly< T >
static IReadOnlyCollection< T > AsReadOnly< T >(this ICollection< T > c)
Treats any ICollection{T} object to IReadOnlyCollection{T}.
Definition: CollectionAsSource.cs:15
Loyc.LLParserGenerator.IntSet
Represents a set of characters (e.g. 'A'..'Z' | 'a'..'z' | '_'), or a set of token IDs.
Definition: IntSet.cs:19
Loyc.Collections.Impl.BListLeaf
Internal implementation class. Leaf node of BList<T> and BDictionary<K,V>.
Definition: BListLeaf.cs:11
Loyc.Collections.Bijection
A bijection is a one-to-one function and its inverse. It is implemented with a pair of dictionaries,...
Definition: Bijection.cs:36
Loyc.Ecs.EcsPrinterOptions.OmitSpaceTrivia
bool OmitSpaceTrivia
When this flag is set, space trivia attributes are ignored (e.g. CodeSymbols.TriviaSpaceAfter).
Definition: EcsNodePrinter.cs:1344
Loyc.Syntax.Lexing.TriviaSaver
A lexer wrapper that saves whitespace tokens into a list (TriviaList).
Definition: TriviaSaver.cs:11
Loyc.Syntax.EscapeC.NonAscii
@ NonAscii
Escape ALL characters with codes above 127 as \xNN or \uNNNN
Loyc.Syntax.CodeSymbols.SubAssign
static readonly Symbol SubAssign
"-=" subtract-and-set operator
Definition: CodeSymbols.cs:117
Loyc.LLParserGenerator.Gate.Clone
override Pred Clone()
Deep-clones a predicate tree. Terminal sets and Nodes referenced by the tree are not cloned; the clon...
Definition: Predicates.cs:831
Loyc.Syntax.CodeSymbols.Neq
static readonly Symbol Neq
"!=" Inequality test operator
Definition: CodeSymbols.cs:48
Loyc.LLParserGenerator.CodeGenHelperBase.LA
virtual LNode LA(int k)
Generates code to read LA(k).
Definition: CodeGenHelperBase.cs:269
Loyc.Syntax.AbstractTriviaInjector.Run
IEnumerator< LNode > Run(IEnumerator< LNode > nodes)
Attaches trivia to the input nodes provided.
Definition: AbstractTriviaInjector.cs:196
Loyc.Collections.VListBlock.PriorIsOwned
bool PriorIsOwned
Returns true if this block has exclusive ownership of mutable items in the prior block....
Definition: VListBlock.cs:288
Loyc.LLParserGenerator.CodeGenHelperBase.ApiCall
virtual LNode ApiCall(Symbol apiName, IEnumerable< LNode > args, bool isStatic=false)
Returns an LNode representing a call to the specified LLLPG API. For example, if the user used a "inp...
Definition: CodeGenHelperBase.cs:477
Loyc.Collections.Impl.AListNode.Verify
static void Verify(bool condition)
Same as Assert(), except that the condition expression can have side-effects because it is evaluated ...
Definition: AListNode.cs:250
Loyc.Syntax.Lexing.TokenListAsLexer.NextToken
Maybe< Token > NextToken()
Scans the next token and returns information about it.
Definition: TokenListAsLexer.cs:28
Loyc.Collections.ListExt.SortLowestK< T >
static ListSlice< T > SortLowestK< T >(this IList< T > list, int k)
Uses a partial quicksort, known as "quickselect", to find and sort the lowest k elements in a list.
Definition: ListExt.cs:368
Loyc.UString
UString is a slice of a string. It is a wrapper around string that provides a IBRange<T> of 21-bit UC...
Definition: UString.cs:55
Loyc.LLParserGenerator.CodeGenHelperBase.Optimize
virtual IPGTerminalSet Optimize(IPGTerminalSet set, IPGTerminalSet dontcare)
Simplifies the specified set, if possible, so that GenerateTest() can generate simpler code for an if...
Definition: CodeGenHelperBase.cs:127
Loyc.Syntax.Lexing.BaseLexer
The recommended base class for lexers generated by LLLPG, when not using the inputSource option.
Definition: BaseLexer.cs:60
Loyc.SymbolSet
A set of symbols.
Definition: SymbolSet.cs:23
Loyc.Utilities.SimpleTimer
A fast, simple timer class with a more convenient interface than System.Diagnostics....
Definition: SimpleTimer.cs:24
Loyc.Syntax.Les.TokenExt.ToString
static string ToString(Token t)
Expresses a token as a string, using LES printers for identifiers and literals.
Definition: TokenType.cs:62
Loyc.Syntax.BaseParserForList.BaseParserForList
BaseParserForList(IEnumerator< Token > list, Token eofToken, ISourceFile file, int startIndex=0)
<inheridoc>
Definition: BaseParserForList.cs:208
Loyc.Syntax.CodeSymbols.New
static readonly Symbol New
"'new": new Foo(x) { a } <=> <tt>'new(Foo(x), a); new[] { ... } <=> <tt>'new(<tt>[](),...
Definition: CodeSymbols.cs:96
Loyc.Collections.Map.Union
Map< K, V > Union(MapOrMMap< K, V > other, bool replaceWithValuesFromOther)
Returns a copy of the current map with the specified items added.
Definition: Map.cs:308
Loyc.G.True< T >
static bool True< T >(T value)
Returns true. This method has no effect; it is used to do an action in a conditional expression.
Definition: G.cs:124
Loyc.Syntax.CodeSymbols.Is
static readonly Symbol Is
"'is": @'is(x,string) <=> x is string, @'is(x,#var(Foo,v),#(y,z)) <=> x is Foo v(y,...
Definition: CodeSymbols.cs:104
Loyc.Collections.Impl.InternalSet.IsProperSubsetOf
bool IsProperSubsetOf(ISet< T > other, int myExactCount)
Returns true if all items in this set are present in the other set, and the other set has at least on...
Definition: InternalSet.cs:1548
Loyc.Syntax.ISourceRange
Represents a (contiguous) region of text in a source file.
Definition: ISourceRange.cs:6
Loyc.Syntax.Lexing.WhitespaceTag
WhitespaceTag.Value can be used as the Token.Value of whitespace tokens, to make whitespace easy to f...
Definition: Token.cs:155
Loyc.Collections.IArraySink
Represents a write-only array.
Definition: Sink interfaces.cs:23
Loyc.Collections.NegListSource.Count
int Count
Returns the total number of items in the list (same as OriginalList.Count).
Definition: NegListSource.cs:72
Loyc.Collections.ISetImm
An immutable set of type SetT with elements of type T.
Definition: ISetImm.cs:42
Loyc.Syntax.ParsingService.Register
static int Register(IParsingService service, IEnumerable< string > fileExtensions=null)
Registers a parsing service.
Definition: IParsingService.cs:150
Loyc.Collections.VListBlock
VListBlock implements the core functionality of FVList, VList, FWList and WList. It is not intended t...
Definition: VListBlock.cs:176
Loyc.Collections.ReversedListSource
Adapter: reversed view of IListSource<T> returned from LinqToLists.Reverse<T>.
Definition: ReversedListSource.cs:18
Loyc.Collections.VList.operator==
static bool operator==(VList< T > lhs, VList< T > rhs)
Returns whether the two list references are the same. Does not compare the contents of the lists.
Definition: VList.cs:126
Loyc.Collections.IMEnumerator.Current
new T Current
Gets or sets the value of the current item.
Definition: New enumerators.cs:51
Loyc.Collections.VListBlock.Front
abstract T Front(int localCount)
Returns the "front" item in a FVList/FWList associated with this block (or back item of a VList) wher...
Loyc.LLParserGenerator.CodeGenHelperBase.GenerateMatchExpr
abstract LNode GenerateMatchExpr(IPGTerminalSet set, bool savingResult, bool recognizerMode)
Generate code to match a set, e.g. MatchRange('a', 'z'); or MatchExcept(' ', '\r'); }....
Loyc.Collections.Impl.CPByteTrie.key
TValue this[byte[] key
Finds the specified key and returns its associated value. If the key did not exist,...
Definition: CPByteTrie.cs:142
Loyc.Syntax.Lexing.ISimpleToken.Type
TokenType Type
The category of the token (integer, keyword, etc.) used as the primary value for identifying the toke...
Definition: Token.cs:542
LeMP.MacroMode.PriorityNormal
@ PriorityNormal
Normal priority (this is the default and does not need to be specified.)
Loyc.Threading.ScratchBuffer< object[]>
Loyc.LLParserGenerator.ZeroWidthPred
Definition: Predicates.cs:844
Loyc.Collections.LCInterfaces.AddIfNotPresent< K, V >
static bool AddIfNotPresent< K, V >(this IDictionaryEx< K, V > dict, K key, V value)
Adds an item to the map if the key is not present. If the key is already present, this method has no ...
Definition: IDictionaryEx.cs:126
Loyc.Collections.FVList.operator!=
static bool operator!=(FVList< T > lhs, FVList< T > rhs)
Returns whether the two list references are different. Does not compare the contents of the lists.
Definition: FVList.cs:129
Loyc.Syntax.Les.Les2PrinterOptions.QuoteUnprintableLiterals
bool QuoteUnprintableLiterals
When the printer encounters an unprintable literal, it calls Value.ToString(). When this flag is set,...
Definition: Les2Printer.cs:721
Loyc.UString.Right
UString Right(int length)
Returns the rightmost length code units of the string, or fewer if the string length is less than len...
Definition: UString.cs:379
Loyc.Syntax.EscapeC.HasEscapes
@ HasEscapes
While unescaping, a backslash was encountered.
Loyc.Collections.ListSlice.ListSlice
ListSlice(IList< T > list, int start, int count=int.MaxValue)
Initializes a slice.
Definition: ListSlice.cs:56
Loyc.Collections.BDictionary.BDictionary
BDictionary(BDictionary< K, V > items, bool keepListChangingHandlers)
Definition: BDictionary.cs:98
Loyc.G.Log2Floor
static int Log2Floor(uint x)
Definition: G.cs:301
Loyc.Collections.VListBlock.FindNextBlock
static FVList< T > FindNextBlock(ref FVList< T > subList, FVList< T > list, out int localCountOfSubList)
Finds the block that comes before 'subList' in the direction of the larger list, 'list'.
Definition: VListBlock.cs:598
Loyc.Collections.InvertibleSet.IsProperSubsetOf
bool IsProperSubsetOf(InvertibleSet< T > other)
Definition: InvertibleSet.cs:142
Loyc.MiniTest.Assert.ThrowsAny
static Exception ThrowsAny(Type expectedExceptionType, Action code, string message, params object[] args)
Verifies that a delegate throws a particular exception when called.
Definition: MiniTest.cs:539
Loyc.SymbolPool.GetGlobalOrCreateHere
Symbol GetGlobalOrCreateHere(string name)
Gets a symbol from the global pool, if it exists there already; otherwise, creates a Symbol in this p...
Definition: Symbol.cs:345
Loyc.Syntax.EscapeC.DoubleQuotes
@ DoubleQuotes
Escape double quotes as "
Loyc.Collections.WeakKeyComparer
Compares objects of the given type or WeakKeyReferences to them for equality based on the given compa...
Definition: WeakKeyComparer.cs:17
Loyc.Math.INumTraits.PositiveInfinity
T PositiveInfinity
Returns positive infinity, or MaxValue for types that cannot represent infinity.
Definition: Interfaces.cs:102
Loyc.Threading.ThreadLocalVariable.ThreadLocalVariable
ThreadLocalVariable(T initialValue, T fallbackValue, Func< T, T > propagator)
Constructs a ThreadLocalVariable.
Definition: ThreadEx.cs:497
Loyc.Collections.WList.ToArray
T[] ToArray()
Returns the WList converted to an array.
Definition: WList.cs:273
Loyc.Syntax.CodeSymbols.DivAssign
static readonly Symbol DivAssign
"/=" divide-and-set operator
Definition: CodeSymbols.cs:115
Loyc.Collections.CPStringTrie.TryAdd
bool TryAdd(string key, ref TValue value)
Adds the specified key-value pair only if the specified key is not already present in the trie.
Definition: CPStringTrie.cs:47
Loyc.Collections.EnumerableExt
Additional extension methods for IEnumerable<T>, IReadOnlyCollection<T>, and ICollection<T>,...
Definition: BufferedSequence.cs:22
Loyc.Syntax.EscapeC.Unrecognized
@ Unrecognized
While unescaping, an unrecognized escape was encountered .
Loyc.Collections.AListBase.ObserverMgr.RemoveAll
void RemoveAll(AListNode< K, T > node)
Called when all children are being removed from a node (leaf or inner) because the node is being spli...
Definition: AListNodeObserver.cs:108
Loyc.Syntax.Les.Les3Printer.Chars
Chars
Based on these flags, StartToken() and WriteToken() ensure that two adjacent tokens aren't treated li...
Definition: Les3Printer.cs:169
Loyc.Collections.VListBlockArray.RGet
override T RGet(int index, int localCount)
Gets an item at distance 'index' from the back (beginning of a VList)
Definition: VListBlockArray.cs:114
Loyc.Collections.FVList.SmartAdd
FVList< T > SmartAdd(T item, FVList< T > original)
Adds the specified item to the list, or original.WithoutFirst(original.Count - Count - 1) if doing so...
Definition: FVList.cs:299
Loyc.G.IsInRange
static bool IsInRange(this uint num, uint lo, uint hi)
Returns true if num is between lo and hi.
Definition: GRange.out.cs:44
Loyc.Ecs.EcsPrinterOptions.PreferPlainCSharp
bool PreferPlainCSharp
Prefers plain C# syntax for certain other things (not covered by the other options),...
Definition: EcsNodePrinter.cs:1372
Loyc.Collections.IAutoCreatePool
Represents a pool of objects in which an object is automatically created when requested by its key.
Definition: IAutoCreatePool.cs:18
Loyc.Collections.Impl.CPIntTrie.TryAdd
bool TryAdd(int key, TValue value)
Adds the specified key-value pair only if the specified key is not already present in the trie.
Definition: CPIntTrie.cs:294
Loyc.MessageSink.WithContext< TContext >
static MessageSinkWithContext< TContext > WithContext< TContext >(IMessageSink< TContext > target, TContext context, string messagePrefix=null)
Creates a message sink with a default context to be used when Write is called with context: null,...
Definition: MessageSink.out.cs:334
Loyc.Collections.WListProtected.ToFVList
FVList< T > ToFVList()
Returns this list as a FVList; if this is a WList, the order of the elements is reversed at the same ...
Definition: WListBase.cs:324
Loyc.UString.Slice
IRange< char > IListSource< char >. Slice(int start, int count)
Returns a substring from the character source. If some of the requested characters are past the end o...
Definition: UString.cs:293
Loyc.TypeExt.NameWithGenericArgs
static string NameWithGenericArgs(this Type type)
Returns the type with generic parameters in C# style, e.g. typeof(List<List<string>>....
Definition: Extensions.cs:20
Loyc.Collections.MSet.SetEquals
bool SetEquals(ISet< T > other)
Definition: MSet.cs:292
Loyc.Collections.MaxHeap.PriorityChanged
void PriorityChanged(int index)
Notifies the heap that the priority of the item at the specified index has changed....
Definition: Heap.cs:117
Loyc.Collections.FVList
A reference to a FVList, a so-called persistent list data structure.
Definition: FVList.cs:41
Loyc.StringBuilderExt.Last
static char Last(this StringBuilder str)
Returns the last character of the string
Definition: StringBuilderExt.cs:19
Loyc.StringExt.SplitAt
static Pair< UString, UString > SplitAt(this string s, char delimiter)
Gets the substrings to the left and right of a dividing character.
Definition: StringExt.cs:20
Loyc.Collections.BMultiMap.Values
IEnumerable< ValueList > Values
Gets a list of collections of ValueList in this object.
Definition: BMultiMap.cs:468
Loyc.LLParserGenerator.IPGCodeGenHelper.CodeToTerminalPred
Pred CodeToTerminalPred(LNode expr, ref string errorMsg)
Creates a terminal predicate from a code expression.
Loyc.WriteMessageFn
delegate void WriteMessageFn(Severity type, object context, string format, params object[] args)
This is the method signature of IMessageSink.Write(). You can convert from one of these delegates to ...
Loyc.Syntax.Lexing.ILexer.NextToken
Maybe< Token > NextToken()
Scans the next token and returns information about it.
Loyc.StringBuilderExt.Trim
static StringBuilder Trim(this StringBuilder sb, params char[] trimChars)
Removes all leading and trailing occurrences of the specified set of characters from the StringBuilde...
Definition: StringBuilderExt.cs:66
Loyc.Collections.WeakValueDictionary.AutoCleanup
bool AutoCleanup()
Periodically removes entries with garbage-collected values from the dictionary
Definition: WeakValueDictionary.cs:38
LeMP.MacroInfo
Data returned from IMacroContext.AllKnownMacros
Definition: MacroAttributes.cs:124
Loyc.Collections.ListExt.SortLowestKStable< T >
static ListSlice< T > SortLowestKStable< T >(this IList< T > list, int k)
A stable version of SortLowestK<T>(IList<T>,int). This means that when k>1 and adjacent results at th...
Definition: ListExt.cs:392
Loyc.Syntax.ParseHelpers.TryParseFloatParts
static bool TryParseFloatParts(ref UString source, int radix, out bool negative, out ulong mantissa, out int exponentBaseR, out int exponentBase2, out int exponentBase10, out int numDigits, ParseNumberFlag flags=0)
Low-level method that identifies the parts of a float literal of arbitrary base (typically base 2,...
Definition: ParseHelpers.cs:433
Loyc.Syntax.CodeSymbols.TwoDimensionalArray
static readonly Symbol TwoDimensionalArray
int[,] <=> @'of(<tt>#[,], int)
Definition: CodeSymbols.cs:71
Loyc.Collections.Impl.InternalDList.Enumerator
Definition: InternalDList.cs:772
Loyc.Syntax.LNode.Attrs
virtual VList< LNode > Attrs
Returns the attribute list for this node.
Definition: LNode.cs:268
Loyc.MessageSink.PushedCurrent
Returned by PushCurrent(IMessageSink).
Definition: MessageSink.out.cs:59
Loyc.Collections.AListBase.IndexesOf
IEnumerable< int > IndexesOf(T item)
Returns a sequence of integers that represent the locations where a given item appears in the list.
Definition: AListBase.cs:606
Loyc.Math.IHasRoot
Provides the Sqrt operation and its inverse, Square.
Definition: Interfaces.cs:230
Loyc.Syntax.ParsingMode
Standard parsing modes used with IParsingService and ILNodePrinterOptions.
Definition: ParsingMode.cs:10
Loyc.Collections.SimpleCache< object >
Loyc.Collections.NegList.Count
int Count
Returns the total number of items in the list (same as OriginalList.Count).
Definition: NegList.cs:72
Loyc.Collections.Set.SetEquals
bool SetEquals(IEnumerable< T > other)
Definition: Set.cs:173
Loyc.Collections.LCInterfaces.FinalIndexWhere< T >
static ? int FinalIndexWhere< T >(this IReadOnlyList< T > source, Func< T, bool > pred)
Gets the highest index at which a condition is true, or null if nowhere.
Definition: IListSource.cs:202
Loyc.Collections.BMultiMap.ValueList.Add
void Add(V item)
Adds a new item associated with the key that this object represents. Allows duplicate values.
Definition: BMultiMap.cs:299
Loyc.MiniTest.TearDownAttribute
Marks a method that is to be called after each test in a test fixture.
Definition: MiniTest.cs:144
Loyc.Syntax.CodeSymbols.ExpAssign
static readonly Symbol ExpAssign
"**=" raise-to-exponent-and-set operator
Definition: CodeSymbols.cs:122
Loyc.LLParserGenerator.IntSet.EquivalentInverted
IntSet EquivalentInverted()
Computes the equivalent inverted set, e.g. if the set is 'b'..'y', the equivalent inverted set is ~(i...
Definition: IntSet.cs:367
Loyc.MessageSinkWithContext.MessageSinkWithContext
MessageSinkWithContext(IMessageSink< TContext > target, TContext defaultContext, string messagePrefix=null, bool scrubPrefix=true)
Initializes the wrapper.
Definition: WrapperSinks.cs:202
Loyc.MessageMulticaster.Write
void Write(Severity level, TContext context, string format)
Writes a message to the target that this object represents.
Definition: WrapperSinks.cs:136
Loyc.Collections.BDictionary.AddRange
int AddRange(IEnumerable< KeyValuePair< K, V >> e, DictEditMode mode)
Merges the contents of the specified sequence into this map.
Definition: BDictionary.cs:286
Loyc.Collections.IListAndListSource
This interface is to be used by read-only sequences that nevertheless wish to be compatible with APIs...
Definition: Disambiguation interfaces.cs:55
Loyc.Syntax.Lexing.IndentTokenGenerator.MakeDedentToken
abstract IEnumerator< Token > MakeDedentToken(Token tokenBeforeNewline, ref Maybe< Token > tokenAfterNewline)
Returns token(s) to represent un-indentation.
LeMP.MacroMode.MatchIdentifier
@ MatchIdentifier
If this flag is present, the macro can match a plain identifier. By default, only calls can be treate...
Loyc.Collections.DictionaryExt.GetAndRemove< K, V >
static Maybe< V > GetAndRemove< K, V >(this IDictionary< K, V > dict, K key)
Default implementation of IDictionaryEx<K, V>.GetAndRemove. Gets the value associated with the specif...
Definition: DictionaryExt.cs:132
Loyc.Syntax.Lexing.BaseLexer.Error
virtual void Error(int lookaheadIndex, string message)
This method is called to handle errors that occur during lexing.
Definition: BaseLexer.cs:595
Loyc.Either.NewLeft
static Either< L, R > NewLeft(L value)
Simply calls the constructor. This method exists to make it possible to construct an Either when both...
Loyc.MiniTest.Assert.Expect
static void Expect(bool condition)
Calls Fail() if condition is false.
Definition: MiniTest.cs:527
Loyc.Ecs.EcsLanguageService.Parse
IListSource< LNode > Parse(ICharSource text, string fileName, IMessageSink msgs, ParsingMode inputType=null, bool preserveComments=true)
Parses a source file into one or more Loyc trees.
Definition: EcsLanguageService.cs:71
Loyc.Collections.ISparseListSource
Represents a read-only indexed list in which parts of the index space may be unused or "clear".
Definition: ISparseList.cs:43
Loyc.Syntax.CallNode.WithName
override LNode WithName(Symbol name)
Creates a node with a new value for Name.
Definition: AbstractNodes.cs:97
Loyc.Syntax.Lexing.ILexer.IndentLevel
int IndentLevel
Indentation level of the current line. This is updated after scanning the first whitespaces on a new ...
Definition: ILexer.cs:26
Loyc.Threading.TinyReaderWriterLock.EnterReadLock
void EnterReadLock()
Acquires the lock to protect read access to a shared resource.
Definition: ThreadEx.cs:351
Loyc.LLParserGenerator.GeneralCodeGenHelper.SetType
LNode SetType
Specifies the data type for large terminal sets (default: HashSet<T>).
Definition: GeneralCodeGenHelper.cs:43
Loyc.Symbol.Pool
SymbolPool Pool
Gets the SymbolPool in which this Symbol was created.
Definition: Symbol.cs:72
Loyc.LLParserGenerator.IPGCodeGenHelper.CreateRuleMethod
LNode CreateRuleMethod(Rule rule, VList< LNode > methodBody)
Generates the method for a rule, given the method's contents.
Loyc.Syntax.Lexing.IndentTokenGenerator.IndentChangedUnexpectedly
virtual bool IndentChangedUnexpectedly(Token tokenBeforeNewline, ref Maybe< Token > tokenAfterNewline, ref int deltaIndent)
A method that is called when the indent level changed without a corresponding indent trigger.
Definition: IndentTokenGenerator.cs:129
Loyc.Geometry
Contains math code and data types for processing geometry (points, lines, polygons,...
Definition: IPoint.cs:7
Loyc.Syntax.BaseParser.LogExceptionErrorSink
static readonly IMessageSink LogExceptionErrorSink
Throws LogException when it receives an error. Non-errors are sent to MessageSink....
Definition: BaseParser.cs:40
Loyc.Collections.Impl.CPByteTrie
A compact patricia trie that uses byte arrays as keys.
Definition: CPByteTrie.cs:12
Loyc.LLParserGenerator.IPGCodeGenHelper.Optimize
IPGTerminalSet Optimize(IPGTerminalSet set, IPGTerminalSet dontcare)
Simplifies the specified set, if possible, so that GenerateTest() can generate simpler code for an if...
Loyc.Collections.MMap.AddRange
int AddRange(MMap< K, V > data, bool replaceIfPresent=true)
Merges the contents of the specified map into this map.
Definition: MMap.cs:143
Loyc.Syntax.CodeSymbols.Div
static readonly Symbol Div
"/" Division
Definition: CodeSymbols.cs:30
Loyc.Syntax.CodeSymbols.GotoCase
static readonly Symbol GotoCase
e.g. #gotoCase(expr) <=> goto case expr;
Definition: CodeSymbols.cs:140
Loyc.Collections.AList.Swap
void Swap(AList< T > other)
Swaps the contents of two AList<T>s in O(1) time.
Definition: AList.cs:300
Loyc.LLParserGenerator.GeneralCodeGenHelper.CodeToTerminalPred
override Pred CodeToTerminalPred(LNode expr, ref string errorMsg)
Creates a terminal predicate from a code expression.
Definition: GeneralCodeGenHelper.cs:93
Loyc.Syntax.Precedence.CanMixWith
bool CanMixWith(Precedence context)
Returns true if an operator with this precedence is miscible without parenthesis with the specified o...
Definition: Precedence.cs:293
Loyc.LLParserGenerator.IPGCodeGenHelper.GetListType
LNode GetListType(LNode type)
Gets the list type for elements of the specified type (e.g. List<type>)
Loyc.Syntax.Les.Les3Lexer.GetOperatorTokenType
static TokenType GetOperatorTokenType(UString op)
Under the assumption that op is a sequence of punctuation marks that forms a legal operator,...
Definition: Les3.cs:344
Loyc.Math.IBinaryMath.Shr
T Shr(T a, int amount)
Shifts 'a' right by the specified number of bits.
Loyc.Math.IOneProvider
Provides the value of "one" for type T.
Definition: Interfaces.cs:85
Loyc.LLParserGenerator.RecursiveReplacementPredVisitor
Base class for visitors that can replace predicates entirely.
Definition: PredVisitor.cs:46
Loyc.Collections.WList
WList is the mutable variant of the VList data structure.
Definition: WList.cs:32
Loyc.Ecs.EcsValidators
A class filled with methods for checking whether a node has the correct LNode.Name and structure....
Definition: EcsValidators.cs:21
Loyc.Syntax.BaseParser.SavePosition
A helper class used by LLLPG for backtracking.
Definition: BaseParser.cs:284
Loyc.Collections.WListProtected.GetAt
T GetAt(int index)
Gets an item from a FWList or WList at the specified index.
Definition: WListBase.cs:123
Loyc.Collections.Impl.InternalSet.SetEquals
bool SetEquals(IEnumerable< T > other, IEqualityComparer< T > comparer, int myExactCount)
Returns true if this set and the other set have the same items.
Definition: InternalSet.cs:1629
Loyc.Collections.InvertibleSet
An immutable set that can be inverted. For example, an InvertibleSet<int> could contain "everything e...
Definition: InvertibleSet.cs:30
Loyc.Collections.Impl.CPIntTrie.Remove
bool Remove(int key)
Removes the specified key and associated value, returning true if the entry was found and removed.
Definition: CPIntTrie.cs:430
Loyc.Collections.VList.Pop
T Pop()
Removes the last item (at index Count-1) from the list and returns it.
Definition: VList.cs:213
Loyc.Collections.ListSourceAsSparse.IsSet
bool IsSet(int index)
Determines whether a value exists at the specified index.
Definition: ListSourceAsSparse.cs:48
Loyc.Syntax.BaseParser.InputPosition
int InputPosition
Current position of the next token to be parsed.
Definition: BaseParser.cs:80
Loyc.Collections.AListBase.GetImmutableCount
int GetImmutableCount()
Diagnostic method. Returns the number of elements of the list that are located in immutable nodes,...
Definition: AListBase.cs:1108
Loyc.Syntax.Les.Les3Printer
Definition: Les3Printer.cs:20
Loyc.Collections.VListBlockArray.MuClear
override void MuClear(int localCountWithMutables)
Clears all mutable items in this chain, and clears the mutable flag. If this block owns mutable items...
Definition: VListBlockArray.cs:230
Loyc.LLParserGenerator.CodeGenHelperBase.BaseCostForSwitch
virtual int BaseCostForSwitch
Used to help decide whether a "switch" or an if-else chain will be used for prediction....
Definition: CodeGenHelperBase.cs:297
Loyc.Collections.VListBlock.MuAllocBlock
static int MuAllocBlock(WListProtected< T > w, int newBlockSizeLimit)
Used by MuAddEmpty to allocate an empty mutable block.
Definition: VListBlock.cs:955
Loyc.LLParserGenerator.CodeGenHelperBase.Done
virtual void Done()
LLParserGenerator calls this method to notify the snippet generator that code generation is complete.
Definition: CodeGenHelperBase.cs:142
Loyc.Syntax.Lexing.BaseILexer< ICharSource, Token >::_current
Maybe< Token > _current
The token that will be returned from the Current property.
Definition: BaseILexer.cs:59
Loyc.UString.Find
UString Find(uchar what, bool ignoreCase=false)
Finds the specified UCS-4 character.
Definition: UString.cs:395
Loyc.Syntax.StandardTriviaInjector.StandardTriviaInjector
StandardTriviaInjector(IListSource< Token > sortedTrivia, ISourceFile sourceFile, int newlineTypeInt, string mlCommentPrefix, string mlCommentSuffix, string slCommentPrefix)
Initializes StandardTriviaInjector.
Definition: StandardTriviaInjector.cs:89
Loyc.LLPG.Macros.LLLPG_parser
static LNode LLLPG_parser(LNode node, IMacroContext context)
Helper macro that translates parser in LLLPG(parser, {...}) into a GeneralCodeGenHelper object.
Definition: Macros.cs:107
Loyc.SeverityMessageFilter.SeverityMessageFilter
SeverityMessageFilter(IMessageSink< object > target, Severity minSeverity, bool includeDetails=true)
Definition: WrapperSinks.cs:71
Loyc.Collections.BMultiMap.FirstIndexOf
int FirstIndexOf(K key)
Finds the lowest index of an item with the specified key.
Definition: BMultiMap.cs:151
Loyc.Syntax.CodeSymbols.Try
static readonly Symbol Try
e.g. #try({...}, #catch(<tt>, @, {...})); <=> try {...} catch {...}
Definition: CodeSymbols.cs:150
Loyc.Syntax.LNode.Equals
static bool Equals(VList< LNode > a, VList< LNode > b, CompareMode mode=CompareMode.Normal)
Compares two lists of nodes for structural equality.
Definition: LNode.cs:598
Loyc.Geometry.ISizeReader
Interface for reading the size of a 2D object.
Definition: IRectangle.cs:11
LeMP.IMacroContext.IncrementTempCounter
int IncrementTempCounter()
Gets the next number to use as a suffix for temporary variables, then increments it.
Loyc.Collections.Impl.SparseAListLeaf
Internal implementation class. Leaf node of SparseAList<T>.
Definition: SparseAListLeaf.cs:19
Loyc.MiniTest.Assert
The Assert class contains a collection of static methods that mirror the most common assertions used ...
Definition: MiniTest.cs:245
Loyc.LLParserGenerator.IPGCodeGenHelper.ErrorBranch
LNode ErrorBranch(IPGTerminalSet covered, int laIndex)
Generates code for the error branch of prediction.
Loyc.Syntax.ParserSource.TokenTypeToString
Func< MatchType, string > TokenTypeToString
Converts from MatchType (usually integer) to string (used in error messages).
Definition: ParserSource.cs:50
Loyc.Syntax.Lexing.LexerWrapper.NextToken
abstract Maybe< Token > NextToken()
Returns the next (postprocessed) token. This method should set the _current field to the returned val...
Loyc.Syntax.Les.Les3PrinterOptions.SpacesBetweenAppendedStatements
bool SpacesBetweenAppendedStatements
Whether to add a space between multiple statements printed on one line (initial value: true).
Definition: Les3Printer.cs:1474
Loyc.Localize.UseResourceManager
static SavedThreadLocal< LocalizerDelegate > UseResourceManager(ResourceManager manager, CultureInfo culture=null, Func< string, string > resxNameCalculator=null)
Uses a standard ResourceManager object to obtain translations.
Definition: Localize.cs:269
Loyc.LLParserGenerator.AutoValueSaverVisitor
Helper class invoked just after StageTwoParser. Its job is to create variables referenced by labels (...
Definition: AutoValueSaverVisitor.cs:22
Loyc.Syntax.CodeSymbols.Ref
static readonly Symbol Ref
"#ref": ref int x <=> [#ref] #var(#int, x)
Definition: CodeSymbols.cs:99
Loyc.MessageSink.SetDefault
static SavedValue< IMessageSink > SetDefault(IMessageSink sink)
Used to change the MessageSink.Default property temporarily.
Definition: MessageSink.out.cs:50
Loyc.Math
Contains general-purpose math algorithms beyond what is provided in the .NET BCL (Base Class Library)...
Definition: Interfaces.cs:17
Loyc.LLParserGenerator.PGIntSet
Represents a set of characters (e.g. 'A'..'Z' | 'a'..'z' | '_'), or a set of integers,...
Definition: PGIntSet.cs:23
Loyc.Ecs.Parser.EcsParser
Parses Enhanced C# code into a sequence of Loyc trees (LNode), one per top-level statement.
Definition: EcsParser.cs:28
Loyc.Syntax.Les.Les3Lexer
Definition: Les3.cs:21
Loyc.IEither
Represents a type that holds a single value of one of two types (L or R).
Definition: MiscInterfaces.cs:56
Loyc.Collections.BDictionary.BDictionary
BDictionary(int maxLeafSize, int maxInnerSize)
Definition: BDictionary.cs:58
Loyc.Syntax.Lexing.Token.ToString
override string ToString()
Reconstructs a string that represents the token, if possible. Does not work for whitespace and commen...
Definition: Token.cs:335
Loyc.Collections.Impl.AListIndexer.IndexOfAny
int IndexOfAny(T item)
Returns an index at which the specified item can be found.
Definition: AListIndexer.cs:172
Loyc.Syntax.LNodeExt.WithoutTrailingTrivia
static VList< LNode > WithoutTrailingTrivia(this VList< LNode > attrs, out VList< LNode > trailingTrivia)
Gets a new list with any trailing attributes removed. Those trivia are returned in an out parameter.
Definition: LNodeExt.cs:63
Loyc.Math.IRing
This defines a Ring with the operations +,*
Definition: Interfaces.cs:292
Loyc.Collections.Impl.AListIndexer.AddAll
void AddAll(AListNode< K, T > node)
Called when all children are being added to a node (leaf or inner). Notifications are not sent for in...
Definition: AListIndexer.cs:135
Loyc.Syntax.Les.Les3Printer.NewlineContext
NewlineContext
Used to help keep track of where newline trivia (and single- line comments ending in a newline) are p...
Definition: Les3Printer.cs:192
Loyc.Math.IBitwise
Provides the standard set of bitwise operators.
Definition: Interfaces.cs:168
Loyc.Math.IFloatMath
Provides operations available on floating-point types (float and double), including trigonometry and ...
Definition: Interfaces.cs:381
Loyc.Syntax.Lexing.IndentTokenGenerator.NextToken
override Maybe< Token > NextToken()
Returns the next (postprocessed) token. This method should set the _current field to the returned val...
Definition: IndentTokenGenerator.cs:202
Loyc.LLParserGenerator.Pred.IsNullable
abstract bool IsNullable
Returns true if this predicate can match an empty input.
Definition: Predicates.cs:81
Loyc.Syntax.CodeSymbols.NotEq
static readonly Symbol NotEq
"!=" Inequality test operator
Definition: CodeSymbols.cs:46
Loyc.LLParserGenerator.IPGCodeGenHelper.Example
string Example(IPGTerminalSet set)
Returns an example of an item in the set. If the example is a character, it should be surrounded by s...
LeMP.IMacroContext.RemainingNodes
IListSource< LNode > RemainingNodes
Gets a list of the remaining nodes (arguments/statements or attributes) after this point in the code ...
Definition: IMacroContext.cs:81
Loyc.Collections.EnumerableExt.AdjacentPairs< T >
static IEnumerable< Pair< T, T > > AdjacentPairs< T >(this IEnumerable< T > list)
Returns all adjacent pairs (e.g. for the list {1,2,3}, returns {(1,2),(2,3)})
Definition: EnumerableExt.cs:391
Loyc.Geometry.IPointReader
Interface for reading the coordinates of a 2D point.
Definition: IPoint.cs:11
Loyc.LLParserGenerator.PGIntSet.ExprComplexity
int ExprComplexity()
Returns the "complexity" of the set.
Definition: PGIntSet.cs:138
Loyc.LLParserGenerator.CodeGenHelperBase.GetRelativeCostForSwitch
virtual int GetRelativeCostForSwitch(IPGTerminalSet set)
Used to help decide whether a "switch" or an if statement will be used to handle a prediction tree,...
Definition: CodeGenHelperBase.cs:307
Loyc.Threading.ThreadEx.ManagedThreadId
int ManagedThreadId
Gets a unique identifier for the current managed thread.
Definition: ThreadEx.cs:225
Loyc.LLParserGenerator.PredVisitor
Base class for implementing a visitor that examines a tree of LLLPG Predicates.
Definition: PredVisitor.cs:10
Loyc.Syntax.Les.Les3Lexer.PreferCustomLiterals
bool PreferCustomLiterals
If this flag is true, all literals except plain strings and true/false/null are stored as CustomLiter...
Definition: Les3.cs:34
Loyc.Syntax.ILNodePrinter
This interface allows serializing LNode objects into the syntax of a particular programming language.
Definition: ILNodePrinter.cs:12
Loyc.Collections.Impl.AListNode._maxNodeSize
ushort _maxNodeSize
Maximum number of slots in this node
Definition: AListNode.cs:264
Loyc.SymbolPool.Get
virtual void Get(string name, out Symbol sym)
Workaround for lack of covariant return types in C#
Definition: Symbol.cs:267
Loyc.Collections.ICollectionSource.CopyTo
void CopyTo(T[] array, int arrayIndex)
Copies the elements of the collection to an Array, starting at a particular array index.
Loyc.Threading
Helper classes for multithreaded code.
Definition: SavedThreadLocal.cs:4
Loyc.Collections.Impl.AListInnerBase.GetImmutableCount
override uint GetImmutableCount(bool excludeSparse)
Diagnostic method. See AListBase<K,T>.GetImmutableCount().
Definition: AListInnerBase.cs:611
Loyc.Collections.VList.CopyTo
void CopyTo(T[] array, int arrayIndex)
Copies the elements of the collection to an Array, starting at a particular array index.
Definition: VList.cs:373
Loyc.Collections.Impl.KeyWalker._left
int _left
number of bytes in the key that are not yet consumed
Definition: CPTrieMisc.cs:134
Loyc.Syntax.ParseNumberFlag
ParseNumberFlag
Flags that can be used with ParseHelpers.TryParseUInt(ref UString, out ulong, int,...
Definition: ParseHelpers.cs:609
Loyc.Collections.CG.ObjectCache
static SimpleCache< object >?? ObjectCache
Gets the cache used by Cache(object).
Definition: CG.cs:31
Loyc.Syntax.AbstractTriviaInjector.GetRange
abstract SourceRange GetRange(Trivia trivia)
Gets the SourceRange for an element of trivia.
Loyc.Ecs.EcsLanguageService.Tokenize
ILexer< Token > Tokenize(ICharSource text, string fileName, IMessageSink msgs)
Returns a lexer that is configured to begin reading the specified file.
Definition: EcsLanguageService.cs:67
Loyc.Syntax.ParsingService.Tokenize
static ILexer< Token > Tokenize(this IParsingService parser, Stream stream, string fileName, IMessageSink msgs=null)
Parses a Stream.
Definition: IParsingService.cs:256
Loyc.IHasMutableValue
Interface for things that have a mutable Value property.
Definition: MiscInterfaces.cs:45
Loyc.Collections.ArraySlice
Adapter: Provides access to a section of an array.
Definition: ArraySlice.cs:22
Loyc.Collections.WeakValueDictionary.Cleanup
void Cleanup()
Removes entries with garbage-collected values from the dictionary.
Definition: WeakValueDictionary.cs:47
Loyc.Collections.EnumerableExt.MaxOrDefault< T >
static T MaxOrDefault< T >(this IEnumerable< T > list, Func< T, int > selector, T defaultValue=default(T))
Returns the item in the list that has the maximum value for some selector.
Definition: EnumerableExt.cs:305
Loyc.MessageMulticaster
A message sink that sends its messages to a list of other sinks.
Definition: WrapperSinks.cs:127
Loyc.Collections.VListBlock.Insert
static VListBlock< T > Insert(VListBlock< T > self, int localCount, T item, int distanceFromFront)
Inserts a new item in a FVList where localCount is the number of items in the FVList's first block an...
Definition: VListBlock.cs:399
Loyc.LLParserGenerator.LLParserGenerator.KthSet
Holds information about the first set or kth set of a single arm of an Alts.
Definition: KthSet.cs:42
Loyc.Collections.Impl.InternalSet.IsSupersetOf
bool IsSupersetOf(IEnumerable< T > other, IEqualityComparer< T > thisComparer, int myMaxCount=int.MaxValue)
Returns true if all items in the other set are present in this set.
Definition: InternalSet.cs:1504
LeMP.IMacroContext.IsAttribute
bool IsAttribute
Returns true if the current node is in the attribute list of its immediate parent.
Definition: IMacroContext.cs:85
Loyc.LLParserGenerator.IPGTerminalSet.IntersectionCore
IPGTerminalSet IntersectionCore(IPGTerminalSet other, bool subtract=false, bool subtractThis=false)
Computes the intersection of two sets.
Loyc.Syntax.Les.Les3PrinterOptions.DigitSeparator
char? DigitSeparator
Sets the "thousands" or other digit separator for numeric literals. Valid values are null (to disable...
Definition: Les3Printer.cs:1525
Loyc.Math.IExp
Provides power, logarithm, raise-e-to-exponent (Exp) and logarithm-of-e (Log) operations.
Definition: Interfaces.cs:237
Loyc.Syntax.LNodeExt.GetTrailingTrivia
static VList< LNode > GetTrailingTrivia(this LNode node)
Gets all trailing trivia attached to the specified node.
Definition: LNodeExt.cs:27
Loyc.Syntax.Lexing.BaseLexer.LineStartAt
int LineStartAt
Index at which the current line started.
Definition: BaseLexer.cs:234
Loyc.LLParserGenerator.IPGCodeGenHelper.CallRule
LNode CallRule(RuleRef rref, bool recognizerMode)
Generates code to call a rule based on rref.Rule.Name and rref.Params.
Loyc.Collections.ValueCollection.Enumerator
Return type of GetEnumerator().
Definition: ValueCollection.cs:136
Loyc.Collections.CPTrie.CountMemoryUsage
int CountMemoryUsage(int sizeOfT)
Calculates the memory usage of this object, assuming a 32-bit architecture.
Definition: CPTrie.cs:241
Loyc.LLParserGenerator.Rule.Basis
LNode Basis
A node that contains the original code of the rule, or, if the rule was created programmatically,...
Definition: Rule.cs:25
LeMP.MacroMode.ProcessChildrenBefore
@ ProcessChildrenBefore
The result is pre-processed before calling the macro, and not processed afterward (if the macro accep...
Loyc.Collections.LCInterfaces.ReplaceIfPresent< K, V >
static bool ReplaceIfPresent< K, V >(this IDictionaryEx< K, V > dict, K key, V value)
Replaces an item in the map if the key was already present. If the key was not already present,...
Definition: IDictionaryEx.cs:141
Loyc.Collections.VList.ToWList
WList< T > ToWList()
Returns this list as an WList.
Definition: VList.cs:256
Loyc.Collections.BList.FindLowerBound
int FindLowerBound(T item, out bool found)
Finds the lowest index of an item that is equal to or greater than the specified item.
Definition: BList.cs:345
Loyc.Collections.AListOperation.AddOrThrow
@ AddOrThrow
The item will be added if its key is not already present, but KeyAlreadyExistsException or InvalidOpe...
Loyc.Syntax.LNodeExt.PlusTrailingTrivia
static VList< LNode > PlusTrailingTrivia(this VList< LNode > attrs, VList< LNode > trivia)
Adds additional trailing trivia to an attribute list. Has no effect if trivia is empty.
Definition: LNodeExt.cs:95
Loyc.Syntax.CodeSymbols.Lock
static readonly Symbol Lock
e.g. #lock(obj, stmt); <=> lock(obj) stmt;
Definition: CodeSymbols.cs:145
Loyc.Syntax.Lexing.TokenListAsLexer.IndexToLine
SourcePos IndexToLine(int index)
Returns the position in a source file of the specified index.
Definition: TokenListAsLexer.cs:73
Loyc.Collections.MaxHeap
Encapsulates algorithms for a max-heap, i.e. a priority queue that always knows the largest item and ...
Definition: Heap.cs:28
Loyc.Collections.NegListSource.Min
int Min
Returns the minimum valid index.
Definition: NegListSource.cs:74
Loyc.Collections.IDeque.First
T First
Gets the first item in the deque.
Definition: Queue interfaces.cs:74
Loyc.Syntax.ParseNumberFlag.AllowCommaDecimalPoint
@ AllowCommaDecimalPoint
Whether to treat comma as a decimal point when parsing a float. The dot '.' is always treated as a de...
Loyc.Syntax.Lexing.BaseLexer.Skip
void Skip()
Increments InputPosition. Called by LLLPG when prediction already verified the input (and caller does...
Definition: BaseLexer.cs:221
Loyc.UString.InternalString
string InternalString
Returns the original string.
Definition: UString.cs:113
LeMP.MacroProcessor.ProcessAsync
Task< VList< LNode > >[] ProcessAsync(IReadOnlyList< InputOutput > sourceFiles, Action< InputOutput > onProcessed=null)
Processes source files in parallel using .NET Tasks. The method returns immediately.
Definition: MacroProcessor.cs:231
Loyc.Collections.AListBase.ObserverMgr
A multiplexer that is only created for ALists that have two or more attached intances of IAListTreeOb...
Definition: AListNodeObserver.cs:41
Loyc.Collections.AListBase.RemoveAll
int RemoveAll(Predicate< T > match)
Removes all the elements that match the conditions defined by the specified predicate.
Definition: AListBase.cs:546
Loyc.Syntax.ParseHelpers.TryParseUInt
static bool TryParseUInt(ref UString s, out ulong result, int radix=10, ParseNumberFlag flags=0)
Tries to parse a string to an unsigned integer.
Definition: ParseHelpers.cs:312
Loyc.Math.INumTraits.Floor
T Floor(T value)
Gets the closest integer equal to or lower than the specified number.
Loyc.LLParserGenerator.IPGTerminalSet.Empty
IPGTerminalSet Empty
Returns the empty set.
Definition: IPGTerminalSet.cs:34
Loyc.Collections.Impl.AListNode.GetRealItemCount
virtual uint GetRealItemCount()
For sparse lists: counts the number of non-sparse items.
Definition: AListNode.cs:296
Loyc.Syntax.NodeStyle.HexLiteral
@ HexLiteral
Used for a hexadecimal (base-16) literal like 0x1F.
Loyc.Syntax.LNode.PushedPrinter
Returned by PushPrinter(ILNodePrinter).
Definition: LNode.cs:544
Loyc.Collections.ListExt.Single< T >
static Repeated< T > Single< T >(T value)
Returns a helper object that stores one value, but acts like a read-only list of one item.
Definition: Repeated.cs:28
Loyc.MessageHolder.IsEnabled
bool IsEnabled(Severity level)
Always returns true.
Definition: MessageHolder.cs:40
Loyc.Syntax.Les.Les3PrettyPrinter.PrintToHtmlCore
static StringBuilder PrintToHtmlCore(StringBuilder input, StringBuilder output=null, bool addPreCode=true, string newline="\n", string[] colorCodesToCssClasses=null)
Converts a StringBuilder with LesColorCode control codes to HTML with Pygments CSS class codes.
Definition: Les3PrettyPrinter.cs:226
LeMP.MacroProcessor.ProcessSynchronously
void ProcessSynchronously(IReadOnlyList< InputOutput > sourceFiles, Action< InputOutput > onProcessed=null)
Processes source files one at a time (may be easier for debugging).
Definition: MacroProcessor.cs:208
Loyc.Syntax.Lexing.TriviaSaver.TriviaSaver
TriviaSaver(ILexer< Token > lexer, int newlineTypeInt=int.MinValue)
Initializer.
Definition: TriviaSaver.cs:20
Loyc.Collections.Set.IsProperSubsetOf
bool IsProperSubsetOf(MSet< T > other)
Definition: Set.cs:151
Loyc.Collections.MutableListExtensionMethods.ICollectionExt.RemoveRange< K >
static int RemoveRange< K >(this ICollection< K > set, IEnumerable< K > list)
Removes data from a set (set.Remove(value) for all values in a sequence.)
Definition: ICollectionExt.cs:21
LeMP.Tests.TestUseSequenceExpressionsMacro
Definition: TestSequenceExpressionMacro.cs:12
Loyc.Collections.MMap.With
MMap< K, V > With(K key, V value, bool replaceIfPresent=true)
Definition: MMap.cs:250
Loyc.Collections.Impl.InternalSet.UnionWith
int UnionWith(InternalSet< T > other, IEqualityComparer< T > thisComparer, bool replaceIfPresent)
Definition: InternalSet.cs:1325
Loyc.UString.TryDecodeAt
uchar TryDecodeAt(int index)
Returns the UCS code point that starts at the specified index.
Definition: UString.cs:216
Loyc.Collections.MSet.SetEquals
bool SetEquals(MSet< T > other)
Definition: MSet.cs:290
Loyc.Ecs.EcsLanguageService.Parse
IListSource< LNode > Parse(ILexer< Token > input, IMessageSink msgs, ParsingMode inputType=null, bool preserveComments=true)
If HasTokenizer is true, this method accepts a lexer returned by Tokenize() and begins parsing.
Definition: EcsLanguageService.cs:76
Loyc.Math.IUIntMath
Provides operations available on all unsigned integer types (byte, uint, etc.); see also IMath<T>,...
Definition: Interfaces.cs:354
LeMP.LexicalMacroAttribute.LexicalMacroAttribute
LexicalMacroAttribute(string syntax, string description, params string[] names)
LexicalMacroAttribute constuctor.
Definition: MacroAttributes.cs:60
Loyc.Syntax.Lexing.TokenKind.Spaces
@ Spaces
Spaces, tabs, non-semantic newlines, and EOF
Loyc.MiniTest.TestAttribute.Description
string Description
Descriptive text for this test
Definition: MiniTest.cs:93
Loyc.Collections.Impl.IEnumeratorFrame
Helper interface for NestedEnumerator<Frame, T>.
Definition: NestedEnumerator.cs:167
Loyc.Collections.VListBlockOfTwo
The tail of a VList contains only one or two items. To improve efficiency slightly,...
Definition: VListBlockOfTwo.cs:15
Loyc.Localize.Formatter
static FormatterDelegate Formatter
String formatter method, which is string.Format by default
Definition: Localize.cs:225
Loyc.LocalizableAttribute
I plan to use this attribute someday to gather all the localizable strings in an application....
Definition: Localize.cs:383
Loyc.Syntax.LineRemapper.Remap
bool Remap(ref int line, ref string fileName)
Remaps the specified line number, if a remapping has been created that applies to it.
Definition: LineRemapper.cs:106
Loyc.Collections.Impl.ListSourceBase
A base class for read-only collections that wish to implement IList<T> and IListSource<T>....
Definition: ListSourceBase.cs:19
Loyc.Threading.ScratchBuffer.Value
T Value
Please see the documentation of ScratchBuffer<T> itself.
Definition: ScratchBuffer.cs:67
Loyc.MiniTest.Assert.That
static void That(bool condition)
Calls Fail() if condition is false.
Definition: MiniTest.cs:521
System.Diagnostics
Definition: Contract.Assert.cs:7
Loyc.UString.ShedExcessMemory
UString ShedExcessMemory(int maxExtra)
This method makes a copy of the string if this is a sufficiently small slice of a larger string.
Definition: UString.cs:473
Loyc.Syntax.PrintHelpers
Static methods that help to print literals, such as EscapeCStyle which escapes special characters wit...
Definition: PrintHelpers.cs:13
Loyc.Syntax.Lexing.LexerSourceWorkaround.Error
override void Error(int lookaheadIndex, string format)
This method is called to handle errors that occur during lexing.
Definition: LexerSource.cs:176
Loyc.Math.IIntMath
Provides operations available on all unsigned integer types (byte, uint, etc.); see also IMath<T>,...
Definition: Interfaces.cs:362
Loyc.LLParserGenerator.CodeGenHelperBase.InputSource
LNode InputSource
Specifies an object or class on which LLLPG APIs such as Match() and LA() should be called.
Definition: CodeGenHelperBase.cs:54
LeMP.Tests.TestMatchMacro
Definition: TestMatchMacro.cs:10
Loyc.Syntax.CodeSymbols.Explicit
static readonly Symbol Explicit
e.g. [#explicit] #fn(#int32, [#operator] #cast, (Foo a,))
Definition: CodeSymbols.cs:176
Loyc.Collections.CPStringTrie.Enumerator
Enumerates key-value pairs in a CPStringTrie.
Definition: CPStringTrie.cs:220
Loyc.LLParserGenerator.IPGCodeGenHelper.GenerateSkip
LNode GenerateSkip(bool savingResult)
Generate code to match any token.
Loyc.Collections.ICollectionAndReadOnly
This interface is meant to be implemented by read-only sequence types that originally implemented ICo...
Definition: Disambiguation interfaces.cs:15
Loyc.SeverityMessageFilter.Write
void Write(Severity level, TContext context, string format)
Writes a message to the target that this object represents.
Definition: WrapperSinks.cs:45
Loyc.Collections.MaxHeap.List
TList List
Returns the underlying list that represents the binary heap.
Definition: Heap.cs:33
Loyc.TraceMessageSink
Sends all messages to System.Diagnostics.Trace.WriteLine(string).
Definition: BasicSinks.cs:136
Loyc.LLParserGenerator.IntSet.ToString
override string ToString()
Prints the character set using regex syntax, e.g. [$a-z] means "EOF or a to z", [^ \r] means "not \n ...
Definition: IntSet.cs:396
Loyc.Syntax.IdNode.WithName
abstract override LNode WithName(Symbol name)
Creates a node with a new value for Name.
Loyc.Collections.BMultiMap
An sorted dictionary that allows multiple values to be associated with a single key.
Definition: BMultiMap.cs:46
Loyc.Collections.Impl.InternalList.AsInternalList< T >
static InternalList< T > AsInternalList< T >(this T[] array)
Converts an array to InternalList (exists to help infer type params)
Definition: InternalList.cs:456
Loyc.Syntax.CodeSymbols.SwitchStmt
static readonly Symbol SwitchStmt
e.g. #switch(n, { ... }); <=> switch(n) { ... }
Definition: CodeSymbols.cs:148
Loyc.LogException
An exception that includes a "context" object as part of a LogMessage structure, typically used to in...
Definition: LogException.cs:14
Loyc.Syntax.CodeSymbols.Dot
static readonly Symbol Dot
"." binary dot operator, e.g. string.Join
Definition: CodeSymbols.cs:94
Loyc.Syntax.CodeSymbols.StackAlloc
static readonly Symbol StackAlloc
#stackalloc for C# stackalloc (TODO)
Definition: CodeSymbols.cs:187
Loyc.ConcurrentModificationException
An exception thrown when a data structure is accessed (read or written) by one thread at the same tim...
Definition: Exceptions.cs:33
Loyc.Collections.BList.FindLowerBound
int FindLowerBound(ref T item)
Definition: BList.cs:357
Loyc.LLParserGenerator.Gate.Match
Pred Match
Right-hand side of the gate, which is used for matching decisions.
Definition: Predicates.cs:767
Loyc.LLParserGenerator.IntRange
Represents a range of single characters (e.g. 'A'..'Z').
Definition: IntSet.cs:573
Loyc.Collections.NegList.Offset
int Offset
Returns the offset added to indexes in the original list, which equals -Min.
Definition: NegList.cs:56
Loyc.Syntax.Les.TokenExt.Type
static TokenType Type(this Token t)
Converts t.TypeInt to TokenType.
Definition: TokenType.cs:53
Loyc.Syntax.NodeStyle.Expression
@ Expression
The node(s) should be printed as a normal expression, rather than using a special or statement notati...
Loyc.Syntax.Les.CustomLiteral.Value
object Value
The numeric or string value of the literal.
Definition: SpecialLiteral.cs:22
Loyc.StringExt.Join
static string Join(string separator, IEnumerator value)
Definition: StringExt.cs:98
Loyc.StringBuilderExt.Substring
static string Substring(this StringBuilder sb, int startIndex, int length)
Extracts a substring from the specified StringBuiler.
Definition: StringBuilderExt.cs:13
Loyc.StringBuilderExt.StartsWith
static bool StartsWith(this StringBuilder sb, UString what, bool ignoreCase=false)
Finds out whether the StringBuilder starts with the specified substring.
Definition: StringBuilderExt.cs:135
Loyc.Threading.ThreadEx.Priority
ThreadPriority Priority
Gets or sets a value indicating the scheduling priority of a thread.
Definition: ThreadEx.cs:233
Loyc.Collections.Impl.InternalSet.UnionWith
int UnionWith(IEnumerable< T > other, IEqualityComparer< T > thisComparer, bool replaceIfPresent)
Adds the contents of 'other' to this set.
Definition: InternalSet.cs:1314
Loyc.Syntax.Les.Les3PrinterOptions.UseRedundantSemicolons
bool UseRedundantSemicolons
If true, a semicolon is used in addition to the usual newline to terminate each expression inside bra...
Definition: Les3Printer.cs:1481
Loyc.Threading.ThreadEx.Sleep
static void Sleep(int millisecondsTimeout)
Suspends the current thread for a specified time.
Definition: ThreadEx.cs:273
Loyc.Syntax.LiteralNode.WithArgs
override CallNode WithArgs(VList< LNode > args)
Creates a Node with a new argument list. If this node is not a call, a new node is created using this...
Definition: AbstractNodes.cs:63
Loyc.Collections.Impl.AListNode.SetAt
abstract void SetAt(uint index, T item, IAListTreeObserver< K, T > tob)
Sets an item at the specified sub-index.
Loyc.Syntax.CodeSymbols.For
static readonly Symbol For
e.g. #for(int i = 0, i < Count, i++, {...}); <=> for(int i = 0; i < Count; i++) {....
Definition: CodeSymbols.cs:132
Loyc.LLParserGenerator.LLParserGenerator.ComputeNext
Gathers a list of all one-token transitions starting from a single position. Also gathers any and-pre...
Definition: LLParserGenerator.cs:1007
LeMP.MacroMode.PriorityOverrideMax
@ PriorityOverrideMax
Highest priority. If this macro is ambiguous with another macro that doesn't have this flag,...
Loyc.MemoizedTypeName
.NET Framework reflection doesn't offer complete type names for generic types such as "List<int>" (th...
Definition: MemoizedTypeName.cs:12
Loyc.Syntax.EscapeC.BackslashX
@ BackslashX
Use \xNN instead of \u00NN for characters 1-31 and 127-255
Loyc.Syntax.Les.Les3PrettyPrinter.Les3PrettyPrinter
Les3PrettyPrinter(IMessageSink sink=null, ILNodePrinterOptions options=null)
Creates an instance of this class, which produces plain LES augmented with control codes.
Definition: Les3PrettyPrinter.cs:32
Loyc.Syntax.CodeSymbols.Interface
static readonly Symbol Interface
e.g. #interface(IB, #(IA), { }); <=> interface IB : IA { }
Definition: CodeSymbols.cs:161
Loyc.LLParserGenerator.CodeGenHelperBase.NoCheckByDefault
bool NoCheckByDefault
If true, calls to Check() are suppressed when AndPred.CheckErrorMessage is null.
Definition: CodeGenHelperBase.cs:88
Loyc.Syntax.Lexing.TokenTree.Flatten
DList< Token > Flatten()
Converts a token tree back to a plain list.
Definition: Token.cs:130
Loyc.Syntax.CodeSymbols.Var
static readonly Symbol Var
e.g. #var(#int32, x = 0, y = 1, z); #var(@``, x = 0) <=> var x = 0;
Definition: CodeSymbols.cs:165
Loyc.Collections.LCExt.AsSparse< T >
static ListSourceAsSparse< T > AsSparse< T >(this IListSource< T > list)
Treats a non-sparse list as a read-only sparse list with no empty spaces.
Definition: ListSourceAsSparse.cs:13
Loyc.Syntax.Lexing.Token.ToStringStrategy
static Func< Token, string >?? ToStringStrategy
Gets or sets the strategy used by ToString.
Definition: Token.cs:297
Loyc.Collections.BList.Do
int Do(AListOperation mode, ref T item)
Adds, removes, or replaces an item in the list.
Definition: BList.cs:177
Loyc.Syntax.StandardTriviaInjector
Encapsulates an algorithm that consumes trivia (comments and newlines) from a list and adds it as tri...
Definition: StandardTriviaInjector.cs:59
Loyc.Syntax.Les.Les3PrinterOptions.SpaceInsideArgLists
bool SpaceInsideArgLists
Whether to print a space inside argument lists like f( ... ).
Definition: Les3Printer.cs:1435
Loyc.MiniTest.InconclusiveException
Thrown by Assert.Inconclusive().
Definition: MiniTest.cs:207
Loyc.StringBuilderExt.Trim
static StringBuilder Trim(this StringBuilder sb)
Removes all leading and trailing occurrences of spaces and tabs from the StringBuilder object.
Definition: StringBuilderExt.cs:63
Loyc.LLParserGenerator.Pred.ChooseGotoLabel
virtual string ChooseGotoLabel()
Optional. If this predicate represents the matching code for a branch of an Alts and this code is rea...
Definition: Predicates.cs:197
Loyc.Syntax.ParsingMode.File
static readonly ParsingMode File
Tells IParsingService.Parse to treat the input as a complete source file (this should be the default,...
Definition: ParsingMode.cs:39
Loyc.Collections.LinqToLists.Last< T >
static T Last< T >(this IReadOnlyList< T > list)
Gets the last item from the list (at list.Max).
Definition: LinqToLists.out.cs:49
Loyc.Collections.FVList.SmartSelectMany
FVList< T > SmartSelectMany(Func< T, IList< T >> map)
Maps a list to another list by concatenating the outputs of a mapping function.
Definition: FVList.cs:607
Loyc.Ecs.EcsNodePrinter.PrintPlainCSharp
static void PrintPlainCSharp(LNode node, StringBuilder target, IMessageSink sink, ParsingMode mode, ILNodePrinterOptions options=null)
Prints a node while avoiding syntax specific to Enhanced C#.
Definition: EcsNodePrinter.cs:113
Loyc.Geometry.IPoint3Reader
Interface for reading the coordinates of a 3D point.
Definition: IPoint3.cs:10
Loyc.Utilities.CastOptions.AllowRefMismatch
@ AllowRefMismatch
Allow the cast even if NumberOfMethodsWithRefMismatch > 0
Loyc.Syntax.Les.Les3PrettyPrinter.ColorCodesToCssClasses
string[] ColorCodesToCssClasses
The lookup table of strings for control codes (LesColorCode values) to HTML classes,...
Definition: Les3PrettyPrinter.cs:28
Loyc.LLParserGenerator.LLParserGenerator.GetCanonical
Computes the "canonical" interpretation of a position for prediction purposes, so that ConsolidateDup...
Definition: LLParserGenerator.cs:914
Loyc.Syntax.Lexing.BaseLexer.RangesToString
string RangesToString(IList< int > ranges)
Converts a list of character ranges to a string, e.g. for input list {'*','*','a',...
Definition: BaseLexer.cs:666
Loyc.Syntax.CodeSymbols.Lambda
static readonly Symbol Lambda
"=>" used to define an anonymous function
Definition: CodeSymbols.cs:109
Loyc.Collections.BMultiMap.ValueList
Represents the set of values associated with a particular key in a BMultiMap<K,V> collection.
Definition: BMultiMap.cs:243
Loyc.EzStopwatch.Restart
int Restart()
Restarts the timer from zero (unpausing it if it is paused), and returns the number of elapsed millis...
Definition: EzStopwatch.cs:83
Loyc.Collections.LCInterfaces.IndexOf< T >
static int IndexOf< T >(this IReadOnlyList< T > list, T item)
Determines the index of a specific value.
LeMP.IMacroContext.Sink
IMessageSink Sink
Returns the message sink, used for writing warnings and errors.
Definition: IMacroContext.cs:17
Loyc.Threading.TinyReaderWriterLock.EnterWriteLock
void EnterWriteLock(int threadID)
Acquires the lock to protect write access to a shared resource.
Definition: ThreadEx.cs:392
Loyc.Collections.Heap.AsMaxHeap< T >
static MaxHeapInList< T > AsMaxHeap< T >(this IList< T > list, IComparer< T > compare=null, bool heapify=false)
Returns a MaxHeapInList wrapper object, which treats the list as a binary max-heap (priority queue)....
Definition: Heap.cs:316
Loyc.Syntax.ParserSource.ParserSource
ParserSource(IEnumerable< Token > list, Token eofToken, ISourceFile file, int startIndex=0)
<inheridoc>
Definition: ParserSource.cs:137
Loyc.Syntax.ILNodePrinterOptions.OmitComments
bool OmitComments
When this flag is set, comment trivia attributes are suppressed (e.g. CodeSymbols....
Definition: ILNodePrinterOptions.cs:23
Loyc.Syntax.CodeSymbols.Add
static readonly Symbol Add
"+" Addition or unary +
Definition: CodeSymbols.cs:31
Loyc.Syntax.Les.Les2PrecedenceMap.IsNaturalOperatorToken
static bool IsNaturalOperatorToken(UString name)
Like IsNaturalOperator, but doesn't expect name[0] is apostrophe.
Definition: LesPrecedenceMap.cs:249
Loyc.Syntax.BaseParser.LaIndexToCharIndex
virtual int LaIndexToCharIndex(int lookaheadIndex)
Converts a lookahead token index to a character index (used for error reporting).
Definition: BaseParser.cs:115
Loyc.Collections.NegList
Adapter: provides a view of an IList<T> in which the Count is the same, but the minimum index is not ...
Definition: NegList.cs:40
Loyc.LLParserGenerator.Alts.Greedy
bool? Greedy
Specifies whether the loop is greedy or nongreedy (ignored for non-loops). This flag is used in case ...
Definition: Predicates.cs:443
Loyc.Threading.ThreadLocalVariable.AutoFallbackMode
bool AutoFallbackMode
Returns true if this variable was created in "auto-fallback" mode, which means that setting the Value...
Definition: ThreadEx.cs:612
Loyc.Syntax.LNode.ReplaceRecursive
Maybe< LNode > ReplaceRecursive(Func< LNode, Maybe< LNode >> matcher, ReplaceOpt options=ReplaceOpt.Default)
Performs a recursive find-and-replace operation, by attempting to replace each child (among Attrs,...
Definition: LNode.cs:984
Loyc.Syntax.Les.Les3PrinterOptions.AllowExtraParenthesis
bool AllowExtraParenthesis
Introduces extra parenthesis to express precedence, without using an empty attribute list [] to allow...
Definition: Les3Printer.cs:1452
Loyc.Utilities.GoInterface.UnwrapOnce
static object UnwrapOnce(object obj)
Unwraps an object if it was wrapped by GoInterface. This unwrapping is not recursive–if a wrapper is ...
Definition: GoInterface.cs:110
Loyc.LLPG.Macros.LllpgMacro
static LNode LllpgMacro(LNode node, IMacroContext context, Symbol expectedCodeGenMode, Func< LNode, IPGCodeGenHelper > makeCodeGenHelper, bool isDefault=false)
This method helps do the stage-one transform from LLLPG (config) {...} to run_LLLPG (helper literal) ...
Definition: Macros.cs:148
Loyc.Collections.ISparseList
Represents a sparse list that allows insertion and removal of items and empty spaces....
Definition: ISparseList.cs:183
Loyc.Syntax.LNode.TriviaValue
virtual object TriviaValue
Gets the value of Args[0].Value, if Args[0] exists; otherwise, returns NoValue.Value.
Definition: LNode.cs:581
Loyc.Syntax.LNode.PushPrinter
static PushedPrinter PushPrinter(ILNodePrinter printer)
Helps you change printers temporarily. Usage in C#: using (LNode.PushPrinter(myPrinter)) { ....
Definition: LNode.cs:540
Loyc.Syntax.IIndexToLine.FileName
string FileName
Gets the file name used in results returned by IndexToLine(int).
Definition: IIndexPositionMapper.cs:25
Loyc.Threading.ThreadEx.IsBackground
bool IsBackground
Gets or sets a value indicating whether or not a thread is a background thread.
Definition: ThreadEx.cs:221
Loyc.Syntax.AbstractTriviaInjector.GetAttachedTrivia
abstract VList< LNode > GetAttachedTrivia(LNode node, IListSource< Trivia > trivia, TriviaLocation loc, LNode parent, int indexInParent)
Derived class translates a list of trivia (tokens) into appropriate trivia attributes....
Loyc.Collections.Map.Map
Map(IEqualityComparer< K > comparer)
Creates an empty map with the specified key comparer.
Definition: Map.cs:205
LeMP.Tests.B
Definition: MacroProcessorTests.cs:104
Loyc.Syntax.IndexPositionMapper
Helper class for mapping from indexes to SourcePos and back.
Definition: IndexPositionMapper.cs:35
Loyc.Collections.MSet.IsProperSubsetOf
bool IsProperSubsetOf(ISet< T > other)
Definition: MSet.cs:274
Loyc.Geometry.IRectangle3Reader
Represents a read-only 3D rectangular prism.
Definition: IRectangle3.cs:41
Loyc.LLParserGenerator.LlpgTestLargerExamples
Definition: LlpgTestLargerExamples.cs:10
Loyc.Syntax.Impl.PrinterState
A helper type for printer objects. Its primary purposes are to manage indentation and to "revoke" new...
Definition: PrinterState.cs:71
Loyc.Syntax.Lexing.Token.IsWhitespace
bool IsWhitespace
Returns true if Value == WhitespaceTag.Value.
Definition: Token.cs:284
Loyc.Collections.Impl.ListExBase.CopyTo
virtual void CopyTo(T[] array, int arrayIndex)
Copies the elements of the collection to an Array, starting at a particular array index.
Definition: ListExBase.cs:75
Loyc.LLParserGenerator.IntStreamCodeGenHelper.GenerateTest
override LNode GenerateTest(IPGTerminalSet set, LNode subject, Symbol setName)
Generates code to test whether a terminal is in the set.
Definition: IntStreamCodeGenHelper.cs:133
Loyc.Collections.Set.Where
Set< T > Where(Predicate< T > match)
Returns a new set that contains only items that match the specified predicate (i.e....
Definition: Set.cs:315
Loyc.Syntax.IdNode.WithValue
override LiteralNode WithValue(object value)
Creates a new literal node with a different Value than the current literal node.
Definition: AbstractNodes.cs:25
Loyc.Collections.MSet.IsSupersetOf
bool IsSupersetOf(IEnumerable< T > other)
Returns true if all items in the other set are present in this set.
Definition: MSet.cs:260
Loyc.Collections.EnumerableExt.SequenceHashCode< T >
static int SequenceHashCode< T >(this IEnumerable< T > list)
A companion to Enumerable.SequenceEqual<T> that computes a hashcode for a list.
Definition: EnumerableExt.cs:365
Loyc.Collections.BList.RemoveAll
int RemoveAll(T item)
Removes all instances of the specified item.
Definition: BList.cs:159
Loyc.Collections.BMultiMap.ContainsKey
bool ContainsKey(K key)
Finds out whether the specified key is present.
Definition: BMultiMap.cs:137
Loyc.Collections.Heap.ToMaxHeap< T >
static MaxHeap< T > ToMaxHeap< T >(this IList< T > list, IComparer< T > compare=null, bool heapify=true)
Copies the list into a new object with the items arranged as a max-heap (priority queue)....
Definition: Heap.cs:330
Loyc.Collections.DictionaryExt.TryGetValue< K, V >
static V TryGetValue< K, V >(this Dictionary< K, V > dict, K key, V defaultValue)
An alternate version TryGetValue that returns a default value if the key was not found in the diction...
Definition: DictionaryExt.cs:17
Loyc.Collections.Set.IsProperSupersetOf
bool IsProperSupersetOf(MSet< T > other)
Definition: Set.cs:160
Loyc.G.IsInRangeExcludeHi
static bool IsInRangeExcludeHi(this ulong num, ulong lo, ulong hi)
Returns true if num is between lo and hi, excluding hi but not lo.
Definition: GRange.out.cs:74
Loyc.Syntax.CodeSymbols.Checked
static readonly Symbol Checked
e.g. #checked({ stmt; }); <=> checked { stmt; }
Definition: CodeSymbols.cs:142
Loyc.Collections.MutableListExtensionMethods.LinqToLists.TakeNowWhile< T >
static ListSlice< T > TakeNowWhile< T >(this IList< T > list, Func< T, bool > predicate)
Returns a slice of the initial elements of the list that meet the provided criteria....
Definition: LinqToLists.out.cs:302
Loyc.Collections.Set
An immutable set.
Definition: Set.cs:29
Loyc.Syntax.Les.Les2Lexer.ParseIdentifier
static string ParseIdentifier(ref UString source, Action< int, string > onError, out bool checkForNamedLiteral)
Parses an LES-style identifier such as foo, @foo, <tt>foo or &ndash;punctuation–.
Definition: Les2Lexer.cs:454
Loyc.Collections.Impl.InternalSet.IsProperSupersetOf
bool IsProperSupersetOf(IEnumerable< T > other, IEqualityComparer< T > comparer, int myExactCount)
Returns true if all items in the other set are present in this set, and this set has at least one ite...
Definition: InternalSet.cs:1590
Loyc.Collections.MMap.GetAndRemove
bool GetAndRemove(ref KeyValuePair< K, V > pair)
Gets the pair associated with pair.Key, then removes the pair with that key from the dictionary.
Definition: MMap.cs:236
LeMP.MacroContext.GetArgsAndBody
static Pair< VList< LNode >, VList< LNode > > GetArgsAndBody(this IMacroContext ctx, bool orRemainingNodes)
Splits the current node into a pair of "argument" and "body" lists, potentially treating ctx....
Definition: IMacroContext.cs:180
Loyc.Math.INumTraits.MaxIntPowerOf2
int MaxIntPowerOf2
Returns the maximum power-of-two-minus-one that can be represented by this type, e....
Definition: Interfaces.cs:139
Loyc.Syntax.Lexing.LexerSourceFile.AfterNewline
void AfterNewline(int index)
Allows a lexer to record the index of the character after each line break, in the order they exist in...
Definition: LexerSource.cs:215
Loyc.MessageSink.FormatMessage
static string FormatMessage(Severity type, object context, string format, params object[] args)
Converts a quadruplet (type, context, format, args) to a single string containing all that informatio...
Definition: MessageSink.out.cs:297
Loyc.Collections.VListBlock.IsMutable
bool IsMutable
Returns true if part or all of the block is mutable.
Definition: VListBlock.cs:262
Loyc.ITags
Interface for an object that can have "tags" attached, which are arbitrary objects reached through a ...
Definition: MiscInterfaces.cs:17
Loyc.LLParserGenerator.CodeGenHelperBase.GetListType
virtual LNode GetListType(LNode type)
Gets the list type for elements of the specified type (e.g. List<type>)
Definition: CodeGenHelperBase.cs:501
Loyc.Syntax.Les.Les3PrettyPrinter
A variant of Les3Printer that adds syntax highlighting in one of three ways: as console output,...
Definition: Les3PrettyPrinter.cs:21
Loyc.MessageFilter
A decorator that uses a delegate to accept or ignore messages.
Definition: WrapperSinks.cs:81
Loyc.Collections.Impl.CPByteTrie.ContainsKey
bool ContainsKey(byte[] key)
Searches for the specified key, returning true if it is present in the trie.
Definition: CPByteTrie.cs:82
Loyc.Collections.BMultiMap.FindLowerBound
int FindLowerBound(K key, out bool found)
Definition: BMultiMap.cs:353
Loyc.Syntax.Precedence.CanAppearIn
bool CanAppearIn(Precedence context)
For use in printers. Returns true if an infix operator with this precedence can appear in the specifi...
Definition: Precedence.cs:273
Loyc.Syntax.ParseHelpers.UnescapeChar
static int UnescapeChar(ref UString s, ref EscapeC encountered)
Unescapes a single character of a string. Returns the first character if it is not a backslash,...
Definition: ParseHelpers.cs:147
Loyc.Syntax.AbstractTriviaInjector.MarkOneLiner
virtual void MarkOneLiner(ref LNode node)
This method is called when a node has no newlines or comments within it (although the node may still ...
Definition: AbstractTriviaInjector.cs:153
Loyc.Collections.Impl.InternalList.BinarySearch< T, K >
static int BinarySearch< T, K >(T[] _array, int _count, K k, Func< T, K, int > compare, bool lowerBound)
Performs a binary search with a custom comparison function.
Definition: InternalList.cs:552
Loyc.MiniTest.Assert.Equals
static new void Equals(object a, object b)
Equals() is inherited from object; you probably want to call AreEqual instead.
Definition: MiniTest.cs:470
Loyc.Syntax.CodeSymbols.Finally
static readonly Symbol Finally
"#finally" finally clause of #try statement: #finally({...})
Definition: CodeSymbols.cs:152
Loyc.Syntax.StandardTriviaInjector.MakeTriviaAttribute
virtual LNode MakeTriviaAttribute(Token t)
Called to transform a trivia token into a trivia attribute.
Definition: StandardTriviaInjector.cs:144
Loyc.Syntax.Les.LesColorCode
LesColorCode
These codes are produced as control characters (i.e. cast to char) in the output of Les3PrettyPrinter...
Definition: Les3PrettyPrinter.cs:304
Loyc.Syntax.Lexing.TokenKind.BracketFlag
@ BracketFlag
Openers and closers all have this bit set.
Loyc.Collections.Impl.AListIndexer.VerifyCorrectness
void VerifyCorrectness()
Scans the index to verify that it matches the tree that is being indexed. The scan takes O(N log N + ...
Definition: AListIndexer.cs:255
Loyc.Syntax.Lexing.ILexer
A standard interface for lexers.
Definition: ILexer.cs:13
Loyc.Collections.Impl.AListTreeObserverExt
Helper methods for IAListTreeObserver<K,T>.
Definition: IAListTreeObserver.cs:118
Loyc.Collections.NestedEnumerator
Helper class. An enumerator that helps enumerate tree data structures. It maintains a virtual call st...
Definition: NestedEnumerator.cs:100
Loyc.Collections.IListImpl
This interface is intended to be implemented by all Loyc collections that implement IList<T>....
Definition: Disambiguation interfaces.cs:88
Loyc.Collections.VList.Add
void ICollection< T >. Add(T item)
Inserts an item at the back (index Count) of the VList.
Definition: VList.cs:351
Loyc.Collections.IMBinumerator
A mutable bidirectional enumerator interface. Please note that the "Remove" method always moves to th...
Definition: New enumerators.cs:64
Loyc.ExceptionExt
Extension methods for exceptions.
Definition: Extensions.cs:47
Loyc.Syntax.Les.Les3PrinterOptions.OmitSpaceTrivia
bool OmitSpaceTrivia
When this flag is set, space trivia attributes are ignored (e.g. CodeSymbols.TriviaSpaceAfter).
Definition: Les3Printer.cs:1459
Loyc.NullMessageSink.ErrorCount
int ErrorCount
Number of errors sent to this object so far, not including detail messages.
Definition: BasicSinks.cs:110
Loyc.Syntax.Lexing.IndentTokenGenerator.MakeEndOfLineToken
abstract Maybe< Token > MakeEndOfLineToken(Token tokenBeforeNewline, ref Maybe< Token > tokenAfterNewline, int? deltaIndent)
Returns a token to represent the end of a line, or null to avoid generating such a token.
Loyc.ReadOnlyException
An exception thrown when an attempt is made to modify a read-only object.
Definition: Exceptions.cs:42
Loyc.Syntax.CodeSymbols.Default
static readonly Symbol Default
"'default" for the default(T) pseudofunction in C#
Definition: CodeSymbols.cs:110
Loyc.Collections.IMFRange
A mutable forward range.
Definition: IRanges.cs:232
Loyc.Threading.ThreadEx.ThreadState
System.Threading.ThreadState ThreadState
Gets a value containing the states of the current thread.
Definition: ThreadEx.cs:238
Loyc.Syntax.Lexing.IndentTokenGenerator.EolToken
Token? EolToken
Gets or sets the prototype token for end-statement (a.k.a. end-of-line) markers, cast to an integer a...
Definition: IndentTokenGenerator.cs:549
Loyc.Syntax.CodeSymbols.GT
static readonly Symbol GT
">" Greater-than operator
Definition: CodeSymbols.cs:49
Loyc.Syntax.CallNode.CallsMin
override bool CallsMin(string name, int argCount)
Returns true if this is a call with the specified name and the specified minimum number of arguments.
Definition: AbstractNodes.cs:141
Loyc.Collections.CG.Cache
static object Cache(int num)
If the specified number is in the range -3 to 9 inclusive, an equivalent preallocated boxed integer i...
Definition: CG.cs:40
Loyc.Collections.ReversedList.ToString
override string ToString()
Returns ToString() of the wrapped object.
Definition: ReversedList.cs:36
Loyc.Collections.Impl.InternalSetStats.LeafCount
int LeafCount
Number of nodes that don't have a child array.
Definition: InternalSet.cs:1692
Loyc.Collections.RangeExt
Extension/helper methods for ranges.
Definition: Range.cs:11
Loyc.Collections.MutableListExtensionMethods.IListExt.Randomized< T >
static T[] Randomized< T >(this IList< T > list)
Quickly makes a copy of a list, as an array, in random order.
Definition: ListExt.cs:764
Loyc.Collections.Impl.AListInnerBase.GetLastItem
override T GetLastItem()
Gets the last item in the last leaf node (needed by B+ trees, but is also called by AListBase<K,...
Definition: AListInnerBase.cs:285
Loyc.Collections.ListExt.RemoveRange< T >
static void RemoveRange< T >(this IList< T > list, int index, int count)
Removes count items from list starting at the specified index.
Definition: ListExt.cs:148
Loyc.Collections.ListExt.Zip< A, B >
static IEnumerable< Pair< A, B > > Zip< A, B >(this IEnumerable< A > a, IEnumerable< B > b)
Returns a sequence of length Min(a.Count(), b.Count()) of items from a and b paired together....
Definition: ListExt.cs:216
Loyc.Syntax.CodeSymbols.SwitchExpr
static readonly Symbol SwitchExpr
e.g. @'switch(x, { ... }); <=> x switch { ... }
Definition: CodeSymbols.cs:149
Loyc.Collections.MSet.CountMemory
long CountMemory(int sizeOfT)
Measures the total size of all objects allocated to this collection, in bytes, including the size of ...
Definition: MSet.cs:444
Loyc.Collections.ReadOnlyAsCollection
A read-only wrapper that implements ICollection(T) and ISource(T), returned from LCExt....
Definition: SourceAsCollection.cs:35
Loyc.Syntax.Les.Les2PrinterOptions
Options to control the way Loyc trees are printed by Les2Printer.
Definition: Les2Printer.cs:672
Loyc.Geometry.IPoint3Base
This interface exists to work around a limitation of C#; use IPoint<T> instead.
Definition: IPoint3.cs:25
Loyc.Collections.MMap.GetAndRemove
Maybe< V > GetAndRemove(K key)
Gets the value associated with the specified key, then removes the pair with that key from the dictio...
Definition: MMap.cs:220
Loyc.Syntax.Les.DefaultNodePrinterWriter.Reset
override void Reset()
Called when a new, separate printing operation begins.
Definition: Les2PrinterWriter.cs:113
Loyc.Collections.BMultiMap.FindLowerBound
int FindLowerBound(K key)
Definition: BMultiMap.cs:346
Loyc.LLParserGenerator.IPGCodeGenHelper.GenerateAndPredCheck
LNode GenerateAndPredCheck(AndPred andPred, LNode code, int lookaheadAmt)
Generate code to check an and-predicate during or after prediction, e.g. &!{foo} becomes !...
Loyc.Collections.BList.FindUpperBound
int FindUpperBound(T item)
Finds the index of the first item in the list that is greater than the specified item.
Definition: BList.cs:385
Loyc.Collections.MMap.Clone
virtual MMap< K, V > Clone()
Creates a copy of this map in O(1) time, by marking the current root node as frozen.
Definition: MMap.cs:132
Loyc.Collections.Impl.CPIntTrie.TryGetValue
bool TryGetValue(int key, out TValue value)
Finds the specified key and gets its associated value, returning true if the key was found.
Definition: CPIntTrie.cs:499
Loyc.Syntax.Lexing.ILexer.SourceFile
ISourceFile SourceFile
The file being lexed.
Definition: ILexer.cs:17
Loyc.Collections.ListExt.InsertRangeHelper< T >
static void InsertRangeHelper< T >(IList< T > list, int index, int spaceNeeded)
Increases the list size by spaceNeeded and copies elements starting at list[index] "rightward" to mak...
Definition: ListExt.cs:661
Loyc.Math.INumTraits.MinInt
long MinInt
Returns the minimum integer that this type can represent.
Definition: Interfaces.cs:147
Loyc.Collections.MSet.SymmetricExceptWith
int SymmetricExceptWith(IEnumerable< T > other, bool xorDuplicates)
Definition: MSet.cs:243
Loyc.Syntax.LNodeFactory.Trivia
LNode Trivia(string suffix, object value)
Creates a trivia node named "%" + suffix with the specified Value attached.
Definition: LNodeFactory.cs:125
Loyc.MemoizedTypeName.NameWithGenericParams
static string NameWithGenericParams(this Type t)
Extension method on Type that is an alias for the Get method.
Definition: MemoizedTypeName.cs:61
Loyc.Collections.AListBase.ObserverMgr.CheckPoint
void CheckPoint()
Called when a tree modification operation is completed.
Definition: AListNodeObserver.cs:131
Loyc.Collections.ListChangeInfo
Contains information about how a collection is about to change.
Definition: ListChangeInfo.cs:19
Loyc.Utilities.Statistic
A lightweight class to help you compute the minimum, maximum, average and standard deviation of a set...
Definition: Statistic.cs:15
Loyc.MessageFilter.IsEnabled
bool IsEnabled(Severity level)
Returns true if Filter(type, null) and target.IsEnabled(type) are both true.
Definition: WrapperSinks.cs:118
Loyc.Math.INumTraits.IsNaN
bool IsNaN(T value)
Returns true if the given value is not a number (can only be true for floats).
Loyc.Syntax.Impl.PrinterState.RevokeOrCommitNewlines
int RevokeOrCommitNewlines(Checkpoint cp, int maxLineWidth)
Revokes or commits newlines added since the specified checkpoint. Recent newlines are revoked if the ...
Definition: PrinterState.cs:147
Loyc.Collections.MaxHeap.TryPop
T TryPop(out bool isEmpty)
Removes the largest item from the heap (or smallest item, if this is a MinHeap).
Definition: Heap.cs:161
Loyc.Collections.AListBase.FirstIndexOf
int? FirstIndexOf(T item, int startIndex, EqualityComparer< T > comparer=null)
Scans the list starting at startIndex and going upward, and returns the index of an item that matches...
Definition: AListBase.cs:624
Loyc.LLParserGenerator.IPGCodeGenHelper.BeginRule
void BeginRule(Rule rule)
Notifies the snippet generator that code generation is starting for a new rule.
Loyc.Syntax.SourceRange
Holds a reference to a source file (ISourceFile<char>) and the beginning and end indices of a range i...
Definition: SourceRange.cs:15
Loyc.Utilities.BloomFilterM64K2
A bloom filter for very small sets.
Definition: BloomFilterM64K2.cs:33
Loyc.Collections.Impl.AListNode.RemoveAt
abstract bool RemoveAt(uint index, uint count, IAListTreeObserver< K, T > tob)
Removes an item at the specified index.
Loyc.Syntax.Les.Les3PrinterOptions
Definition: Les3Printer.cs:1397
Loyc.LLParserGenerator.CodeGenHelperBase.CallTryRecognizer
virtual LNode CallTryRecognizer(RuleRef rref, int lookahead)
Generates a call to the Try_Scan_*() function that wraps around a Scan_*() recognizer....
Definition: CodeGenHelperBase.cs:454
Loyc.Either.NewRight
static Either< L, R > NewRight(R value)
Simply calls the constructor. This method exists to make it possible to construct an Either when both...
Loyc.Collections.Impl.AListInnerBase< int, T >::BinarySearchI
int BinarySearchI(uint index)
Performs a binary search for an index.
Definition: AListInnerBase.cs:190
LeMP.MacroMode.DropRemainingListItems
@ DropRemainingListItems
If this macro succeeds, all nodes after this one in the current attribute or statement/argument list ...
Loyc.Syntax.NodeStyle.VerbatimId
@ VerbatimId
Indicates that an identifier was marked in the standard way used to indicate that it contained specia...
Loyc.Syntax.Lexing.LexerSource.PrintChar
new void PrintChar(int c, StringBuilder sb)
Definition: LexerSource.cs:164
Loyc.Syntax.BaseParserForList.Reset
virtual void Reset(List list, Token eofToken, ISourceFile file, int startIndex=0)
Reinitializes the object. This method is called by the constructor.
Definition: BaseParserForList.cs:77
Loyc.StringBuilderExt.EndsWith
static bool EndsWith(this StringBuilder sb, UString what, bool ignoreCase=false)
Finds out whether the StringBuilder ends with the specified substring.
Definition: StringBuilderExt.cs:127
Loyc.LLPG
Contains macros for using LLLPG in LeMP.
Definition: Macros.cs:18
Loyc.Syntax.BaseParserForList.BaseParserForList
BaseParserForList(List list, Token eofToken, ISourceFile file, int startIndex=0)
Initializes this object to begin parsing the specified tokens.
Definition: BaseParserForList.cs:70
Loyc.Ecs.EcsPrinterOptions.NewlineOptions
NewlineOpt NewlineOptions
Controls the locations where newlines should be emitted.
Definition: EcsNodePrinter.cs:1378
Loyc.Ecs.EcsValidators.IsPropertyDefinition
static bool IsPropertyDefinition(LNode n, out LNode retType, out LNode name, out LNode args, out LNode body, out LNode initialValue, Pedantics p=Pedantics.Lax)
Returns true iff the given node has a valid syntax tree for a property definition,...
Definition: EcsValidators.cs:267
Loyc.Syntax.Lexing.Token.SourceText
UString SourceText(ICharSource chars)
Gets the original source text for a token if available, under the assumption that the specified sourc...
Definition: Token.cs:313
Loyc.Syntax.ParseNumberFlag.SkipSpacesInFront
@ SkipSpacesInFront
Skip spaces before the number. Without this flag, initial spaces make parsing fail.
Loyc.Syntax.Lexing.Token.EndIndex
int EndIndex
Returns StartIndex + Length.
Definition: Token.cs:281
Loyc.Syntax.BaseParserForList.TokenList
List TokenList
The IList{Token} that was provided to the constructor, if any.
Definition: BaseParserForList.cs:97
Loyc.Collections.LinqToLists.Take< T >
static Slice_< T > Take< T >(this IListSource< T > list, int count)
Returns a slice of the specified number of elements from the beginning of the list,...
Definition: LinqToLists.out.cs:92
Loyc.LLParserGenerator.Gate.Predictor
Pred Predictor
Left-hand side of the gate, which is used for prediction decisions.
Definition: Predicates.cs:765
Loyc.Collections.ListSourceAsList
Adapter: a read-only wrapper that implements IList(T) and IListSource(T), returned from LCExt....
Definition: ListSourceAsList.cs:36
Loyc.Collections.Bijection.Bijection
Bijection()
Constructs a bijection out of two Dictionary<TKey,TValue> objects.
Definition: Bijection.cs:42
Loyc.LLParserGenerator.IntStreamCodeGenHelper
Standard code generator for character/integer input streams and is the default code generator for LLP...
Definition: IntStreamCodeGenHelper.cs:17
Loyc.LogException.Msg
LogMessage Msg
Contains additional information about the error that occurred.
Definition: LogException.cs:30
Loyc.Syntax.ParsingService.ParseSingle
static LNode ParseSingle(this IParsingService parser, UString expr, IMessageSink msgs=null, ParsingMode inputType=null, bool preserveComments=true)
Parses a string and expects exactly one output.
Definition: IParsingService.cs:229
Loyc.Collections.ListExt.ZipLeft< A, B >
static IEnumerable< Pair< A, B > > ZipLeft< A, B >(this IEnumerable< A > a, IEnumerable< B > b, B defaultB)
Returns a sequence that has the same length as the first sequence, with items from the first and seco...
Definition: ListExt.cs:229
Loyc.Ecs.Parser
Enhanced C# parser
Definition: EcsLexer.cs:16
Loyc.Collections.LCInterfaces.SwapIfPresent< K, V >
static Maybe< V > SwapIfPresent< K, V >(this IDictionaryEx< K, V > dict, K key, V value)
Replaces an item in the map if the key was already present. If the key was not already present,...
Definition: IDictionaryEx.cs:148
Loyc.Collections.Impl.InternalSet.IntersectWith
int IntersectWith(IEnumerable< T > other, IEqualityComparer< T > comparer)
Removes all items from this set that are not present in 'other'.
Definition: InternalSet.cs:1374
Loyc.Collections.Set.SetEquals
bool SetEquals(ISet< T > other)
Definition: Set.cs:171
Loyc.Syntax.LNodeExt.PlusTrailingTrivia
static LNode PlusTrailingTrivia(this LNode node, LNode trivia)
Adds additional trailing trivia to a node.
Definition: LNodeExt.cs:82
Loyc.Syntax.CodeSymbols.Assembly
static readonly Symbol Assembly
e.g. [assembly: Foo] <=> #assembly(Foo);
Definition: CodeSymbols.cs:179
Loyc.Collections.IRangeEx
A random-access range that can perform operations such as intersection and overlap tests on pairs of ...
Definition: IRanges.cs:343
Loyc.Collections.Impl.ListExBase
A base class for classes that wish to implement IListEx<T>. Provides default implementations for most...
Definition: ListExBase.cs:12
Loyc.Collections.LinqToLists
This class enhances LINQ-to-Objects with extension methods that preserve the interface (e....
Definition: LinqToLists.out.cs:26
Loyc.Syntax.CodeSymbols.Out
static readonly Symbol Out
"#out": out x <=> [#out] x
Definition: CodeSymbols.cs:98
Loyc.Collections.Impl.AListInnerBase< int, T >::HandleChildSplit
AListInnerBase< K, T > HandleChildSplit(int i, AListNode< K, T > splitLeft, ref AListNode< K, T > splitRight, IAListTreeObserver< K, T > tob)
Inserts a slot after _children[i], increasing _childCount and replacing [i] and [i+1] with splitLeft ...
Definition: AListInnerBase.cs:253
Loyc.Collections.IAddRange< T >
Loyc.LLParserGenerator.CodeGenHelperBase.ShouldGenerateSwitch
virtual bool ShouldGenerateSwitch(IPGTerminalSet[] sets, MSet< int > casesToInclude, bool hasErrorBranch)
Decides whether to use a switch() and for which cases, using BaseCostForSwitch and GetRelativeCostFor...
Definition: CodeGenHelperBase.cs:314
Loyc.Syntax.Lexing.LexerSource.Error
virtual new void Error(int lookaheadIndex, string format, params object[] args)
This method is called to format and handle errors that occur during lexing. The default implementatio...
Definition: LexerSource.cs:158
Loyc.Syntax.ParsingMode.Types
static readonly ParsingMode Types
Tells IParsingService.Parse to treat the input as a list of types (or a single type,...
Definition: ParsingMode.cs:32
Loyc.G.BoxedFalse
static readonly object BoxedFalse
Singleton false cast to object.
Definition: G.cs:130
Loyc.Syntax.LNodeFactory
Contains helper methods for creating LNodes. An LNodeFactory holds a reference to the current source ...
Definition: LNodeFactory.cs:18
Loyc.Collections.WListProtected.BlockChainLength
int? BlockChainLength
Gets the number of blocks used by this list.
Definition: WListBase.cs:315
Loyc.Syntax.Les.Les2PrinterOptions.SpacesBetweenAppendedStatements
bool SpacesBetweenAppendedStatements
Whether to add a space between multiple statements printed on one line (initial value: true).
Definition: Les2Printer.cs:730
Loyc.Collections.Impl.InternalSetStats.ItemCount
int ItemCount
Number of items in the set.
Definition: InternalSet.cs:1696
Loyc.Syntax.Lexing.Token.Value
object Value
The parsed value of the token.
Definition: Token.cs:275
Loyc.EzStopwatch.Millisec
int Millisec
Gets or sets the current time on the clock.
Definition: EzStopwatch.cs:71
Loyc.Syntax.CodeSymbols.Catch
static readonly Symbol Catch
"#catch" catch clause of #try statement: #catch(#var(Exception,e), whenExpr, {...})
Definition: CodeSymbols.cs:151
Loyc.Collections.NegListSource.ToString
override string ToString()
Returns ToString() of the wrapped list.
Definition: NegListSource.cs:119
Loyc.Syntax.LNode.With
virtual CallNode With(Symbol target, VList< LNode > args)
Creates a CallNode with the same attributes and Range, but a different target and argument list....
Definition: LNode.cs:410
Loyc.Collections.Impl.AListNode
Internal implementation class. Base class for tree nodes in a list class derived from AListBase<T>....
Definition: AListNode.cs:55
Loyc.Syntax.Lexing.ISimpleToken
Basic information about a token as expected by BaseParser<Token>: a token Type, which is the type of ...
Definition: Token.cs:538
Loyc.Syntax.Lexing.ILllpgApi
For reference purposes, this interface is a list of the non-static methods that LLLPG expects to be a...
Definition: ILllpgApi.cs:31
Loyc.Maybe
Definition: Maybe.cs:9
Loyc.WrapperBase.ToString
override string ToString()
Returns ToString() of the wrapped object.
Definition: WrapperBase.cs:34
Loyc.MiniTest.Assert.Success
static void Success(string format, params object[] args)
Stops a test via StopTestHandler, which, by default, throws a SuccessException.
Definition: MiniTest.cs:308
Loyc.Syntax.StreamCharSource
Exposes a stream as an ICharSource, as though it were an array of characters. The stream must support...
Definition: StreamCharSource.cs:47
Loyc.Collections.SelectList
Helper class: provides a modified view of an IList by transforming each element on-demand....
Definition: SelectListSource.out.cs:25
Loyc.Collections.Bijection.Bijection
Bijection(IDictionary< K1, K2 > cur, IDictionary< K2, K1 > inv)
Constructs a bijection out of two existing dictionaries.
Definition: Bijection.cs:74
Loyc.Syntax.Lexing.Token.ToLNode
LNode ToLNode(ISourceFile file)
Converts a Token to a LNode.
Definition: Token.cs:444
Loyc.Syntax.ILNode.Calls
bool Calls(Symbol name, int argCount)
Returns true if Name == name and Max + 1 == argCount (which implies Kind == LNodeKind....
Loyc.UString.Replace
UString Replace(UString what, UString replacement, bool ignoreCase=false, int maxReplacements=int.MaxValue)
Returns a new string in which all occurrences (or a specified number of occurrences) of a specified s...
Definition: UString.cs:538
Loyc.Collections.ROLSlice.ROLSlice
ROLSlice(TList list, int start, int count=int.MaxValue)
Initializes a slice.
Definition: ROLSlice.cs:38
Loyc.Collections.INegListSource.Slice
IRange< T > Slice(int start, int count=int.MaxValue)
Returns a sub-range of this list.
Loyc.Syntax.CodeSymbols.AndBitsAssign
static readonly Symbol AndBitsAssign
"&=" bitwise-and-with operator
Definition: CodeSymbols.cs:124
Loyc.Syntax.LNode.CallsMin
virtual bool CallsMin(Symbol name, int minArgCount)
Returns true if this is a call with the specified name and the specified minimum number of arguments.
Definition: LNode.cs:710
Loyc.Syntax.Les.Les3PrecedenceMap
Definition: LesPrecedenceMap.cs:319
Loyc.Syntax.LNode.Missing
static readonly IdNode Missing
The empty identifier, used to represent missing information.
Definition: LNode.cs:75
Loyc.Collections.MMap.AddRange
int AddRange(IEnumerable< KeyValuePair< K, V >> data, DictEditMode mode)
Merges the contents of the specified sequence into this map.
Definition: MMap.cs:167
Loyc.Utilities.GoAliasAttribute
This attribute is applied to a method of an interface to specify alternate names that a method can ha...
Definition: GoInterface.cs:2010
Loyc.Collections.Map.Union
Map< K, V > Union(MapOrMMap< K, V > other)
Returns a copy of the current map with the specified items added; each item is added only if the key ...
Definition: Map.cs:303
Loyc.Syntax.LiteralNode.Clone
abstract override LNode Clone()
Creates a copy of the node. Since nodes are immutable, there is little reason for an end-user to call...
Loyc.Collections.NegListSlice.NegListSlice
NegListSlice(INegListSource< T > list, int start, int count=int.MaxValue)
Initializes a slice.
Definition: NegListSlice.cs:45
LeMP.Tests.TestMatchCodeMacro
Definition: TestMatchCodeMacro.cs:10
Loyc.LLParserGenerator.IntStreamCodeGenHelper.GenerateMatchExpr
override LNode GenerateMatchExpr(IPGTerminalSet set_, bool savingResult, bool recognizerMode)
Generate code to match a set, e.g. MatchRange('a', 'z'); or MatchExcept(' ', '\r'); }....
Definition: IntStreamCodeGenHelper.cs:165
Loyc.Threading.ThreadEx.PropagateVariables
static ThreadDestructor PropagateVariables(int parentThreadId)
Manually initializes ThreadLocalVariable<T> objects in a thread that may not have been started via Th...
Definition: ThreadEx.cs:209
Loyc.Syntax.Lexing
Contains classes related to lexical analysis, such as the universal token type (Loyc....
Definition: NamespaceDocs.cs:111
Loyc.StringBuilderExt.TrimStart
static StringBuilder TrimStart(this StringBuilder sb, params char[] trimChars)
Removes all leading occurrences of the specified set of characters from the StringBuilder object.
Definition: StringBuilderExt.cs:40
Loyc.Collections.InvertibleSet.IsSupersetOf
bool IsSupersetOf(InvertibleSet< T > other)
TODO NOT IMPLEMENTED Returns true if all items in the other set are present in this set.
Definition: InvertibleSet.cs:132
Loyc.Collections.FWList.SmartSelect
FWList< T > SmartSelect(Func< T, T > map)
Maps a list to another list of the same length.
Definition: FWList.cs:191
LeMP.Compiler
A class that helps you invoke MacroProcessor on on a set of source files, given a set of command-line...
Definition: Compiler.cs:32
Loyc.Collections.MSet.IsProperSupersetOf
bool IsProperSupersetOf(ISet< T > other)
Definition: MSet.cs:283
Loyc.LLParserGenerator.CodeGenHelperBase.CallRule
virtual LNode CallRule(RuleRef rref, bool recognizerMode)
Generates code to call a rule based on rref.Rule.Name and rref.Params.
Definition: CodeGenHelperBase.cs:433
Loyc.Syntax.CodeSymbols.LE
static readonly Symbol LE
"<=" Less-than-or-equal-to operator
Definition: CodeSymbols.cs:52
LeMP.Tests.TestStaticMatchCodeMacro
Definition: TestStaticMatchCodeMacro.cs:10
Loyc.Collections.Impl.AListNode.TotalCount
abstract uint TotalCount
Gets the total number of (T) items in this node and all children
Definition: AListNode.cs:158
Loyc.Geometry.IPoint3Base.Z
new T Z
Z coordinate of a point or vector.
Definition: IPoint3.cs:32
Loyc.Collections.AListBase.ObserverMgr.NodeRemoved
void NodeRemoved(AListNode< K, T > child, AListInnerBase< K, T > parent)
Called when a child node is removed from an inner node.
Definition: AListNodeObserver.cs:100
Loyc.Syntax.Les.Les3PrettyPrinter.GetDefaultCssClassTable
static string[] GetDefaultCssClassTable()
The lookup table of strings for control codes (LesColorCode values) to HTML classes.
Definition: Les3PrettyPrinter.cs:160
Loyc.Syntax.CallNode.Calls
override bool Calls(Symbol name, int argCount)
Returns true if Name == name and Max + 1 == argCount (which implies Kind == LNodeKind....
Definition: AbstractNodes.cs:136
Loyc.Math.IOrdered
Provides comparison function for type T along with absolute value (Abs), and the minimum or maximum o...
Definition: Interfaces.cs:44
Loyc.LLParserGenerator.AndPred.CheckErrorMessage
string CheckErrorMessage
Error string passed to Check() in the generated code if the predicate is not matched....
Definition: Predicates.cs:901
Loyc.Syntax.BaseParser.ToString
abstract string ToString(MatchType tokenType)
Returns a string representation of the specified token type. These strings are used in error messages...
Loyc.Ecs.EcsPrinterOptions
Options to control the way EcsNodePrinter's output is formatted.
Definition: EcsNodePrinter.cs:1257
Loyc.Collections.AListBase.AListBase
AListBase(AListBase< K, T > original, AListNode< K, T > section)
This is the constructor that CopySection(), which can be defined by derived classes,...
Definition: AListBase.cs:259
Loyc.Compatibility.EnumStatic
Implements Enum.TryParse in .NET 3.5
Definition: Enum.cs:9
Loyc.Collections.ListExt.Swap< T >
static void Swap< T >(this IList< T > list, int i, int j)
Swaps list[i] with list[j].
Definition: ListExt.cs:533
Loyc.Ecs.Parser.EcsLexer
Lexer for EC# source code (see ILexer<Token>).
Definition: EcsLexer.cs:22
Loyc.Collections.LCInterfaces.Items< T >
static IEnumerable< KeyValuePair< int, T > > Items< T >(this ISparseListSource< T > list)
Returns the non-cleared items in the sparse list, along with their indexes, sorted by index.
Definition: ISparseList.cs:110
Loyc.Syntax.ParseHelpers.SkipSpaces
static UString SkipSpaces(UString s)
Returns a string with any spaces and tabs removed from the beginning.
Definition: ParseHelpers.cs:597
Loyc.LLParserGenerator.CodeGenHelperBase.Example
abstract string Example(IPGTerminalSet set)
Returns an example of an item in the set. If the example is a character, it should be surrounded by s...
Loyc.Collections.WListProtected
WList implementation in which the WList operations are only accessible to a derived class.
Definition: WListBase.cs:30
Loyc.Collections.KeyCollection
Adapter: this is a read-only collection of Keys read from a generic IDictionary. It is a modified ver...
Definition: KeyCollection.cs:50
Loyc.Geometry.IPointBase
This interface exists to work around a limitation of C#; use IPoint<T> instead.
Definition: IPoint.cs:27
Loyc.Collections.Map
An immutable dictionary.
Definition: Map.cs:194
Loyc.Syntax.LNodeExt.PlusTrailingTrivia
static LNode PlusTrailingTrivia(this LNode node, VList< LNode > trivia)
Adds additional trailing trivia to a node.
Definition: LNodeExt.cs:77
Loyc.Collections.DictionaryExt.TryGetValueSafe< K, V >
static bool TryGetValueSafe< K, V >(this IDictionary< K, V > dict, K key, out V value)
Same as IDictionary.TryGetValue() except that this method does not throw an exception when key==null ...
Definition: DictionaryExt.cs:75
Loyc.Collections.AListBase.ObserverMgr.IllegalException
virtual void IllegalException(Exception e)
Called when an observer throws something and the exception is being swallowed (because IAListTreeObse...
Definition: AListNodeObserver.cs:127
LeMP.MacroMode.PriorityMask
@ PriorityMask
For internal use to isolate the priority of a macro.
Loyc.Collections.MSet.Clone
virtual MSet< T > Clone()
Fast-clones the set in O(1) time.
Definition: MSet.cs:131
Loyc.Collections.LCInterfaces.HasIndex< T >
static bool HasIndex< T >(this IListSource< T > list, int index)
Uses list.TryGet(index) to find out if the specified index is valid.
Definition: IListSource.cs:151
Loyc.Collections.NumRange.Enumerator
Definition: NumRange.cs:124
Loyc.LLParserGenerator.CodeGenHelperBase.InputClass
LNode InputClass
Specifies a class or namespace to use when calling static functions. There is only one currently: New...
Definition: CodeGenHelperBase.cs:58
Loyc.Collections.Impl.AListIndexer.ReconstructIndex
int ReconstructIndex(T item, AListLeafBase< K, T > leaf)
Given an item and a leaf that is known to contain a copy of the item, this method returns the index o...
Definition: AListIndexer.cs:213
Loyc.Syntax.BaseParser.BaseParser
BaseParser(ISourceFile file=null, int startIndex=0)
Initializes the base class.
Definition: BaseParser.cs:32
Loyc.Collections.BList._compareItems
Func< T, T, int > _compareItems
Compares two items. See Comparison<T>.
Definition: BList.cs:114
Loyc.Collections.Set.IsProperSupersetOf
bool IsProperSupersetOf(IEnumerable< T > other)
Definition: Set.cs:164
Loyc.Utilities.Co.GetEnumerator
IEnumerator< T > GetEnumerator()
Enumerates the underlying sequence.
Definition: Co.cs:83
Loyc.SymbolPool.Get
virtual void Get(string name, int id, out Symbol sym)
Workaround for lack of covariant return types in C#
Definition: Symbol.cs:287
Loyc.Collections.AList.Prepend
virtual void Prepend(AList< T > other, bool move)
Prepends an AList to this list in sublinear time.
Definition: AList.cs:347
Loyc.LLParserGenerator.CodeGenHelperBase.GenerateAndPredCheck
virtual LNode GenerateAndPredCheck(AndPred andPred, LNode code, int li)
Generate code to check an and-predicate during or after prediction, e.g. &!{foo} becomes !...
Definition: CodeGenHelperBase.cs:222
Loyc.Syntax.LNode.Source
ISourceFile Source
Returns the source file (shortcut for Range.Source).
Definition: LNode.cs:225
Loyc.Syntax.LNodeFactory.Trivia
LNode Trivia(Symbol name, object value, int startIndex=-1, int endIndex=-1)
Creates a trivia node with the specified Value attached.
Definition: LNodeFactory.cs:132
Loyc.Collections.VListBlockOfTwo.VListBlockOfTwo
VListBlockOfTwo(T firstItem, T secondItem, bool mutable)
Initializes a block with two items.
Definition: VListBlockOfTwo.cs:33
Loyc.Symbol
Represents a symbol, which is a singleton string that supports fast comparisons and extensible enums.
Definition: Symbol.cs:64
Loyc.Ecs.EcsValidators.IsPrintableTypeParam
static bool IsPrintableTypeParam(LNode n, Pedantics p=Pedantics.Lax)
Checks if 'n' is a legal type parameter definition.
Definition: EcsValidators.cs:498
Loyc.Syntax.Les.TokenExt
Provides the Type() extension method required by Token and the ToString(Token) method to express an L...
Definition: TokenType.cs:49
Loyc.Collections.VListBlock.AddRange
static VList< T > AddRange(VListBlock< T > self, int localCount, IEnumerator< T > items)
Adds a list of items to an immutable VList (not a FVList).
Definition: VListBlock.cs:505
Loyc.Collections.NegList.TryGet
T TryGet(int index, out bool fail)
Definition: NegList.cs:88
Loyc.Collections.BMultiMap.FindLowerBoundExact
int FindLowerBoundExact(ref K key, out V value, out bool found)
Does the same thing as IndexOfExact, but with the same set of arguments as FindLowerBound including t...
Definition: BMultiMap.cs:405
Loyc.Syntax.LNodePrinter
Standard extension methods for ILNodePrinter.
Definition: ILNodePrinter.cs:41
Loyc.Collections.EmptyEnumerator
Helper class: an empty enumerator.
Definition: EmptyEnumerator.cs:10
Loyc.G.PutInRange
static double PutInRange(this double n, double min, double max)
Returns num clamped to the range min and max.
Definition: GRange.out.cs:116
Loyc.Syntax.NodeStyle.Default
@ Default
No style category is specified; the printer should choose a style automatically.
Loyc.Math.INumTraits.MaxValue
T MaxValue
Maximum value of this type below infinity.
Definition: Interfaces.cs:98
Loyc.Syntax.BaseParserForList.Down
bool Down(List children)
Switches to parsing the specified token list at position zero (typically the value of Loyc....
Definition: BaseParserForList.cs:150
Loyc.Collections.ListChangingHandler< T >
delegate void ListChangingHandler< T >(IListSource< T > sender, ListChangeInfo< T > args)
Represents the method that handles the INotifyListChanging<T>.ListChanging event.
Loyc.LLParserGenerator.LlpgBugsAndSlugs
Tests for known slugs (slowness bugs) and fixed bugs (regressions)
Definition: LlpgBugsAndSlugs.cs:10
Loyc.Syntax.Les.Les2PrinterOptions.PrintTriviaExplicitly
override bool PrintTriviaExplicitly
Causes comments and spaces to be printed as attributes in order to ensure faithful round-trip parsing...
Definition: Les2Printer.cs:693
Loyc.Collections.CG.Cache
static object Cache(short o)
Special overload to avoid treating argument as int32 in C#.
Definition: CG.cs:54
Loyc.Localize.SetLocalizer
static SavedThreadLocal< LocalizerDelegate > SetLocalizer(LocalizerDelegate newValue)
Sets the localizer method.
Definition: Localize.cs:236
Loyc.Syntax.CodeSymbols.Trait
static readonly Symbol Trait
e.g. #trait(Foo, #(IFoo), { }); <=> trait Foo : IFoo { }
Definition: CodeSymbols.cs:157
Loyc.Syntax.CodeSymbols.OrBitsAssign
static readonly Symbol OrBitsAssign
"|=" set-bits operator
Definition: CodeSymbols.cs:125
Loyc.G.BoxedVoid
static readonly object BoxedVoid
Singleton void cast to object.
Definition: G.cs:132
LeMP.MacroProcessor.MacroProcessor
MacroProcessor(IMessageSink sink)
Initializes MacroProcessor with default prelude.
Definition: MacroProcessor.cs:92
Loyc.Ecs.EcsLanguageService.Print
void Print(IEnumerable< LNode > nodes, StringBuilder target, IMessageSink sink=null, ParsingMode mode=null, ILNodePrinterOptions options=null)
Serializes a list of syntax trees to a StringBuilder in the syntax supported by this object.
Definition: EcsLanguageService.cs:54
Loyc.Collections.AList.Sort
void Sort(int start, int subcount, Comparison< T > comp)
Definition: AList.cs:375
Loyc.Threading.ThreadEx.Join
void Join()
Blocks the calling thread until a thread terminates, while continuing to perform standard COM and Sen...
Definition: ThreadEx.cs:261
Loyc.Syntax.LNode.Equals
virtual bool Equals(ILNode other, CompareMode mode)
Compares two nodes for structural equality. Two nodes are considered equal if they have the same kind...
Definition: LNode.cs:668
Loyc.Collections.Impl.AListLeafBase
Definition: AListLeaf.cs:8
Loyc.Localize.Localized
static string Localized(this Symbol resourceId, [Localizable] string message, params object[] args)
This is the heart of the Localize class, which localizes and formats a string.
Definition: Localize.cs:320
Loyc.Ecs.Parser.EcsTriviaInjector.DoneAttaching
override LNode DoneAttaching(LNode node, LNode parent, int indexInParent)
This method is called after a node has been processed and any applicable trivia was attached.
Definition: EcsTriviaInjector.cs:75
Loyc.StringExt.FormatCore
static string FormatCore(this string format, params object[] args)
This formatter works like string.Format, except that named placeholders accepted as well as numeric p...
Definition: StringExt.cs:167
Loyc.Collections.UpCastSource
Helper class for treating a collection of a derived type as a collection of a base type or interface.
Definition: LCExtensions.cs:104
Loyc.Syntax.Impl
Definition: PrinterState.cs:9
Loyc.MiniTest.Assert.Inconclusive
static void Inconclusive(string format, params object[] args)
Stops a test via StopTestHandler, which, by default, throws an InconclusiveException....
Definition: MiniTest.cs:301
Loyc.Collections.Impl.AListIndexer.CheckPoint
void CheckPoint()
Called when a tree modification operation is completed.
Definition: AListIndexer.cs:153
Loyc.Collections.Impl.AListInnerBase< int, T >
Loyc.Collections.CPTrie.Remove
bool Remove(ref KeyWalker key, ref T value)
Removes the specified key and associated value.
Definition: CPTrie.cs:204
Loyc.Math.INumTraits
This interface provides information about a numeric type T.
Definition: Interfaces.cs:93
Loyc.Collections.Impl.CPIntTrie.LongEnumerator
Definition: CPIntTrie.cs:883
Loyc.LLParserGenerator.GeneralCodeGenHelper.GenerateSetDecl
override LNode GenerateSetDecl(IPGTerminalSet set_, Symbol setName)
Generates a declaration for a variable that holds the set.
Definition: GeneralCodeGenHelper.cs:173
LeMP.Tests.TestSetOrCreateMemberMacro
Definition: TestSetOrCreateMemberMacro.cs:11
Loyc.Ecs.EcsValidators.SpaceDefinitionKind
static Symbol SpaceDefinitionKind(LNode n, out LNode name, out LNode bases, out LNode body, Pedantics p=Pedantics.Lax)
Returns the space kind, which is one of the names #struct, #class, #enum, #interface,...
Definition: EcsValidators.cs:143
Loyc.Collections.FWList.First
T First
Returns the front item of the list (at index 0).
Definition: FWList.cs:227
Loyc.Collections.Impl.InternalSet.IsProperSupersetOf
bool IsProperSupersetOf(ISet< T > other, IEqualityComparer< T > thisComparer, int myExactCount)
Returns true if all items in the other set are present in this set, and this set has at least one ite...
Definition: InternalSet.cs:1581
Loyc.Collections.WeakKeyDictionary
A dictionary with weak keys.
Definition: WeakKeyDictionary.cs:13
Loyc.Collections.VListBlockArray.FGet
override T FGet(int index, int localCount)
Gets an item at distance 'index' from the front (beginning of an FVList)
Definition: VListBlockArray.cs:99
Loyc.Collections.FWList.Pop
T Pop()
Removes the front item (at index 0) from the list and returns it.
Definition: FWList.cs:239
Loyc.Collections.LinqToLists.ToArray< T >
static T[] ToArray< T >(this IReadOnlyList< T > c)
Copies the contents of a list to an array.
Definition: LinqToLists.out.cs:187
Loyc.ExceptionExt.InnermostException
static Exception InnermostException(this Exception ex)
Gets the innermost InnerException, or ex itself if there are no inner exceptions.
Definition: Extensions.cs:55
Loyc.Collections.SparseAList.Append
virtual void Append(SparseAList< T > other)
Definition: SparseAList.cs:191
Loyc.Collections.Impl.AListIndexer.CountMemory
long CountMemory(int sizeOfElement)
Counts memory used by the index itself (not including the AList nodes)
Loyc.Utilities.SimpleTimer.Restart
int Restart()
Restarts the timer from zero (unpausing it if it is paused), and returns the number of elapsed millis...
Definition: SimpleTimer.cs:46
Loyc.Collections.ListSourceAsSparse.NextLowerItem
T NextLowerItem(ref int? index)
Decreases index by at least one to reach the next index that is not classified as empty space,...
Definition: ListSourceAsSparse.cs:71
Loyc.Threading.SavedThreadLocal
Designed to be used in a "using" statement to temporarily alter a ThreadLocal<T>.
Definition: SavedThreadLocal.cs:10
Loyc.Collections.LCExt.AsNegList< T >
static NegListSource< T > AsNegList< T >(this IListSource< T > list, int zeroOffset)
Definition: NegListSource.cs:17
Loyc.Syntax.ParserSource.Skip
new void Skip()
Definition: ParserSource.cs:81
Loyc.Syntax.CodeSymbols._AddressOf
static readonly Symbol _AddressOf
Alias for AndBits.
Definition: CodeSymbols.cs:60
Loyc.Syntax.CodeSymbols.OrBits
static readonly Symbol OrBits
"|" Bitwise or operator
Definition: CodeSymbols.cs:58
Loyc.LLParserGenerator.LLParserGenerator.Transition
Represents a position in a grammar (GrammarPos) plus the set of characters that leads to that positio...
Definition: KthSet.cs:116
Loyc.MessageSinkFromDelegate.MessageSinkFromDelegate
MessageSinkFromDelegate(WriteMessageFn writer, Func< Severity, bool > isEnabled=null)
Initializes this object.
Definition: BasicSinks.cs:179
Loyc.Collections.BDictionary.GetAndEdit
bool GetAndEdit(ref K key, ref V value, DictEditMode mode)
Combines a get and change operation into a single method call. You rarely need to call this method di...
Definition: BDictionary.cs:442
Loyc.Syntax.Les.Les3LanguageService.Parse
IListSource< LNode > Parse(ICharSource text, string fileName, IMessageSink msgs, ParsingMode inputType=null, bool preserveComments=true)
Parses a source file into one or more Loyc trees.
Definition: Les3LanguageService.cs:61
Loyc.Collections.Impl.CPIntTrie.ContainsKey
bool ContainsKey(int key)
Searches for the specified key, returning true if it is present in the trie.
Definition: CPIntTrie.cs:397
Loyc.LLParserGenerator.LLParserGenerator.Verbosity
int Verbosity
Gets or sets the verbosity level. Verbose output can help you debug grammars that don't produce the e...
Definition: LLParserGenerator.cs:113
Loyc.Geometry.ISizeReader.Height
T Height
Gets the height of a rectangle (the difference between Y coordinates).
Definition: IRectangle.cs:16
Loyc.Syntax.Lexing.BaseLexer.Spaces
void Spaces()
Skips past any spaces at the current position. Equivalent to rule Spaces @[ (' '|'\t')* ] in LLLPG.
Definition: BaseLexer.cs:280
Loyc.Syntax.LNodePrinter.Print
static string Print(this ILNodePrinter printer, LNode node, IMessageSink sink=null, ParsingMode mode=null, ILNodePrinterOptions options=null)
Serializes the specified syntax tree to a string in the syntax supported by the specified ILNodePrint...
Definition: ILNodePrinter.cs:45
LeMP.MacroProcessor.NextTempCounter
static int NextTempCounter
Gets the next number to use as a suffix for temporary variables (without incrementing).
Definition: MacroProcessor.cs:254
Loyc.Collections.IMBRange.Last
new T Last
Gets or sets the value of the last item in the range.
Definition: IRanges.cs:279
Loyc.Collections.VList.Equals
override bool Equals(object rhs_)
Returns whether the two list references are the same. Does not compare the contents of the lists.
Definition: VList.cs:138
Loyc.Syntax.EscapeC.ABFV
@ ABFV
Use \f and \v (rather than \xNN or \xNN)
Loyc.Collections.Impl.InternalList.NextLargerSize
static int NextLargerSize(int than)
As an alternative to the typical enlarging pattern of doubling the array size when it overflows,...
Definition: InternalList.cs:639
Loyc.Syntax.DescendantsFrame
Helper class used to enumerate LNode.Descendants().
Definition: DescendantsFrame.cs:46
Loyc.Collections.LCExt
Extension methods for Loyc Collection interfaces (such as IListSource<T>).
Definition: ICollectionSource.cs:50
Loyc.Collections.AList.Append
virtual void Append(AList< T > other)
Definition: AList.cs:310
Loyc.Utilities.SimpleTimer.Millisec
int?? Millisec
The getter returns the number of milliseconds since the timer was started; the resolution of this pro...
Definition: SimpleTimer.cs:35
LeMP.Tests.PreludeMacroTests_Les2
Definition: PreludeMacroTests_Les2.cs:12
Loyc.Collections.NegListSource.NegListSource
NegListSource(IListSource< T > list, int zeroOffset)
Initializes a NegListSource wrapper.
Definition: NegListSource.cs:63
LeMP.Tests.TestMacros
Definition: MacroProcessorTests.cs:17
Loyc.Syntax.CodeSymbols
A list of common symbols that have special meaning somewhere in Loyc or EC#: operators,...
Definition: CodeSymbols.cs:26
Loyc.LLParserGenerator.Pred.ResultSaver
Func< LNode, LNode > ResultSaver
A function that saves the result produced by the matching code of this predicate (null if the result ...
Definition: Predicates.cs:58
Loyc.StringBuilderExt.IndexOf
static int IndexOf(this StringBuilder sb, char value, int startIndex=0)
Gets the index of a character in a StringBuilder
Loyc.Syntax.BaseParser.ErrorSink
IMessageSink?? ErrorSink
Gets or sets the object to which error messages are sent. The default object is LogExceptionErrorSink...
Definition: BaseParser.cs:64
Loyc.Syntax.Lexing.TokensToTree.NextToken
override Maybe< Token > NextToken()
Returns the next (postprocessed) token. This method should set the _current field to the returned val...
Definition: TokensToTree.cs:47
Loyc.NullMessageSink
Discards all messages. However, there is a Count property that increases by one with each message rec...
Definition: BasicSinks.cs:102
LeMP.IMacroContext.Parent
LNode Parent
Gets the logical parent of the current node, which is Ancestors[Ancestors.Count - 2],...
Definition: IMacroContext.cs:48
Loyc.Collections.DList
A compact auto-enlarging list that efficiently supports supports insertions at the beginning or end o...
Definition: DList.cs:23
Loyc.Syntax.CodeSymbols.NotBits
static readonly Symbol NotBits
Unary bitwise inversion operator.
Definition: CodeSymbols.cs:61
Loyc.IHasLocation
This interface allows an object to declare its "location".
Definition: IHasLocation.cs:19
Loyc.Utilities.GoInterface
Mainly for internal use by the other GoInterface classes.
Definition: GoInterface.cs:49
Loyc.Syntax.Lexing.BaseLexer.LineNumber
int LineNumber
Current line number. Starts at 1 for the first line, unless derived class changes it.
Definition: BaseLexer.cs:231
LeMP.Tests.TestCodeContractMacros
Definition: TestCodeContractMacros.cs:10
Loyc.Syntax.Les.Les2Lexer.SupportDotIndents
override bool SupportDotIndents()
The LES and EC# languages support "dot indents", which are lines that start with a dot (....
Definition: Les2Lexer.cs:68
Loyc.Syntax.Lexing.TokenTree
A list of Token structures along with the ISourceFile object that represents the source file that the...
Definition: Token.cs:31
Loyc.Syntax.LNode.Value
abstract object Value
Returns the value of a literal node, or NoValue.Value if this node is not a literal (IsLiteral is fal...
Definition: LNode.cs:351
Loyc.LLParserGenerator.LLParserGenerator.AddComments
bool AddComments
Whether to insert Specifies the default maximum lookahead for rules that do not specify a lookahead v...
Definition: LLParserGenerator.cs:117
Loyc.Syntax.Precedence.Left
readonly sbyte Left
Left and Right denote the precedence level on the left and right sides of an operator; see the remark...
Definition: Precedence.cs:248
Loyc.Syntax.IndexPositionMapper.Reset
void Reset(CharSource source, string fileName)
Reinitializes the object (as though the constructor were called again).
Definition: IndexPositionMapper.cs:63
Loyc.Collections.VListBlock.ReplaceAt
FVList< T > ReplaceAt(int localCount, T item, int distanceFromFront)
Replaces an item in a FVList with another, where localCount is the number of items in the FVList's fi...
Definition: VListBlock.cs:457
Loyc.Collections.MutableListExtensionMethods.LinqToLists.SkipNowWhile< T >
static ListSlice< T > SkipNowWhile< T >(this IList< T > list, Func< T, bool > predicate)
Returns a slice without the initial elements of the list that meet the specified criteria....
Definition: LinqToLists.out.cs:317
Loyc.Syntax.Les.Les3PrinterOptions.SpaceAroundInfixStopPrecedence
int SpaceAroundInfixStopPrecedence
The printer avoids printing spaces around infix (binary) operators that have the specified precedence...
Definition: Les3Printer.cs:1491
Loyc.MiniTest.TestException
An exception thrown when a method of Assert fails.
Definition: MiniTest.cs:184
Loyc.Syntax.CodeSymbols.Module
static readonly Symbol Module
e.g. [module: Foo] <=> [Foo] #module;
Definition: CodeSymbols.cs:180
Loyc.LLParserGenerator.Pred
Represents part of a grammar for the LLParserGenerator.
Definition: Predicates.cs:37
Loyc.Ecs.EcsValidators.SanitizeIdentifier
static string SanitizeIdentifier(string id)
Eliminates punctuation and special characters from a string so that the string can be used as a plain...
Definition: EcsValidators.cs:814
Loyc.Collections.BMultiMap.BMultiMap
BMultiMap(Func< K, K, int > compareKeys, Func< V, V, int > compareValues)
Initializes the map with the specified key and value comparers.<
Definition: BMultiMap.cs:75
Loyc.Syntax.CodeSymbols.IndexBracks
static readonly Symbol IndexBracks
Definition: CodeSymbols.cs:67
Loyc.MessageSinkFromDelegate
This helper class lets you implement IMessageSink with one or two delegates (a writer method,...
Definition: BasicSinks.cs:168
Loyc.Collections.IListEx
This interface combines the original IList(T) interface with others - IListSource(T),...
Definition: Extended interfaces.cs:74
LeMP.Compiler.ProcessArguments
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 o...
Definition: Compiler.cs:197
Loyc.UString.StartsWith
bool StartsWith(UString what, bool ignoreCase=false)
Determines whether this string starts with the specified other string.
Definition: UString.cs:497
Loyc.Syntax.Les.Les2PrinterOptions.ObeyRawText
bool ObeyRawText
Causes raw text to be printed verbatim, as the EC# printer does. When this option is false,...
Definition: Les2Printer.cs:726
LeMP.MacroMode.ProcessChildrenAfter
@ ProcessChildrenAfter
The macro's result is not reprocessed, but the result's children are processed. This flag only takes ...
Loyc.Syntax.Les.Les3Printer._isOneLiner
bool _isOneLiner
Indicates whether the NodeStyle.OneLiner flag is present on the current node or any of its parents....
Definition: Les3Printer.cs:64
Loyc.G.PutInRange
static int PutInRange(this int n, int min, int max)
Returns num clamped to the range min and max.
Definition: GRange.out.cs:31
Loyc.Collections.ListExt.Randomized< T >
static T[] Randomized< T >(this IReadOnlyList< T > list)
Quickly makes a copy of a list, as an array, in random order.
Definition: ListExt.cs:559
Loyc.MiniTest.Assert.Fail
static void Fail(string format, params object[] args)
Fails a test by invoking StopTestHandler.Value(), which, by default, throws an AssertionException.
Definition: MiniTest.cs:286
Loyc.Syntax.ParseHelpers.TryParseInt
static bool TryParseInt(string s, ref int index, out int result, int radix=10, bool skipSpaces=true)
Tries to parse a string to an integer. Unlike Int32.TryParse(string, out int), this method allows par...
Definition: ParseHelpers.cs:254
String
Definition: CollectionDebugView.cs:6
Loyc.Collections.MutableListExtensionMethods.IListExt.LastIndexWhere< T >
static int LastIndexWhere< T >(this IList< T > list, Func< T, bool > pred)
Gets the highest index at which a condition is true, or -1 if nowhere.
Loyc.Collections.Impl.AListNode.Insert
virtual AListNode< K, T > Insert(uint index, T item, out AListNode< K, T > splitRight, IAListTreeObserver< K, T > tob)
Inserts an item at the specified index. This method can only be called for ALists,...
Definition: AListNode.cs:67
Loyc.Utilities.CastOptions.NoUnwrap
@ NoUnwrap
If the object to be wrapped is already wrapped, GoInterface<Interface> will normally unwrap it before...
Loyc.MessageSinkWithContext.IsEnabled
bool IsEnabled(Severity level)
Returns true if messages of the specified type will actually be printed, or false if Write(type,...
Definition: WrapperSinks.cs:219
Loyc.Syntax.CodeSymbols.NullIndexBracks
static readonly Symbol NullIndexBracks
<tt>?[](foo, #(1, A)) <=> foo?[1, A] (TENTATIVE, may be changed later)
Definition: CodeSymbols.cs:77
Loyc.Collections.Impl.CPIntTrie.Remove
bool Remove(int key, ref TValue oldValue)
Removes the specified key and associated value, returning true if the entry was found and removed.
Definition: CPIntTrie.cs:466
Loyc.Collections.INegArray
This interface models the capabilities of an array: getting and setting elements by index,...
Definition: INegListSource.cs:126
Loyc.Ecs
Classes related to Enhanced C# (mostly found in Loyc.Ecs.dll).
Definition: EcsPrecedence.cs:9
Loyc.Collections.ArraySlice.ArraySlice
ArraySlice(T[] list, int start, int count)
Initializes an array slice.
Definition: ArraySlice.cs:40
Loyc.Utilities.GoInterface.NumberOfAmbiguousMethods
static int NumberOfAmbiguousMethods
The number of methods in the interface for which a matching method in T could not be found because T ...
Definition: GoInterface.cs:498
Loyc.Syntax.ParserSource.ParserSource
ParserSource(IEnumerator< Token > list, Token eofToken, ISourceFile file, int startIndex=0)
<inheridoc>
Definition: ParserSource.cs:140
Loyc.Collections.Impl.AListInnerBase.RemoveAt
override bool RemoveAt(uint index, uint count, IAListTreeObserver< K, T > tob)
Removes an item at the specified index.
Definition: AListInnerBase.cs:366
Loyc.Syntax.NodeStyle.InternalFlag
@ InternalFlag
Reserved for use by specific compilers/languages.
Loyc.Collections.AListBase.Remove
bool Remove(T item)
Finds a specific item and removes it. If duplicates of the item exist, only the first occurrence is r...
Definition: AList.cs:783
Loyc.Syntax.StreamCharSource._eofIndex
int _eofIndex
_eofIndex is the character index of EOF if it has been reached or, if not, the index of the first uns...
Definition: StreamCharSource.cs:66
Loyc.Syntax.Les.Les3PrettyPrinter.PrintToHtml
StringBuilder PrintToHtml(IEnumerable< ILNode > nodes, StringBuilder output=null, bool addPreCode=true)
Definition: Les3PrettyPrinter.cs:198
Loyc.StringExt
Extension methods for strings, such as SplitAt, Left, Right, FormatCore and Slice.
Definition: StringExt.cs:12
Loyc.Collections.AListBase.DetectSizeOverflow
void DetectSizeOverflow(int insertSize)
Throws OverflowException if inserting the specified number of items would cause Count to overflow.
Definition: AList.cs:677
Loyc.Collections.Impl.InternalSetStats
Statistics returned from InternalSet<T>.CountMemory.
Definition: InternalSet.cs:1687
Loyc.Collections.VListBlock.MuClear
abstract void MuClear(int localCountWithMutables)
Clears all mutable items in this chain, and clears the mutable flag. If this block owns mutable items...
Loyc.Utilities
Contains general-purpose classes that are not considered important enough to go directly into the Loy...
Definition: NamespaceDocs.cs:117
Loyc.Collections.MSet.IntersectWith
int IntersectWith(MSet< T > other)
Removes all items from this set that are not present in 'other'.
Definition: MSet.cs:234
Loyc.MessageSink.GetLocationString
static string GetLocationString(object context)
Gets the location information from the specified object, or converts the object to a string....
Definition: MessageSink.out.cs:96
Loyc.Collections.EnumerableExt.SelectFilter< T, Out >
static IEnumerable< Out > SelectFilter< T, Out >(this IEnumerable< T > list, Func< T, Maybe< Out >> filter)
Combines 'Select' and 'Where' in a single operation.
Definition: EnumerableExt.cs:278
Loyc.Math.IIncrementer
Provides increment, decrement, and next/previous-representable- value operations.
Definition: Interfaces.cs:154
Loyc.Collections.NegListSource.Offset
int Offset
Returns the offset added to indexes in the original list, which equals -Min.
Definition: NegListSource.cs:54
Loyc.Collections.BMultiMap.FindUpperBound
int FindUpperBound(K key)
Finds the index of the first item in the list whose key is greater than the specified key.
Definition: BMultiMap.cs:391
Loyc.Syntax.BaseParserForList.BaseParserForList
BaseParserForList(IEnumerable< Token > list, Token eofToken, ISourceFile file, int startIndex=0)
<inheridoc>
Definition: BaseParserForList.cs:205
Loyc.Collections.AListStatisticTrackerBase
Base class that helps efficiently keep track of statistics about the contents of one or more AListBas...
Definition: AListStatisticTracker.cs:27
Loyc.Syntax.Lexing.TokenTree.ToLNodes
VList< LNode > ToLNodes()
Converts this list of Token to a list of LNode.
Definition: Token.cs:121
Loyc.Syntax.OperatorShape
OperatorShape
An enum of common operator formats.
Definition: OperatorShape.cs:8
Loyc.SymbolPool
A collection of Symbols.
Definition: Symbol.cs:180
Loyc.Collections.LCInterfaces.TryGet< T >
static bool TryGet< T >(this IListSource< T > list, int index, ref T value)
Tries to get a value from the list at the specified index.
Definition: IListSource.cs:113
Loyc.Collections.VListBlockOfTwo.MuClear
override void MuClear(int localCountWithMutables)
Clears all mutable items in this chain, and clears the mutable flag. If this block owns mutable items...
Definition: VListBlockOfTwo.cs:128
Loyc.Collections.MMap.Intersect
MMap< K, V > Intersect(MapOrMMap< K, V > other)
Definition: MMap.cs:288
Loyc.Syntax.ParseHelpers.TryParseHex
static bool TryParseHex(UString s, out int value)
A simple method to parse a sequence of hex digits, without overflow checks or other features supporte...
Definition: ParseHelpers.cs:19
Loyc.Collections.SparseAList.NextHigherItem
T NextHigherItem(ref int? index)
Increases index by at least one to reach the next index that is not classified as empty space,...
Definition: SparseAList.cs:285
Loyc.Utilities.GoInterface.ForceFrom
static Interface ForceFrom(T obj)
Creates a wrapper regardless of whether or not T could be wrapped completely.
Definition: GoInterface.cs:434
Loyc.LLParserGenerator.LLParserGenerator.GetCanonical.Do
GrammarPos Do(GrammarPos input)
Computes the "canonical" interpretation of a position.
Definition: LLParserGenerator.cs:932
System.Collections
Definition: IReadOnlyCollections.cs:6
Loyc.Syntax.SourcePos
Holds a filename (FileName), a line number (Line) and a position in the line (PosInLine),...
Definition: SourcePos.cs:55
Loyc.LLParserGenerator.IntStreamCodeGenHelper.Example
override string Example(IPGTerminalSet set_)
Returns an example of an item in the set. If the example is a character, it should be surrounded by s...
Definition: IntStreamCodeGenHelper.cs:118
Loyc.Syntax.LNode.InParensTrivia
static readonly LNode InParensTrivia
Used by the quote {...} macro.
Definition: LNode.cs:126
Loyc.Syntax.Les.CustomLiteral.TypeMarker
Symbol TypeMarker
A prefix or suffix on the literal that represents some additional meaning.
Definition: SpecialLiteral.cs:28
Loyc.LLPG.Macros
Macros for using LLLPG in LeMP.
Definition: Macros.cs:57
Loyc.Syntax.LNode.With
virtual CallNode With(LNode target, VList< LNode > args)
Creates a CallNode with the same attributes and Range, but a different target and argument list....
Definition: LNode.cs:392
Loyc.Collections.WListBase.Push
void Push(T item)
Synonym for Add(); adds an item to the front of the list.
Definition: WListBase.cs:406
Loyc.ConsoleMessageSink.PrintSeverityAt
Severity PrintSeverityAt
Minimum severity level at which the severity level is printed. For example, if set to Severity....
Definition: BasicSinks.cs:31
Loyc.LLParserGenerator.GeneralCodeGenHelper.GenerateTest
override LNode GenerateTest(IPGTerminalSet set_, LNode subject, Symbol setName)
Generates code to test whether a terminal is in the set.
Definition: GeneralCodeGenHelper.cs:131
Loyc.Syntax.LNodeExt.WithoutTrailingTrivia
static VList< LNode > WithoutTrailingTrivia(this VList< LNode > attrs)
Gets a new list with any trailing attributes removed.
Definition: LNodeExt.cs:58
Loyc.Syntax.CodeSymbols.Matches
static readonly Symbol Matches
"=~" Pattern match test operator
Definition: CodeSymbols.cs:53
Loyc.Collections.MutableListExtensionMethods.LinqToLists
Definition: LinqToLists.out.cs:254
Loyc.Collections.IDictionaryEx.AddRange
int AddRange(IEnumerable< KeyValuePair< K, V >> data, DictEditMode mode)
Merges the contents of the specified sequence into this map.
LeMP.MacroMode.PriorityFallbackMin
@ PriorityFallbackMin
Lowest priority. If this macro is ambiguous with another macro that doesn't have this flag,...
Loyc.LLParserGenerator.CodeGenHelperBase.GetCases
virtual IEnumerable< LNode > GetCases(IPGTerminalSet set)
Gets the literals or symbols to use for switch cases of a set (just the values, not including the cas...
Definition: CodeGenHelperBase.cs:310
Loyc.Collections.MSet.IntersectWith
int IntersectWith(IEnumerable< T > other)
Definition: MSet.cs:223
Loyc.Collections.DictEditMode.AddOrReplace
@ AddOrReplace
Insert a key-value pair, replacing an existing one if the key already exists.
Loyc.Syntax.CodeSymbols.Struct
static readonly Symbol Struct
e.g. #struct(Foo, #(IFoo), { }); <=> struct Foo : IFoo { }
Definition: CodeSymbols.cs:156
Loyc.Syntax.ParsingMode.Declarations
static readonly ParsingMode Declarations
Tells IParsingService.Parse to treat the input as a list of statements. If the language makes a disti...
Definition: ParsingMode.cs:29
Loyc.G.IsInRangeExcludeHi
static bool IsInRangeExcludeHi(this long num, long lo, long hi)
Returns true if num is between lo and hi, excluding hi but not lo.
Definition: GRange.out.cs:57
Loyc.Syntax.ParseHelpers.Base36DigitValue
static int Base36DigitValue(char c)
Gets the integer value for the specified digit, where 'A' maps to 10 and 'Z' maps to 35,...
Definition: ParseHelpers.cs:58
Loyc.Collections.DList.Add
void Add(T item)
An alias for PushLast().
Definition: DList.cs:222
Loyc.LLParserGenerator.LLParserGenerator.PredictionTree
An abstract representation of a prediction tree, which will be transformed into prediction code....
Definition: PredictionTree.cs:68
Loyc.Collections.VList.Enumerator
Enumerates through a VList from index 0 up to index Count-1.
Definition: VList.cs:415
Loyc.Syntax.Lexing.WhitespaceFilter
Filters out tokens whose Value is WhitespaceTag.Value.
Definition: WhitespaceFilter.cs:9
Loyc.LLParserGenerator.Rule
Represents an LLLPG rule, which is a Predicate plus a Name and optional attributes (e....
Definition: Rule.cs:16
Loyc.Collections.SparseAList.Prepend
virtual void Prepend(SparseAList< T > other, bool move)
Prepends an AList to this list in sublinear time.
Definition: SparseAList.cs:204
Loyc.WeakReferenceExt
The new WeakReference<T> type in .NET 4.5 removes the Target and IsAlive properties....
Definition: WeakReference.cs:13
Loyc.Collections.Impl.CPByteTrie.Enumerator
Definition: CPByteTrie.cs:299
Loyc.Collections.IBinumerable.Begin
IBinumerator< T > Begin()
Returns a binumerator that points before the beginning of the current collection.
Loyc.Collections.IndexedAList.IsIndexed
bool IsIndexed
Indicates whether the AList is indexed.
Definition: IndexedAList.cs:100
Loyc.Syntax.CodeSymbols.Return
static readonly Symbol Return
e.g. #return(x); <=> return x; [#yield] #return(x) <=> yield return x;
Definition: CodeSymbols.cs:136
Loyc.Collections.INegListSource.TryGet
T TryGet(int index, out bool fail)
Gets the item at the specified index, and does not throw an exception on failure.
Loyc.Collections.BDictionary.FindUpperBound
int FindUpperBound(K key)
Finds the index of the first item in the list that is greater than the specified item.
Definition: BDictionary.cs:254
Loyc.Syntax.CodeSymbols.As
static readonly Symbol As
"'as": @'as(x,string) <=> x as string <=> x(as string)
Definition: CodeSymbols.cs:103
Loyc.G.ToComparison< T >
static Comparison< T > ToComparison< T >()
Gets a Comparison<T> for the specified type.
Definition: G.cs:151
Loyc.Syntax.EscapeC.SingleQuotes
@ SingleQuotes
Escape single quotes as \'
Loyc.Ecs.Parser.EcsLexer.Error
override void Error(int lookaheadIndex, string message)
This method is called to handle errors that occur during lexing.
Definition: EcsLexer.cs:74
Loyc.Collections.Set.Find
bool Find(ref T item)
Definition: Set.cs:84
LeMP.IMacroContext.Ancestors
IReadOnlyList< LNode > Ancestors
Returns a list of ancestors of the current node being processed. Normally Ancestors[0] is a #splice n...
Definition: IMacroContext.cs:39
Loyc.SymbolPool.NewSymbol
virtual Symbol NewSymbol(int id, string name)
Factory method to create a new Symbol.
Definition: Symbol.cs:315
Loyc.Syntax.LNodeExt.WithoutOuterParens
static LNode WithoutOuterParens(this LNode self)
Removes a single pair of parentheses, if the node has a inParens attribute. Returns the same node whe...
Definition: LNodeExt.cs:268
Loyc.Ecs.EcsPrinterOptions.SpaceAroundInfixStopPrecedence
int SpaceAroundInfixStopPrecedence
The printer avoids printing spaces around infix (binary) operators that have the specified precedence...
Definition: EcsNodePrinter.cs:1383
Loyc.Collections.MSet.IsProperSupersetOf
bool IsProperSupersetOf(Set< T > other)
Definition: MSet.cs:279
Loyc.Collections.MutableListExtensionMethods.LinqToLists.Take< T >
static ListSlice< T > Take< T >(this IList< T > list, int count)
Returns a slice of the specified number of elements from the beginning of the list,...
Definition: LinqToLists.out.cs:292
Loyc.Collections.Impl.AListNode.CopySection
abstract AListNode< K, T > CopySection(uint index, uint count, AListBase< K, T > list)
Extracts and returns, as fast as possible, a subrange of the list that this node represents.
Loyc.Localize.Localizer
static LocalizerDelegate Localizer
Localizer method, which is a do-nothing pass-through by default
Definition: Localize.cs:223
Loyc.MiniTest.Assert.Catch
static Exception Catch(Action code)
Verifies that a delegate throws an exception when called and returns it.
Definition: MiniTest.cs:592
Loyc.Collections.ListExt.RemoveAll< T >
static int RemoveAll< T >(this IList< T > list, Predicate< T > match)
Removes the all the elements that match the conditions defined by the specified predicate.
Definition: ListExt.cs:597
Loyc.Collections.MSet.Overlaps
bool Overlaps(IEnumerable< T > other)
Returns true if this set contains at least one item from 'other'.
Definition: MSet.cs:265
Loyc.LLParserGenerator.Program
Entry point of LLLPG.exe, with QuickRun() method to help invoke LLLPG programmatically.
Definition: Program.cs:18
Loyc.Syntax.LNode.WithName
virtual LNode WithName(Symbol name)
Creates a node with a new value for Name.
Definition: LNode.cs:333
Loyc.Syntax.ILNode.CallsMin
bool CallsMin(Symbol name, int argCount)
Returns true if Kind == LNodeKind.Call, Name == name, and Max + 1 >= argCount.
Loyc.Collections.InvertibleSet.Overlaps
bool Overlaps(InvertibleSet< T > other)
TODO NOT IMPLEMENTED Returns true if this set contains at least one item from 'other'.
Definition: InvertibleSet.cs:137
Loyc.Collections.ISparseListSource.IsSet
bool IsSet(int index)
Determines whether a value exists at the specified index.
Loyc.MessageSink.WithContext
static MessageSinkWithContext WithContext(object context, string messagePrefix=null)
Creates a message sink that writes to MessageSink.Default with a default context to be used when Writ...
Definition: MessageSink.out.cs:325
Loyc.Utilities.CastOptions
CastOptions
Options you can pass to GoInterface.From()
Definition: GoInterface.cs:366
Loyc.Syntax.Les.Les2PrinterOptions.OmitSpaceTrivia
bool OmitSpaceTrivia
When this flag is set, space trivia attributes are ignored (e.g. CodeSymbols.TriviaNewline).
Definition: Les2Printer.cs:701
Loyc.Syntax.Lexing.ILllpgLexerApi
For reference purposes, this interface contains the non-static methods that LLLPG expects lexers to i...
Definition: ILllpgApi.cs:89
Loyc.Collections.BDictionary.BDictionary
BDictionary(int maxNodeSize)
Definition: BDictionary.cs:55
Loyc.Collections.MSet
A mutable set.
Definition: MSet.cs:47
Loyc.Collections.INegListSource< T >
Loyc.Collections.IMRange
A mutable random-access range.
Definition: IRanges.cs:360
Loyc.Collections.MaxHeap.OnItemMoved
Action< T, int > OnItemMoved
This optional callback is called whenever an item is placed into the heap, removed from the heap,...
Definition: Heap.cs:56
Loyc.Syntax.Precedence
A four-byte tuple that represents the precedence and miscibility of an operator.
Definition: Precedence.cs:219
Loyc.Localize.WithSymbol
static string WithSymbol(string resourceId, [Localizable] string message, params object[] args)
Definition: Localize.cs:330
Loyc.Collections.AListBase.Enumerator
Definition: AListBase.cs:676
Loyc.Syntax.Lexing.BaseLexer.Error
virtual void Error(int lookaheadIndex, string format, params object[] args)
This method is called to format and handle errors that occur during lexing. The default implementatio...
Definition: BaseLexer.cs:608
Loyc.MessageSink.SetContextToString
static SavedValue< Func< object, string > > SetContextToString(Func< object, string > contextToString)
Sets the strategy that message sinks should use to convert a context object to a string.
Definition: MessageSink.out.cs:143
Loyc.Collections.Impl.InternalList
A compact auto-enlarging array structure that is intended to be used within other data structures....
Definition: InternalList.cs:47
Loyc.Syntax.Lexing.BaseILexer.SupportDotIndents
virtual bool SupportDotIndents()
The LES and EC# languages support "dot indents", which are lines that start with a dot (....
Definition: BaseILexer.cs:116
Loyc.Collections.AListBase.ObserverMgr.AddAll
void AddAll(AListNode< K, T > node)
Called when all children are being added to a node (leaf or inner). Notifications are not sent for in...
Definition: AListNodeObserver.cs:116
Loyc.Collections.KeyCollection.Enumerator
Definition: KeyCollection.cs:134
Loyc.Localize.GlobalDefaultLocalizer
static LocalizerDelegate?? GlobalDefaultLocalizer
Gets or sets the localizer used when one has not been assigned to the current thread with SetLocalize...
Definition: Localize.cs:210
Loyc.Syntax.IIndexToLine.IndexToLine
SourcePos IndexToLine(int index)
Returns the position in a source file of the specified index.
LeMP.MacroProcessor.ProcessParallel
void ProcessParallel(IReadOnlyList< InputOutput > sourceFiles, Action< InputOutput > onProcessed=null)
Processes source files in parallel. All files are fully processed before the method returns.
Definition: MacroProcessor.cs:223
Loyc.Collections.MSet.Find
bool Find(ref T item)
Searches for an item. If the item is found, the copy in the set is returned in the 'item' parameter....
Definition: MSet.cs:87
Loyc.Collections.IQueue
Represents a FIFO (first-in-first-out) queue (or a priority queue if IPriorityQueue<ThisAssembly> is ...
Definition: Queue interfaces.cs:44
Loyc.Threading.ThreadEx.GetDomain
static AppDomain GetDomain()
Returns the current domain in which the current thread is running.
Definition: ThreadEx.cs:252
Loyc.Syntax.CodeSymbols.Import
static readonly Symbol Import
#import is used instead of #using because the using(...) {...} statement already uses #using
Definition: CodeSymbols.cs:181
Loyc.Collections.VListBlock.ImmCount
int ImmCount
Gets the number of immutable elements in-use in our local array.
Definition: VListBlock.cs:304
Loyc.Math.IIncrementer.AddOne
T AddOne(T a)
Returns a + 1.
Loyc.Collections.ListChangeInfo.NewItems
readonly IListSource< T > NewItems
Represents either new items that are being added to the collection, or items that are about to replac...
Definition: ListChangeInfo.cs:53
Loyc.Collections.MaxHeap.Pop
T Pop()
Removes the largest item from the heap (or smallest item, if this is a MinHeap).
Definition: Heap.cs:175
Loyc.Collections.IndexedAList.IndexOf
override int IndexOf(T item)
Finds an index of an item in the list.
Definition: IndexedAList.cs:65
Loyc.Ecs.Parser.TokenExt.ToString
static string ToString(Token t)
Expresses an EC# token as a string.
Definition: TokenType.cs:167
Loyc.Collections.IDictionaryEx
Combines IDictionary, IReadOnlyDictionary, and IDictonarySink with a few additional methods.
Definition: IDictionaryEx.cs:33
Loyc.Syntax.Les.Les3PrinterOptions.WarnAboutUnprintableLiterals
bool WarnAboutUnprintableLiterals
Whether to print a warning when an "unprintable" literal is encountered. In any case the literal is c...
Definition: Les3Printer.cs:1465
Loyc.G.IsInRangeExcludeHi
static bool IsInRangeExcludeHi(this double num, double lo, double hi)
Returns true if num is between lo and hi, excluding hi but not lo.
Definition: GRange.out.cs:108
Loyc.Syntax.Lexing.BaseLexer.AfterNewline
virtual void AfterNewline()
The lexer must call this method exactly once after it advances past each newline, even inside comment...
Definition: BaseLexer.cs:240
Loyc.Collections.INegListSource.Min
int Min
Returns the minimum valid index in the collection.
Definition: INegListSource.cs:23
Loyc.Syntax.LNodeExt.WithTrailingTrivia
static LNode WithTrailingTrivia(this LNode node, VList< LNode > trivia)
Removes a node's trailing trivia and adds a new list of trailing trivia.
Definition: LNodeExt.cs:42
Loyc.Syntax.ParsingService.Tokenize
static ILexer< Token > Tokenize(this IParsingService parser, UString input, IMessageSink msgs=null)
Parses a string by invoking IParsingService.Tokenize(ICharSource, string, IMessageSink) using an empt...
Definition: IParsingService.cs:218
Loyc.Collections.MaxHeap.TryPeek
T TryPeek(out bool isEmpty)
Gets the largest item from the heap if it is not empty (or the smallest item, if this is a MinHeap).
Definition: Heap.cs:191
Loyc.Syntax.CodeSymbols.AltList
static readonly Symbol AltList
# is used for lists of things in definition constructs, e.g. #class(Derived, #(Base,...
Definition: CodeSymbols.cs:89
Loyc.Collections.Impl.AListIndexer.RootChanged
void RootChanged(AListBase< K, T > list, AListNode< K, T > newRoot, bool clear)
Called when the root of the tree changes, or when the list is cleared. Also called after Attach(),...
Definition: AListIndexer.cs:88
Loyc.Collections.VListBlockArray
Implementation of VListBlock(of T) that contains an array. It is always initialized with at least one...
Definition: VListBlockArray.cs:16
Loyc.Collections.WListProtected.IndexOf
int IndexOf(T item)
Searches for the specified object and returns the zero-based index of the first occurrence (lowest in...
Definition: WListBase.cs:173
Loyc.Collections.MSet.IsSubsetOf
bool IsSubsetOf(IEnumerable< T > other)
Returns true if all items in this set are present in the other set.
Definition: MSet.cs:254
Loyc.Collections.VListBlock.Add
static VListBlock< T > Add(VListBlock< T > self, int localCount, T item)
Adds an item to the "front" of an immutable FVList.
Definition: VListBlock.cs:355
LeMP.Tests.PreludeMacroTests_Les3
Definition: PreludeMacroTests_Les3.cs:12
Loyc.Syntax.ParseHelpers.TryParseInt
static bool TryParseInt(ref UString input, out long result, int radix=10, ParseNumberFlag flags=0)
Definition: ParseHelpers.cs:272
Loyc.Collections.MapOrMMap.TryGetValue
V TryGetValue(K key, V defaultValue)
Synonym for this[key, defaultValue].
Definition: Map.cs:148
Loyc.Syntax.ILNodePrinterOptions.NewlineString
string NewlineString
Specifies the string to use for line breaks (typically "\n").
Definition: ILNodePrinterOptions.cs:73
Loyc.Syntax.CodeSymbols.If
static readonly Symbol If
e.g. #if(c,x,y) and #if(c,x); I wanted it to be the conditional operator too, but the semantics are a...
Definition: CodeSymbols.cs:128
Loyc.Collections.Map.Map
Map()
Creates an empty map. Consider using Empty instead.
Definition: Map.cs:203
Loyc.Syntax.ILineColumnFile
Definition: ILineColumnFile.cs:16
Loyc.Collections.Impl.CPByteTrie.ContainsKey
bool ContainsKey(byte[] key, int offset, int length)
Searches for the specified key, returning true if it is present in the trie.
Definition: CPByteTrie.cs:92
Loyc.LLParserGenerator.IPGCodeGenHelper.GenerateMatch
LNode GenerateMatch(IPGTerminalSet set_, bool savingResult, bool recognizerMode)
Generate code to match a set, e.g. MatchRange('a', 'z'); or MatchExcept(' ', '\r'); }....
Loyc.Syntax.Les.Les3PrinterOptions.SpaceInsideListBrackets
bool SpaceInsideListBrackets
Whether to print a space inside square brackets for lists [ ... ].
Definition: Les3Printer.cs:1432
Loyc.LogMessage
Holds an argument list compatible with IMessageSink<TContext>.Write(Severity,TContext,...
Definition: MessageHolder.cs:57
Loyc.Collections.IListRangeMethods
The batch-operation methods of IListEx<T>, mainly for collection types that can add or remove multipl...
Definition: Extended interfaces.cs:38
Loyc.Threading.SavedValue
Designed to be used in a "using" statement to temporarily alter a ThreadLocalVariable<T> or Holder<T>...
Definition: SavedValue.cs:12
Loyc.MiniTest.Assert.Assert
Assert()
You may find it useful to derive a test fixture from Assert so that you do not need to prefix every t...
Definition: MiniTest.cs:251
Loyc.Collections.IStack
Represents a LIFO (last-in-first-out) stack.
Definition: Queue interfaces.cs:50
Loyc.Collections.VList.ToArray
T[] ToArray()
Returns the VList converted to an array.
Definition: VList.cs:262
Loyc.Syntax.Lexing.IndentTokenGenerator.GetTokenCategory
abstract TokenCategory GetTokenCategory(Token token)
Gets the category of a token for the purposes of indent processing.
Loyc.Syntax.IdNode
Base class of all nodes that represent simple identifiers (including special symbols such as #foo).
Definition: AbstractNodes.cs:15
Loyc.LLParserGenerator.RuleRef.ChooseGotoLabel
override string ChooseGotoLabel()
Optional. If this predicate represents the matching code for a branch of an Alts and this code is rea...
Definition: Predicates.cs:227
Loyc.Syntax.IdNode.Clone
abstract override LNode Clone()
Creates a copy of the node. Since nodes are immutable, there is little reason for an end-user to call...
Loyc.Collections.CG.Cache
static object Cache(sbyte o)
Special overload to avoid treating argument as int32 in C#.
Definition: CG.cs:52
Loyc.UString.Substring
UString Substring(int start, int count)
Synonym for Slice()
Definition: UString.cs:345
Loyc.Collections.Impl.IAListTreeObserver.RemoveAll
void RemoveAll(AListNode< K, T > node)
Called when all children are being removed from a node (leaf or inner) because the node is being spli...
Loyc.UString.Find
UString Find(UString what, bool ignoreCase=false)
Finds the specified string within this string.
Definition: UString.cs:428
Loyc.Collections.AListBase.ObserverMgr.NodeAdded
void NodeAdded(AListNode< K, T > child, AListInnerBase< K, T > parent)
Called when a child node is added to an inner node.
Definition: AListNodeObserver.cs:92
Loyc.ICloneable
Interface for types that can duplicate themselves.
Definition: MiscInterfaces.cs:10
Loyc.Syntax.Les.Les2PrecedenceMap.IsNaturalOperator
static bool IsNaturalOperator(UString name)
Returns true if the given Symbol can be printed as an operator without escaping it in LESv2.
Definition: LesPrecedenceMap.cs:242
Loyc.Syntax.CodeSymbols.NullCoalesceAssign
static readonly Symbol NullCoalesceAssign
"??=": a ??= b means a = a ?? b
Definition: CodeSymbols.cs:113
Loyc.Syntax.PrintHelpers.EscapeCStyle
static bool EscapeCStyle(int c, StringBuilder @out, EscapeC flags=EscapeC.Default, char quoteType='\0')
Writes a character c to a StringBuilder, either as a normal character or as a C-style escape sequence...
Definition: PrintHelpers.cs:78
Loyc.Syntax.Les.INodePrinterWriter.Target
object Target
Gets the object being written to (TextWriter or StringBuilder)
Definition: INodePrinterWriter.cs:20
Loyc.Syntax.Impl.PrinterState.Checkpoint
Definition: PrinterState.cs:227
Loyc.Collections.Bijection.Bijection
Bijection(IReadOnlyCollection< KeyValuePair< K1, K2 >> input)
Constructs a bijection out of two Dictionary<TKey,TValue> objects, copying the specified initial cont...
Definition: Bijection.cs:53
Loyc.Syntax.CodeSymbols.Property
static readonly Symbol Property
e.g. #property(#int32, Foo, @``, { get; }) <=> int Foo { get; }
Definition: CodeSymbols.cs:168
Loyc.Threading.ThreadStartEventArgs
Used by the ThreadEx.ThreadStarting and ThreadEx.ThreadStopping events.
Definition: ThreadEx.cs:303
Loyc.LLParserGenerator.LLParserGenerator.DefaultK
int DefaultK
Specifies the default maximum lookahead for rules that do not specify a lookahead value.
Definition: LLParserGenerator.cs:50
Loyc.Collections.SparseAList.Swap
void Swap(SparseAList< T > other)
Swaps the contents of two SparseAList<T>s in O(1) time.
Definition: SparseAList.cs:181
Loyc.Collections.VListBlockOfTwo.VListBlockOfTwo
VListBlockOfTwo()
Initializes a mutable block with no items.
Definition: VListBlockOfTwo.cs:21
Loyc.Syntax.CodeSymbols.DoWhile
static readonly Symbol DoWhile
e.g. #doWhile(x++, condition); <=> do x++; while(condition);
Definition: CodeSymbols.cs:129
Loyc.Syntax.CodeSymbols.ColonColon
static readonly Symbol ColonColon
"::" Scope resolution operator in many languages
Definition: CodeSymbols.cs:108
Loyc.Collections.BDictionary.BDictionary
BDictionary()
Initializes an empty BList.
Definition: BDictionary.cs:52
Loyc.StringBuilderExt.LastIndexOf
static int LastIndexOf(this StringBuilder sb, char searchChar, int startIndex=int.MaxValue)
Gets the index of a character in a StringBuilder
Definition: StringBuilderExt.cs:104
Loyc.SeverityMessageFilter.SeverityMessageFilter
SeverityMessageFilter(IMessageSink< TContext > target, Severity minSeverity, bool includeDetails=true)
Initializes the filter with a minimum severity.
Definition: WrapperSinks.cs:26
Loyc.LLParserGenerator.IntStreamCodeGenHelper.GenerateSetDecl
override LNode GenerateSetDecl(IPGTerminalSet set, Symbol setName)
Generates a declaration for a variable that holds the set.
Definition: IntStreamCodeGenHelper.cs:137
Loyc.Syntax.ParseHelpers
Static methods that help with common parsing jobs, such as parsing integers, floats,...
Definition: ParseHelpers.cs:13
Loyc.Threading.ThreadLocalVariable.FallbackValue
T FallbackValue
When a thread is not created using ThreadEx, the value of your ThreadLocalVariable fails to propagate...
Definition: ThreadEx.cs:588
Loyc.Syntax.Les.Les3LanguageService.Tokenize
ILexer< Token > Tokenize(ICharSource text, string fileName, IMessageSink msgs)
Returns a lexer that is configured to begin reading the specified file.
Definition: Les3LanguageService.cs:57
Loyc.Collections.VList.ToFWList
FWList< T > ToFWList()
Returns this list as a FWList, which effectively reverses the order of the elements.
Definition: VList.cs:246
LeMP.MacroMode.PriorityFallback
@ PriorityFallback
Low priority. If this macro is ambiguous with another macro that doesn't have this flag nor FallbackM...
Loyc.Collections.IPop< T >
Loyc.Collections.LinqToLists.Skip< T >
static Slice_< T > Skip< T >(this IListSource< T > list, int start)
Skips the specified number of elements immediately and returns a slice of part of the list that remai...
Definition: LinqToLists.out.cs:85
Loyc.Collections.Impl.InternalSet.CountMemory
int CountMemory(int sizeOfT, out InternalSetStats stats)
Measures the total size of all objects allocated to this collection, in bytes, and counts the number ...
Definition: InternalSet.cs:1678
Loyc.Syntax.Les.Les2Printer.IsNormalIdentifier
static bool IsNormalIdentifier(Symbol name)
Returns true if the given symbol can be printed as a normal identifier, without an "@" prefix....
Definition: Les2Printer.cs:461
Loyc.Collections.Impl.AListNode.AutoClone
static bool AutoClone(ref AListNode< K, T > node, AListInnerBase< K, T > parent, IAListTreeObserver< K, T > tob)
Checks whether 'node' is frozen and if so, replaces it with an unfrozen copy.
Definition: AListNode.cs:232
Loyc.Syntax.CodeSymbols.PostInc
static readonly Symbol PostInc
"suf++" Unary suffix increment
Definition: CodeSymbols.cs:39
Loyc.StringBuilderExt.TrimEnd
static StringBuilder TrimEnd(this StringBuilder sb)
Removes all trailing occurrences of spaces and tabs from the StringBuilder object.
Definition: StringBuilderExt.cs:50
Loyc.Collections.Impl.AListNode.IsFullLeaf
abstract bool IsFullLeaf
Returns true if the node is full and is a leaf node.
Definition: AListNode.cs:164
Loyc.LLParserGenerator.CodeGenHelperBase.ExampleChar
virtual ? char ExampleChar(IPGTerminalSet set)
Returns an example of a character in the set, or null if this is not a set of characters or if EOF is...
Definition: CodeGenHelperBase.cs:128
Loyc.Ecs.SpaceOpt
SpaceOpt
Controls the locations where spaces appear as EcsNodePrinter is printing.
Definition: EcsNodePrinter.cs:1177
Loyc.GSymbol
This class produces global symbols.
Definition: Symbol.cs:143
Loyc.Syntax.Lexing.BaseILexer
A version of BaseLexer<CharSrc> that implements ILexer<Token>. You should use this base class if you ...
Definition: BaseILexer.cs:44
Loyc.Collections.Impl.AListIndexer.ItemRemoved
void ItemRemoved(T item, AListLeafBase< K, T > parent)
Called when an item is removed from a leaf node.
Definition: AListIndexer.cs:104
Loyc.LLParserGenerator.TerminalPred
Represents a terminal (which is a token or a character) or a set of possible terminals (e....
Definition: Predicates.cs:951
Loyc.Syntax.CallNode.HasSimpleHead
override bool HasSimpleHead()
Returns true if this is not a call, or if the call's Target is an Id or a Literal.
Definition: AbstractNodes.cs:142
Loyc.Syntax.CodeSymbols.Break
static readonly Symbol Break
e.g. #break(); <=> break;
Definition: CodeSymbols.cs:138
Loyc.Collections.Impl.InternalSet.IntersectWith
int IntersectWith(InternalSet< T > other, IEqualityComparer< T > otherComparer)
Removes all items from this set that are not present in 'other'.
Definition: InternalSet.cs:1340
Loyc.Syntax.CodeSymbols.Fixed
static readonly Symbol Fixed
e.g. #fixed(#var(<tt>*(#int32), x = &y), stmt); <=> fixed(int* x = &y) stmt;
Definition: CodeSymbols.cs:144
Loyc.Collections.VListBlockArray.SubList
override FVList< T > SubList(int localIndex)
Returns a list in which this[localIndex-1] is the first item. Nonpositive indexes are allowed and ref...
Definition: VListBlockArray.cs:215
Loyc.Collections.Impl.InternalSet.CountMemory
int CountMemory(int sizeOfT)
Measures the total size of all objects allocated to this collection, in bytes, including the size of ...
Definition: InternalSet.cs:1670
Loyc.MessageSinkWithContext
A message sink wrapper that has a default value for the context parameter, which is used when the con...
Definition: WrapperSinks.cs:175
Loyc.Syntax.ParseNumberFlag.SkipUnderscores
@ SkipUnderscores
Skip underscores inside number. Without this flag, underscores make parsing stop.
Loyc.LLParserGenerator.CodeGenHelperBase.ErrorBranch
virtual LNode ErrorBranch(IPGTerminalSet covered, int laIndex)
Generates code for the default error branch of prediction (called when there is no explicit error bra...
Definition: CodeGenHelperBase.cs:282
Loyc.Syntax.BaseParser.LaIndexToMsgContext
virtual object LaIndexToMsgContext(int lookaheadIndex)
Converts a lookahead token index to a SourceRange (or to a string if SourceFile was initialized to nu...
Definition: BaseParser.cs:139
Loyc.Syntax.Lexing.TokenKind.CloserFlag
@ CloserFlag
Closers all have this bit set.
Loyc.Syntax.LNodeExt.InParens
static LNode InParens(this LNode node)
Returns the same node with a parentheses attribute added.
Definition: LNodeExt.cs:250
Loyc.Syntax.EscapeC.Control
@ Control
Escape all characters with codes below 32, including \t
Loyc.Collections.FVList.Push
FVList< T > Push(T item)
Synonym for Add(); adds an item to the front of the list.
Definition: FVList.cs:215
Loyc.Ecs.Parser.EcsTriviaInjector
Trivia injector customized for Enhanced C#.
Definition: EcsTriviaInjector.cs:45
Loyc.Collections.IBRange.Last
T Last
Returns the value of the last item in the range.
Definition: IRanges.cs:262
Loyc.ExceptionExt.DescriptionAndStackTrace
static string DescriptionAndStackTrace(this Exception ex)
Definition: Extensions.cs:65
Loyc.StringBuilderExt.TrimStart
static StringBuilder TrimStart(this StringBuilder sb)
Removes all leading occurrences of spaces and tabs from the StringBuilder object.
Definition: StringBuilderExt.cs:37
Loyc.Syntax.NodeStyle.TQStringLiteral
@ TQStringLiteral
Used for a triple-quoted string literal like '''foo'''.
Loyc.Collections.FVList.First
T First
Returns the front item of the list (at index 0), which is the head of the list.
Definition: FVList.cs:192
Loyc.Math.IBinaryMath.Log2Floor
int Log2Floor(T a)
Returns the floor of the base-2 logarithm of x. e.g. 1024 -> 10, 1000 -> 9
Loyc.MiniTest.SetUpAttribute
Marks a method that is to be called prior to each test in a test fixture.
Definition: MiniTest.cs:136
Loyc.Syntax.CodeSymbols.LT
static readonly Symbol LT
"<" Less-than operator
Definition: CodeSymbols.cs:51
Loyc.Math.INumTraits.Ceiling
T Ceiling(T value)
Gets the closest integer equal to or higher than the specified number.
Loyc.Syntax.ParsingService.Default
static IParsingService?? Default
Gets or sets the default language service on this thread. If no service has been assigned on this thr...
Definition: IParsingService.cs:109
Loyc.EzStopwatch.Reset
void Reset()
Resets the timer to 0 and pauses it there.
Definition: EzStopwatch.cs:95
Loyc.MiniTest.BenchmarkAttribute
Marks a benchmark test, which exists to test performance. Benchmark tests are often run multiple time...
Definition: MiniTest.cs:154
Loyc.Collections.Impl.IAListTreeObserver.Detach
void Detach(AListBase< K, T > list, AListNode< K, T > root)
Called when the observer is being detached from an AList. Detach(), unlike Attach(),...
Loyc.Syntax.Lexing.LexerSource.AfterNewline
virtual new void AfterNewline()
The lexer must call this method exactly once after it advances past each newline, even inside comment...
Definition: LexerSource.cs:102
Loyc.Utilities.IGoInterfaceWrapper
All GoInterface wrappers implement this interface.
Definition: GoInterface.cs:120
Loyc.Syntax.Les.CustomLiteral
A custom literal is a normal number or string paired with a (typically unrecognized) type prefix or s...
Definition: SpecialLiteral.cs:14
Loyc.Syntax.SourceFileWithLineRemaps
An wrapper around ISourceFile that applies line remapping information (if the source file uses it).
Definition: LineRemapper.cs:29
Loyc.Syntax.Lexing.Token.Is
bool Is(int type, object value)
Returns true if the specified type and value match this token.
Definition: Token.cs:287
Loyc.Math.INumTraits.IsSigned
bool IsSigned
Returns true if T can represent negative values.
Definition: Interfaces.cs:122
Loyc.Syntax.NodeStyle.OneLiner
@ OneLiner
Indicates that the there is no comment or newline trivia associated with the children of this node,...
Loyc.Holder
A trivial class that holds a single value of type T in the Value property.
Definition: Holder.cs:18
Loyc.Collections.Impl.CPEnumerator
Traverses a CPTrie<T>. Returned by CPTrie<T>.ValueEnumerator().
Definition: CPTrieMisc.cs:11
Loyc.Syntax.LNodeExt.AsList
static VList< LNode > AsList(this LNode block, Symbol listIdentifier)
Interprets a node as a list by returning block.Args if block.Calls(listIdentifier),...
Definition: LNodeExt.cs:116
Loyc.Syntax.ParserSource.Reset
virtual new void Reset(List source, Token eofToken, ISourceFile file, int startIndex=0)
Definition: ParserSource.cs:42
Loyc.Syntax.ParsingService.GetServiceForFileName
static IParsingService GetServiceForFileName(string filename)
Finds the language service associated with the longest matching registered file extension.
Definition: IParsingService.cs:181
Loyc.Collections.Map.Without
Map< K, V > Without(K key)
Returns a copy of the current map without the specified key.
Definition: Map.cs:282
Loyc.Syntax.Les.Les3PrinterOptions.ObeyRawText
bool ObeyRawText
Causes raw text to be printed verbatim, as the EC# printer does. When this option is false,...
Definition: Les3Printer.cs:1470
Loyc.MessageSink.FromDelegate
static MessageSinkFromDelegate FromDelegate(WriteMessageFn writer, Func< Severity, bool > isEnabled=null)
Sends all messages to a user-defined method.
Definition: MessageSink.out.cs:316
Loyc.Collections.VListBlockArray.VListBlockArray
VListBlockArray(FVList< T > prior, int localCapacity, bool mutable)
Inits an empty block.
Definition: VListBlockArray.cs:57
Loyc.Collections.DictEditMode.Retrieve
@ Retrieve
Do not change the collection.
Loyc.StringBuilderExt.AppendCodePoint
static StringBuilder AppendCodePoint(this StringBuilder s, int c)
Appends a unicode code point in the range 0 to 0x10FFFF to StringBuilder in UTF-16.
Definition: StringBuilderExt.cs:184
Loyc.MessageSink.LocationOf
static object LocationOf(object context)
Returns context.Location if context implements IHasLocation; otherwise, returns context itself.
Definition: MessageSink.out.cs:72
Loyc.Collections.AListExt
Definition: AListExt.cs:10
Loyc.Syntax.CodeSymbols.Label
static readonly Symbol Label
e.g. #label(success) <=> success:
Definition: CodeSymbols.cs:134
Loyc.Syntax
Loyc.Syntax.dll: contains Loyc trees (Loyc.Syntax.LNode), lexing stuff, LLLPG base classes (BaseParse...
Definition: EmptySourceFile.cs:6
Loyc.Localize.Passthrough
static string Passthrough(Symbol msgId, string msg)
This is the dummy translator, which is the default value of Localizer. It passes strings through untr...
Definition: Localize.cs:298
Loyc.Syntax.Lexing.Token.Children
TokenTree Children
Returns Value as TokenTree (null if not a TokenTree).
Definition: Token.cs:278
Loyc.Collections.Impl.InternalSet.DefaultComparer
static readonly IEqualityComparer< T > DefaultComparer
This is EqualityComparer<T>.Default, or null if T implements IReferenceEquatable.
Definition: InternalSet.cs:376
Loyc.Syntax.Lexing.BaseLexer.PrintChar
void PrintChar(int c, StringBuilder sb)
Prints a character as a string, e.g. 'a' -> "'a'", with the special value -1 representing EOF,...
Definition: BaseLexer.cs:686
Loyc.Collections.BDictionary.ReplaceIfPresent
bool ReplaceIfPresent(ref K key, ref V value)
Replaces the value associated with a specified key, if it already exists in the dictionary.
Definition: BDictionary.cs:519
Loyc.Syntax.Les.Les2Lexer
Lexer for EC# source code.
Definition: Les2Lexer.cs:23
Loyc.Syntax.CodeSymbols.MulAssign
static readonly Symbol MulAssign
"*=" multiply-and-set operator
Definition: CodeSymbols.cs:114
Loyc.Collections.ISparseListSource.NextLowerItem
T NextLowerItem(ref int? index)
Decreases index by at least one to reach the next index that is not classified as empty space,...
Loyc.LLParserGenerator.Gate.IsEquivalency
bool IsEquivalency
If true, this is an "<=>" equivalency gate, otherwise it's a "=>" normal gate.
Definition: Predicates.cs:792
Loyc.LLParserGenerator.GeneralCodeGenHelper.GetRelativeCostForSwitch
override int GetRelativeCostForSwitch(IPGTerminalSet set_)
Used to help decide whether a "switch" or an if statement will be used to handle a prediction tree,...
Definition: GeneralCodeGenHelper.cs:239
Loyc.Collections.XfAction.Change
@ Change
Include the modified item in the output list
Loyc.Collections.EnumerableExt.MinOrDefault< T >
static T MinOrDefault< T >(this IEnumerable< T > list, Func< T, int > selector, T defaultValue=default(T))
Returns the item in the list that has the minimum value for some selector.
Definition: EnumerableExt.cs:224
Loyc.Math.IBinaryMath.Shl
T Shl(T a, int amount)
Shifts 'a' left by the specified number of bits.
Loyc.Syntax.Les.Les2Lexer.NextToken
override Maybe< Token > NextToken()
Scans the next token and returns information about it.
Definition: Les2LexerGrammar.out.cs:863
Loyc.EzStopwatch.ClearAfter
int ClearAfter(int minimumMillisec)
Restarts the timer from zero if the specified number of milliseconds have passed, and returns the for...
Definition: EzStopwatch.cs:121
Loyc.Collections.Impl.InternalList.CloneAndTrim
InternalList< T > CloneAndTrim()
Makes a copy of the list with Capacity = Count
Definition: InternalList.cs:317
Loyc.Collections.DictEditMode
DictEditMode
Helper enum for IDictionaryEx<K, V>.GetAndEdit.
Definition: IDictionaryEx.cs:9
Loyc.Ecs.EcsNodePrinter.PrintECSharp
static void PrintECSharp(LNode node, StringBuilder target, IMessageSink sink, ParsingMode mode, ILNodePrinterOptions options=null)
Prints a node as EC# code.
Definition: EcsNodePrinter.cs:121
Loyc.Collections.Impl.AListIndexer.RemoveAll
void RemoveAll(AListNode< K, T > node)
Called when all children are being removed from a node (leaf or inner) because the node is being spli...
Definition: AListIndexer.cs:123
Loyc.Syntax.Lexing.BaseILexer.IndentLevel
int IndentLevel
Gets the number of spaces that were used to indent the current line, where a tab counts as rounding u...
Definition: BaseILexer.cs:68
Loyc.Ecs.EcsLanguageService.Parse
IListSource< LNode > Parse(IListSource< Token > input, ISourceFile file, IMessageSink msgs, ParsingMode inputType=null)
Parses a token tree, such as one that came from a token literal.
Definition: EcsLanguageService.cs:92
Loyc.Geometry.IRectangleReader
Represents a read-only 2D rectangle.
Definition: IRectangle.cs:42
Loyc.Collections.SparseAList.InsertRange
void InsertRange(int index, ISparseListSource< T > list)
Inserts another sparse list into this one.
Definition: SparseAList.cs:132
Loyc.IMessageSink.IsEnabled
bool IsEnabled(Severity level)
Returns true if messages of the specified type will actually be printed, or false if Write(type,...
Loyc.Syntax.CodeSymbols.Cast
static readonly Symbol Cast
"'cast": @'cast(x,int) <=> (int)x <=> x(-> int)
Definition: CodeSymbols.cs:105
Loyc.Syntax.LNode.FlattenBinaryOpSeq
static List< LNode > FlattenBinaryOpSeq(LNode expr, Symbol opName, bool? rightAssociative=null)
Converts a sequence of the same operator (e.g. x+y+z) to a list (e.g. x, y, z).
Definition: LNode.cs:796
Loyc.Syntax.Lexing.LexerSource.Error
virtual new void Error(int lookaheadIndex, string format)
This method is called to handle errors that occur during lexing.
Definition: LexerSource.cs:156
Loyc.Math.INumTraits.IsInfinity
bool IsInfinity(T value)
Returns true if the given value is infinite.
Loyc.Syntax.Precedence.Precedence
Precedence(int left, int right, int lo, int hi)
Initializes an operator with the given precedence on the left and right sides, and the given immiscib...
Definition: Precedence.cs:233
Loyc.WrapperBase.GetHashCode
override int GetHashCode()
Returns the hashcode of the wrapped object.
Definition: WrapperBase.cs:29
Loyc.Collections.BDictionary.GetAndRemove
Maybe< V > GetAndRemove(K key)
TODO: TEST THIS!!
Definition: BDictionary.cs:430
Loyc.Collections.IMEnumerator
A mutable enumerator interface. Provides a "Remove" method like Java iterators have,...
Definition: New enumerators.cs:48
Loyc.Collections.IDictionaryImpl
This interface is intended to be implemented by all Loyc collections that implement IDictionary<K,...
Definition: Disambiguation interfaces.cs:113
Loyc.Threading.ThreadLocalVariable.Value
T Value
Value of the thread-local variable.
Definition: ThreadEx.cs:549
Loyc.LLParserGenerator.IntSet.IsInverted
bool IsInverted
When Inverted is true, the set behaves as if it contains the opposite set of items....
Definition: IntSet.cs:30
Loyc.Collections.MMap.Union
MMap< K, V > Union(MapOrMMap< K, V > other)
Definition: MMap.cs:279
Loyc.Utilities.UG.ProcessCommandLineArguments
static void ProcessCommandLineArguments(IList< string > args, ICollection< KeyValuePair< string, string >> options, string atFolder, IDictionary< char, string > shortOptions=null, InvertibleSet< string > twoArgOptions=null, int argLimit=0xFFFF, bool expandEnvVars=true, bool caseSensitiveLongOpts=false)
Expands environment variables (e.g. TEMP%) and @files in a list of command-line arguments,...
Definition: UG.cs:119
Loyc.Collections.LCInterfaces.FirstIndexWhere< T >
static ? int FirstIndexWhere< T >(this IReadOnlyList< T > source, Func< T, bool > pred)
Gets the lowest index at which a condition is true, or null if nowhere.
Definition: IListSource.cs:190
Loyc.Collections.ICharSource
A read-only list of characters plus a Slice(int,int) method.
Definition: ICharSource.cs:52
Loyc.Collections.WList.Last
T Last
Returns the last item of the list (at index Count-1).
Definition: WList.cs:220
Loyc.Syntax.CodeSymbols.Xor
static readonly Symbol Xor
"^^" Logical 'xor' operator (tentative–this operator is redundant, "!=" is equivalent)
Definition: CodeSymbols.cs:44
Loyc.Collections.Impl.AListNode.InsertRange
virtual AListNode< K, T > InsertRange(uint index, IListSource< T > source, ref int sourceIndex, out AListNode< K, T > splitRight, IAListTreeObserver< K, T > tob)
Inserts a list of items at the specified index. This method may not insert all items at once,...
Definition: AListNode.cs:84
Loyc.Syntax.Les.Les2PrinterOptions.SpaceAfterPrefixStopPrecedence
int SpaceAfterPrefixStopPrecedence
The printer avoids printing spaces after prefix operators that have the specified precedence or highe...
Definition: Les2Printer.cs:739
Loyc.Ecs.EcsValidators.IsIsTest
static bool IsIsTest(LNode n, out LNode subject, out LNode targetType, out LNode targetVarName, out LNode extraArgs, Pedantics p=Pedantics.Lax)
Checks whether an expression is a valid "is" test (pattern- matching expression) such as "x is Foo",...
Definition: EcsValidators.cs:633
Loyc.Ecs.Parser.EcsPreprocessor.NextToken
override Maybe< Token > NextToken()
Returns the next (postprocessed) token. This method should set the _current field to the returned val...
Definition: EcsPreprocessor.cs:86
Loyc.LLParserGenerator.PGIntSet.WithEOF
PGIntSet WithEOF(bool wantEOF=true)
Adds or removes EOF from the set. If the set doesn't change, this method may return this.
Definition: PGIntSet.cs:33
Loyc.Collections.WList.Where
WList< T > Where(Func< T, bool > filter)
Applies a filter to a list, to exclude zero or more items.
Definition: WList.cs:142
Loyc.Syntax.CodeSymbols.NamedArg
static readonly Symbol NamedArg
"'::=" Named argument e.g. ‘’::=`(x, 0) <=> x: 0
Definition: CodeSymbols.cs:95
Loyc.G.CountOnes
static int CountOnes(uint x)
Definition: G.cs:277
Loyc.Collections.Impl.CPIntTrie
A trie that supports signed and unsigned keys with sizes up to 64 bits. Special encodings are used to...
Definition: CPIntTrie.cs:47
Loyc.Collections.XfAction.Repeat
@ Repeat
Include the modified item in the output, and transform it again
Loyc.Collections.AListOperation
AListOperation
Indicates the way an add operation (such as BList<T>.Do should behave when an item being added to a s...
Definition: AListNode.cs:454
Loyc.Syntax.BaseParserForList.ToString
abstract override string ToString(MatchType tokenType)
Returns a string representation of the specified token type. These strings are used in error messages...
Loyc.Collections.NegList.OriginalList
IList< T > OriginalList
Gets the list that was passed to the constructor of this instance.
Definition: NegList.cs:45
Loyc.Collections.AListOperation.__AddThreshold
@ __AddThreshold
Lowest-numbered "add" command. For internal use only.
Loyc.LLParserGenerator.IntSet._ranges
readonly InternalList< IntRange > _ranges
A list of non-overlapping character ranges, sorted by code point. EOF can be included in this list as...
Definition: IntSet.cs:24
Loyc.Collections.Set.IsProperSupersetOf
bool IsProperSupersetOf(ISet< T > other)
Definition: Set.cs:162
Loyc.Syntax.ParseHelpers.TryParseFloatParts
static bool TryParseFloatParts(ref UString source, int radix, out bool negative, out ulong mantissa, out int exponentBase2, out int exponentBase10, out int numDigits, ParseNumberFlag flags=0)
Parses the parts of a floating-point string. See the other overload for details.
Definition: ParseHelpers.cs:525
Loyc.Syntax.Lexing.TokenKind
TokenKind
A list of token categories that most programming languages have.
Definition: TokenKind.cs:47
Loyc.Math.INumTraits.MinValue
T MinValue
Minimum value of this type above negative infinity.
Definition: Interfaces.cs:96
Loyc.Syntax.Precedence.LeftContext
Precedence LeftContext(Precedence outerContext)
For use in printers. Auto-raises the precedence floor to prepare to print an expression on the left s...
Definition: Precedence.cs:254
Loyc.Syntax.Les.Les2PrecedenceMap
This class's main job is to maintain a table of Precedence values for LES operators....
Definition: LesPrecedenceMap.cs:17
Loyc.Threading.ThreadLocalVariable
Provides access to a thread-local variable through a dictionary that maps thread IDs to values.
Definition: ThreadEx.cs:468
Loyc.Collections.IBRange< T >
Loyc.MessageSink.Console
static readonly ConsoleMessageSink Console
Sends all messages to the System.Console.WriteLine(string).
Definition: MessageSink.out.cs:311
Loyc.Syntax.CodeSymbols.Sizeof
static readonly Symbol Sizeof
"'sizeof" sizeof(int) <=> @'sizeof(int)
Definition: CodeSymbols.cs:100
Loyc.MessageSinkWithContext.Write
void Write(Severity level, TContext context, string format)
Writes a message to the target that this object represents.
Definition: WrapperSinks.cs:224
Loyc.LLParserGenerator.LLParserGenerator.GrammarPos
Represents a location in a grammar: a predicate and a "return stack" which is a so-called persistent ...
Definition: KthSet.cs:148
Loyc.Collections.Impl.AListIndexer
Observes changes and builds a table of items in the tree.
Definition: AListIndexer.cs:42
Loyc.Syntax.IParsingService.CanPreserveComments
bool CanPreserveComments
Returns true if the parser supports preserving comments.
Definition: IParsingService.cs:36
Loyc.StringBuilderExt.SubstringEquals
static bool SubstringEquals(StringBuilder sb, int start, UString what, bool ignoreCase=false)
Checks if the sequences of characters what is equal to sb.Substring(start, what.Length),...
Definition: StringBuilderExt.cs:145
Loyc.LLParserGenerator.Seq
Represents a sequence of predicates (Preds).
Definition: Predicates.cs:234
Loyc.Syntax.ILNodePrinter.Print
void Print(LNode node, StringBuilder target, IMessageSink sink=null, ParsingMode mode=null, ILNodePrinterOptions options=null)
Serializes the specified syntax tree to a StringBuilder in the syntax supported by this object.
Loyc.Collections.BList.FindLowerBound
int FindLowerBound(T item)
Definition: BList.cs:330
Loyc.Collections.BList.BList
BList(int maxLeafSize, int maxInnerSize)
Definition: BList.cs:64
Loyc.Syntax.CodeSymbols.ModAssign
static readonly Symbol ModAssign
"%=" set-to-remainder operator
Definition: CodeSymbols.cs:116
Loyc.Collections.LCExt.ToArray< T >
static T[] ToArray< T >(this ICollectionSource< T > list)
Converts the collection to an array.
Definition: ICollectionSource.cs:53
Loyc.Syntax.Les.NodePrinterWriterBase
Abstract base class for INodePrinterWriter. Has an protected _indentLevel field that is increased by ...
Definition: INodePrinterWriter.cs:42
Loyc.MiniTest.IgnoreException
Thrown by Assert.Ignore().
Definition: MiniTest.cs:200
Loyc.LLParserGenerator.EndOfRule
A container for the follow set of a Rule.
Definition: Predicates.cs:979
Loyc.Syntax.Les.Les3Parser.Start
IEnumerable< LNode > Start(Holder< TokenType > separator)
Top-level rule: expects a sequence of statements followed by EOF
Definition: Les3.cs:422
Loyc.Collections.VList.Last
T Last
Returns the last item of the list (at index Count-1), which is the head of the list.
Definition: VList.cs:200
LeMP.MacroProcessor.IncrementTempCounter
static int IncrementTempCounter()
Gets the next number to use as a suffix for temporary variables, then increments it.
Definition: MacroProcessor.cs:259
Loyc.Utilities.CastOptions.AllowMissingParams
@ AllowMissingParams
Allow the cast even if NumberOfMethodsMissingParameters > 0
Loyc.Syntax.ParseHelpers.TryParseFloat
static float TryParseFloat(ref UString source, int radix, ParseNumberFlag flags=0)
Parses a string to a single-precision float, returning NaN on failure or an infinity value on overflo...
Definition: ParseHelpers.cs:578
Loyc.Collections.BList.BList
BList(BList< T > items, bool keepListChangingHandlers)
Definition: BList.cs:104
Loyc.Ecs.ICI
ICI
Flags for EcsNodePrinter.IsComplexIdentifier.
Definition: EcsNodePrinter.cs:1152
Loyc.LLParserGenerator.LlpgGeneralTestsBase
Shared base class for "full-stack" LLLPG tests that use LeMP, the Ecs parser, and LLLPG macros in add...
Definition: LlpgGeneralTestsBase.cs:19
LeMP.Tests.TestReplaceMacro
Definition: TestReplaceMacro.cs:11
Loyc.Syntax.Les.Les3PrinterOptions.PrefixNotationOnly
bool PrefixNotationOnly
Print purely in prefix notation, e.g. ‘’+`(2,3) instead of 2 + 3.
Definition: Les3Printer.cs:1486
Loyc.LLParserGenerator.Alts.ErrorBranch
Pred ErrorBranch
Specifies the action to take for error input. If an error branch is specified, it serves as the defau...
Definition: Predicates.cs:473
Loyc.LLParserGenerator.LlpgHelpers
Helper methods for making LLLPG grammar nodes. Used by LlpgCoreTests.
Definition: LlpgCoreTests.cs:15
Loyc.Syntax.NodeStyle
NodeStyle
Suggests a printing style when serializing a Loyc tree to text.
Definition: NodeStyle.cs:29
LeMP.TestCompiler
A simple version of Compiler that takes a single input and produces a StringBuilder....
Definition: MacroProcessorTests.cs:120
Loyc.MessageMulticaster.IsEnabled
bool IsEnabled(Severity level)
Returns true if s.IsEnabled(type) is true for at least one target message sink 's'.
Definition: WrapperSinks.cs:155
Loyc.Syntax.Les.Les2Parser
Parses LES (Loyc Expression Syntax) code into a sequence of Loyc trees (LNode), one per top-level sta...
Definition: Les2Parser.cs:26
Loyc.Collections.IIsEmpty
Holds the IsEmpty property that tells you if a collection is empty.
Definition: ICount.cs:25
Loyc.Collections.IPush
Represents a collection that accepts a sequence of items.
Definition: Queue interfaces.cs:8
Loyc.LLParserGenerator.GeneralCodeGenHelper.LAType
override LNode LAType()
Returns the data type of LA(k)
Definition: GeneralCodeGenHelper.cs:224
Loyc.Syntax.CodeSymbols.Await
static readonly Symbol Await
await(x); <=> await x; (TENTATIVE: should this be changed to #await?)
Definition: CodeSymbols.cs:76
Loyc.Collections.IFRange.PopFirst
T PopFirst(out bool fail)
Removes the first item from the range and returns it.
Loyc.LLParserGenerator.IntSet.IsEmptySet
bool IsEmptySet
Returns true iff the set is empty. When the set is inverted and contains the set of all integers,...
Definition: IntSet.cs:221
Loyc.Collections.MMap.Except
MMap< K, V > Except(MapOrMMap< K, V > other)
Definition: MMap.cs:295
Loyc.Syntax.Precedence.Lo
readonly sbyte Lo
Lo and Hi specify the miscibility of an operator; see the remarks of Precedence for details.
Definition: Precedence.cs:244
Loyc.LLParserGenerator.IPGCodeGenHelper.GenerateSwitch
LNode GenerateSwitch(IPGTerminalSet[] branchSets, LNode[] branchCode, MSet< int > casesToInclude, LNode defaultBranch, LNode laVar)
Generates a switch statement with the specified branches where branchCode[i] is the code to run if th...
Loyc.Syntax.ParseHelpers.TryParseHex
static int TryParseHex(ref UString s, out int value)
A simple method to parse a sequence of hex digits, without overflow checks or other features supporte...
Definition: ParseHelpers.cs:28
Loyc.Syntax.ILNode.Kind
LNodeKind Kind
Definition: ILNode.cs:47
Loyc.G.PutInRange
static uint PutInRange(this uint n, uint min, uint max)
Returns num clamped to the range min and max.
Definition: GRange.out.cs:48
Loyc.Syntax.PrintHelpers.AppendIntegerTo
static StringBuilder AppendIntegerTo(StringBuilder target, long value, string prefix="", int @base=10, int separatorInterval=3, char separatorChar='_')
Same as IntegerToString(long, string, int, int, char) except that the target StringBuilder must be pr...
Definition: PrintHelpers.cs:178
Loyc.Syntax.Lexing.BaseLexer.SavePosition
A helper class used by LLLPG for backtracking.
Definition: BaseLexer.cs:442
Loyc.Syntax.Les.Les2PrecedenceMap.Find
Precedence Find(OperatorShape shape, object op, bool cacheWordOp=true, bool les3InfixOp=false)
Gets the precedence in LES of a prefix, suffix, or infix operator.
Definition: LesPrecedenceMap.cs:42
Loyc.MiniTest.Assert.Inconclusive
static void Inconclusive()
Short for Inconclusive("").
Definition: MiniTest.cs:324
Loyc.Syntax.AbstractTriviaInjector.SortedTrivia
IListSource< Trivia > SortedTrivia
List of trivia to be injected by Run. Must be sorted.
Definition: AbstractTriviaInjector.cs:93
Loyc.G.IsInRangeExcludeHi
static bool IsInRangeExcludeHi(this uint num, uint lo, uint hi)
Returns true if num is between lo and hi, excluding hi but not lo.
Definition: GRange.out.cs:40
Loyc.LLParserGenerator.LLParserGenerator.GenerateCodeVisitor
Directs code generation using the visitor pattern to visit the predicates in a rule....
Definition: GenerateCodeVisitor.cs:26
Loyc.Collections.Set.IsProperSupersetOf
bool IsProperSupersetOf(Set< T > other)
Definition: Set.cs:158
Loyc.Collections.Impl.InternalSet.Enumerator.SetCurrentValue
void SetCurrentValue(T value, ref InternalSet< T > set, IEqualityComparer< T > comparer)
Changes the value associated with the current key.
Definition: InternalSet.cs:1161
Loyc.Math.IIncrementer.NextLower
T NextLower(T a)
Returns the next representable number lower than a.
Loyc.Syntax.EscapeC.HasInvalid6DigitEscape
@ HasInvalid6DigitEscape
While unescaping, a valid \u escape was encountered with 6 digits, but the number was more than 0x10F...
Loyc.Collections.BDictionary.AddIfNotPresent
bool AddIfNotPresent(ref K key, ref V value)
Add a pair if it is not alredy present, or get its value if it is.
Definition: BDictionary.cs:463
Loyc.Collections.MMap.MMap
MMap(IEnumerable< KeyValuePair< K, V >> copy)
Creates a map with the specified elements.
Definition: MMap.cs:49
Loyc.Collections.MMap.Remove
bool Remove(KeyValuePair< K, V > item)
Removes a pair from the map.
Definition: MMap.cs:117
Loyc.Collections.AListOperation.Remove
@ Remove
Remove the item with the specified key if present.
Loyc.Collections.Impl.InternalSetStats.NodeCount
int NodeCount
Total number of nodes.
Definition: InternalSet.cs:1690
Loyc.Collections.FWList.Transform
FWList< T > Transform(VListTransformer< T > x)
Transforms a list (combines filtering with selection and more).
Definition: FWList.cs:214
Loyc.Syntax.CodeSymbols._Negate
static readonly Symbol _Negate
Alias for Sub. Infix and prefix operators use same symbol.
Definition: CodeSymbols.cs:36
Loyc.Syntax.NodeStyle.Operator
@ Operator
Indicates that a node was parsed as an operator (infix, prefix, suffix, or other operator),...
LeMP.Tests.TestOnFinallyReturnThrowMacros
Definition: TestOnFinallyReturnThrowMacros.cs:13
Loyc.Math.INumTraits.Epsilon
T Epsilon
Smallest representable positive value of T (1 for integer types).
Definition: Interfaces.cs:100
Loyc.SeverityMessageFilter.MinSeverity
Severity MinSeverity
Gets or sets the minimum severity that passes the filter. Note: usually this property should be set t...
Definition: WrapperSinks.cs:40
Loyc.Collections.DList.CopyTo
void CopyTo(T[] array, int arrayIndex)
Copies the elements of the collection to an Array, starting at a particular array index.
Definition: DList.cs:237
Loyc.SymbolPool.Get
Symbol Get(string name, int id)
Creates a Symbol in this pool with a specific ID, or verifies that the requested Name-Id pair is pres...
Definition: Symbol.cs:251
Loyc.Collections.MSet.AddOrFind
bool AddOrFind(ref T item, bool replaceIfPresent)
Adds the specified item to the set, and retrieves an existing copy of the item if one existed....
Definition: MSet.cs:105
Loyc.Collections.Impl.InternalList.Clear
void Clear()
Clears the list and frees the memory used by the list. Can also be used to initialize a list whose co...
Definition: InternalList.cs:260
Loyc.Collections.FVList.IndexOf
int IndexOf(T item)
Searches for the specified object and returns the zero-based index of the first occurrence (lowest in...
Definition: FVList.cs:341
Loyc.Collections.Impl.EnumeratorFrame
A standard base class for enumerator frames used by NestedEnumerator{EnumeratorFrame{T},...
Definition: NestedEnumerator.cs:193
Loyc.Collections.VList
VList represents a reference to a reverse-order FVList.
Definition: VList.cs:50
Loyc.Collections.SelectListSource
Helper class: provides a modified view of an IListSource by transforming each element on-demand....
Definition: SelectListSource.out.cs:101
LeMP.Tests.TestCodeQuoteMacro
Definition: TestCodeQuoteMacro.cs:10
LeMP.TestCompiler.StripExtraWhitespace
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 "...
Definition: MacroProcessorTests.cs:160
Loyc.Collections.DictionaryExt.RemoveRange< K, V >
static int RemoveRange< K, V >(this IDictionary< K, V > dict, IEnumerable< K > list)
Tries to remove a set of key-values from a dictionary based on their keys.
Definition: DictionaryExt.cs:104
Loyc.MiniTest.Assert.Ignore
static void Ignore(string format, params object[] args)
Stops a test via StopTestHandler, which, by default, throws an IgnoreException. This causes the test ...
Definition: MiniTest.cs:293
Loyc.Collections.ICollectionSource
A variation of IReadOnlyCollection that provides the Contains() and CopyTo() methods from ICollection...
Definition: ICollectionSource.cs:32
Loyc.Syntax.SourceFile
A default implementation of ISourceFile based on IndexPositionMapper.
Definition: SourceFile.cs:11
Loyc.Collections.Bijection.Bijection
Bijection(IEnumerable< KeyValuePair< K1, K2 >> input, int capacity=0)
Constructs a bijection out of two Dictionary<TKey,TValue> objects, copying the specified initial cont...
Definition: Bijection.cs:58
LeMP.IMacroContext.AllKnownMacros
IReadOnlyDictionary< Symbol, VList< MacroInfo > > AllKnownMacros
Gets information about all macros registered with the macro processor, including macros whose namespa...
Definition: IMacroContext.cs:117
Loyc.Syntax.ILNode.Target
ILNode Target
Definition: ILNode.cs:52
Loyc.Collections.MSet.IntersectWith
int IntersectWith(ISet< T > other)
Removes all items from this set that are not present in 'other'.
Definition: MSet.cs:236
Loyc.HashTags
An implementation of IAttributes that can hold one attribute before allocating any memory for a hasht...
Definition: HashTags.cs:14
Loyc.ByteArrayInString.Convert
static ArraySlice< byte > Convert(string s)
Decodes a BAIS string back to a byte array.
Definition: ByteArrayInString.cs:130
Loyc.Syntax.IIndexToLine
Contains IndexToLine method.
Definition: IIndexPositionMapper.cs:12
Loyc.MessageSink.Trace
static readonly TraceMessageSink Trace
Sends all messages to System.Diagnostics.Trace.WriteLine(string).
Definition: MessageSink.out.cs:309
Loyc.Syntax.CodeSymbols.Shr
static readonly Symbol Shr
">>" Right-shift operator
Definition: CodeSymbols.cs:54
Loyc.Syntax.SourcePosAndIndex
A SourcePos that also includes the original index from which the Line and PosInLine were derived.
Definition: LineRemapper.cs:68
Loyc.UString.Substring
UString Substring(int start)
Returns the sequence of code units from this UString starting at the index start, e....
Definition: UString.cs:361
Loyc.LLParserGenerator.CodeGenHelperBase.CreateTryWrapperForRecognizer
LNode CreateTryWrapperForRecognizer(Rule rule)
See IPGCodeGenHelper.CreateTryWrapperForRecognizer for more information.
Definition: CodeGenHelperBase.cs:396
Loyc.Localize.SetFormatter
static SavedThreadLocal< FormatterDelegate > SetFormatter(FormatterDelegate newValue)
Sets the formatter method.
Definition: Localize.cs:247
Loyc.Threading.ThreadEx
Creates and controls a thread, and fills in a gap in the .NET framework by propagating thread-local v...
Definition: ThreadEx.cs:58
Loyc.Collections.IBRangeEx
A bidirectional range that can perform operations such as intersection and overlap tests on pairs of ...
Definition: IRanges.cs:313
Loyc.G.IsInRange
static bool IsInRange(this float num, float lo, float hi)
Returns true if num is between lo and hi.
Definition: GRange.out.cs:95
Loyc.Collections.NegListSource
Adapter: provides a view of an IListSource<T> in which the Count is the same, but the minimum index i...
Definition: NegListSource.cs:38
Loyc.Collections.BMultiMap.RemoveAny
bool RemoveAny(K key)
Removes one pair from the collection that matches the specified key.
Definition: BMultiMap.cs:163
Loyc.Syntax.IHasFileName
Definition: ILineColumnFile.cs:5
Loyc.Collections.IndexedAList
A simple wrapper around AList that includes an AListIndexer<K,T> that can be used to find items relat...
Definition: IndexedAList.cs:31
Loyc.Collections.Impl.SCell
Standard cell, used to encode keys in a CPSNode
Definition: CPSNode.cs:12
Loyc.Syntax.Lexing.Token.Kind
TokenKind Kind
Token kind.
Definition: Token.cs:232
LeMP.MacroProcessor.ProcessSynchronously
VList< LNode > ProcessSynchronously(VList< LNode > stmts)
Processes a list of nodes directly on the current thread.
Definition: MacroProcessor.cs:197
Loyc.Collections.IListSource.Slice
IRange< T > Slice(int start, int count=int.MaxValue)
Returns a sub-range of this list.
Loyc.Collections.AListBase.CopySectionHelper
AListNode< K, T > CopySectionHelper(int start, int subcount)
Together with the AListBase<K,T>.AListBase(AListBase<K,T>,AListNode<K,T>) constructor,...
Definition: AListBase.cs:1042
Loyc.Collections.WList.Transform
WList< T > Transform(VListTransformer< T > x)
Transforms a list (combines filtering with selection and more).
Definition: WList.cs:207
LeMP.Compiler.OpenSourceFiles
static List< InputOutput > OpenSourceFiles(IMessageSink sink, IEnumerable< string > fileNames)
Opens a set of source files by file name, and creates a text file for each.
Definition: Compiler.cs:507
Loyc.Syntax.Lexing.BaseILexer.AfterNewline
override void AfterNewline()
The lexer must call this method exactly once after it advances past each newline, even inside comment...
Definition: BaseILexer.cs:123
Loyc.Ecs.Parser.EcsLexer.NextToken
Maybe< Token > NextToken()
Scans the next token and returns information about it.
Definition: EcsLexer.cs:54
Loyc.Collections.Set.IsProperSubsetOf
bool IsProperSubsetOf(IEnumerable< T > other)
Definition: Set.cs:155
Loyc.Syntax.PrintHelpers.HexDigitChar
static char HexDigitChar(int value)
Gets the hex digit character for the specified value, or '?' if the value is not in the range 0....
Definition: PrintHelpers.cs:17
Loyc.Collections.AListBase.ObserverMgr.ItemRemoved
void ItemRemoved(T item, AListLeafBase< K, T > parent)
Called when an item is removed from a leaf node.
Definition: AListNodeObserver.cs:84
Loyc.Syntax.ISourceFile
Represents a text file with a file name and its textual content, plus the data necessary to convert b...
Definition: ISourceFile.cs:12
Loyc.LLParserGenerator.GeneralCodeGenHelper.LaType
LNode LaType
Specifies the data type of LA0 and lookahead variables.
Definition: GeneralCodeGenHelper.cs:37
Loyc.Geometry.INewRectangle3
This interface exists to work around a limitation of C#; see IRectangle3<T>.
Definition: IRectangle3.cs:75
Loyc.Collections.SelectDictionaryFromKeys
An adapter that converts a collection of keys to an IReadOnlyDictionary. Used by EnumerableExt....
Definition: SelectDictionaryFromKeys.cs:59
Loyc.Collections.IDeque
Represents a double-ended queue that allows items to be added or removed at the beginning or end.
Definition: Queue interfaces.cs:63
Loyc.Ecs.EcsLanguageService
The Value property provides easy access to the lexer, parser and printer for Enhanced C#.
Definition: EcsLanguageService.cs:20
Loyc.Collections.VList.SmartWhere
VList< T > SmartWhere(Func< T, bool > keep)
Applies a filter to a list, to exclude zero or more items.
Definition: VList.cs:525
Loyc.Math.IAdditionGroup
This defines a Group with the operation +, the neutral element Zero, and an operation - that is defin...
Definition: Interfaces.cs:209
LeMP.IMacroContext.RegisterMacro
void RegisterMacro(MacroInfo macroInfo)
Registers a new macro in the current scope.
Loyc.StringBuilderExt.TrimEnd
static StringBuilder TrimEnd(this StringBuilder sb, params char[] trimChars)
Removes all trailing occurrences of the specified set of characters from the StringBuilder object.
Definition: StringBuilderExt.cs:53
Loyc.Syntax.CodeSymbols._Pointer
static readonly Symbol _Pointer
Alias for Mul.
Definition: CodeSymbols.cs:34
Loyc.Utilities.GoInterface.Unwrap
static object Unwrap(object obj)
Unwraps an object if it was wrapped by GoInterface. Unwrapping is recursive, so that if a wrapper is ...
Definition: GoInterface.cs:97
Loyc.Collections.Impl.ReadOnlyCollectionBase
Helps you implement read-only collections by providing default implementations for most methods of IC...
Definition: ReadOnlyCollectionBase.cs:19
Loyc.Collections.ListSlice.CopyTo
void CopyTo(T[] array, int arrayIndex)
Copies the elements of the collection to an Array, starting at a particular array index.
Definition: ListSlice.cs:232
Loyc.Collections.IListSource< T >
Loyc.Math.IField
This defines a Field with the operations +,-,*,/
Definition: Interfaces.cs:307
Loyc.Collections.DictEditMode.ReplaceIfPresent
@ ReplaceIfPresent
Replace an existing pair if present, or do nothing if no matching key.
Loyc.Collections.ISetImm.IsInverted
bool IsInverted
Returns true if the set is inverted, which means that the enumerator returns all the items that are n...
Definition: ISetImm.cs:51
Loyc.Collections.FVList.Add
void ICollection< T >. Add(T item)
Inserts an item at the front (index 0) of the FVList.
Definition: FVList.cs:392
Loyc.Syntax.CodeSymbols.Delegate
static readonly Symbol Delegate
e.g. #delegate(#int32, Foo, @'tuple()); <=> delegate int Foo();
Definition: CodeSymbols.cs:167
Loyc.Syntax.Les.Les3PrinterOptions.ForcedLineBreakThreshold
int ForcedLineBreakThreshold
Although the LES3 printer is not designed to insert line breaks mid-expression or to keep lines under...
Definition: Les3Printer.cs:1513
Loyc.Syntax.Lexing.LexerWrapper
A base class for wrappers that modify lexer behavior. Implements the ILexer interface,...
Definition: ILexer.cs:38
Loyc.Collections.Impl.CPIntTrie.Add
void Add(int key, TValue value)
Adds the specified key-value pair to the trie, throwing an exception if the key is already present.
Definition: CPIntTrie.cs:364
Loyc.Collections.SparseAList.ClearSpace
void ClearSpace(int index, int count=1)
Unsets the range of indices index to index+count-1 inclusive. If index + count > Count,...
Definition: SparseAList.cs:237
Loyc.Utilities.GoInterface.From
static Interface From(T obj)
Creates a wrapper if the interface matches T well.
Definition: GoInterface.cs:441
LeMP.MacroInfo.GetMacros
static IEnumerable< MacroInfo > GetMacros(Type type, IMessageSink errorSink=null, Symbol @namespace=null, object instance=null)
Uses reflection to find a list of macros within the specified type by searching for (static) methods ...
Definition: MacroAttributes.cs:155
Loyc.Syntax.LNode.Printer
static ILNodePrinter?? Printer
Gets or sets the default node printer on the current thread, which controls how nodes are serialized ...
Definition: LNode.cs:518
Loyc.Syntax.LNode.GetHashCode
override int GetHashCode()
Gets the hash code based on the structure of the tree.
Definition: LNode.cs:679
Loyc.Collections.MutableListExtensionMethods.LCExt.AsNegList< T >
static NegList< T > AsNegList< T >(this IList< T > list, int zeroOffset)
Definition: NegList.cs:19
Loyc.Collections.ICharSource.Slice
new UString Slice(int startIndex, int length)
Returns a substring from the character source. If some of the requested characters are past the end o...
Loyc.Syntax.ParserSource
An implementation of the LLLPG Parser API, used with the LLLPG options inputSource and inputClass.
Definition: ParserSource.cs:30
Loyc.Collections.AListBase.AddObserver
virtual bool AddObserver(IAListTreeObserver< K, T > observer)
Attaches a tree observer to this object.
Definition: AListBase.cs:1150
Loyc.Collections.IPriorityQueue
Represents a priority queue, in which Pop() always returns the largest or smallest item.
Definition: Queue interfaces.cs:56
Loyc.Collections.XfAction
XfAction
Values that can be returned by the VListTransformer function that the user passes to the Transform me...
Definition: VListBlock.cs:1447
Loyc.Syntax.CallNode.Clone
abstract override LNode Clone()
Creates a copy of the node. Since nodes are immutable, there is little reason for an end-user to call...
Loyc.Collections.MSet.SetEquals
bool SetEquals(IEnumerable< T > other)
Definition: MSet.cs:294
Loyc.Syntax.LNode.HasSimpleHeadWithoutPAttrs
virtual bool HasSimpleHeadWithoutPAttrs()
Returns true if this is not a call, or if the call's Target is an Id or a Literal,...
Definition: LNode.cs:716
Loyc.Syntax.Lexing.BaseILexer.ScanIndent
void ScanIndent(bool skipSpaces=true)
Scans indentation at the beginning of a line and updates the IndentLevel and IndentString properties....
Definition: BaseILexer.cs:150
Loyc.Collections.InvertibleSet.IsSubsetOf
bool IsSubsetOf(InvertibleSet< T > other)
TODO NOT IMPLEMENTED Returns true if all items in this set are present in the other set.
Definition: InvertibleSet.cs:127
Loyc.Collections.MapOrMMap.CountMemory
virtual long CountMemory(int sizeOfPair)
Measures the total size of all objects allocated to this collection, in bytes, including the size of ...
Definition: Map.cs:156
Loyc.MiniTest.Assert.Success
static void Success()
Short for Success("").
Definition: MiniTest.cs:329
Loyc.Collections.CPStringTrie
A compact patricia trie that uses strings as keys.
Definition: CPStringTrie.cs:15
Loyc.Syntax.Lexing.LexerWrapper.IndexToLine
SourcePos IndexToLine(int index)
Returns the position in a source file of the specified index.
Definition: ILexer.cs:78
Loyc.Syntax.CallNode.WithValue
override LiteralNode WithValue(object value)
Creates a new literal node with a different Value than the current literal node.
Definition: AbstractNodes.cs:102
Loyc.LLParserGenerator.IPGCodeGenHelper.EmptySet
IPGTerminalSet EmptySet
Returns an empty set of the appropriate type for the kind of parser being generated by this code.
Definition: IPGCodeGenHelper.cs:29
Loyc.Math.IBinaryMath
Provides additional bit-oriented integer operations.
Definition: Interfaces.cs:178
Loyc.Collections.IOptimize
Interface for an Optimize() method.
Definition: Other interfaces.cs:36
Loyc.Ecs.EcsValidators.IsVariableDeclExpr
static bool IsVariableDeclExpr(LNode expr, out LNode type, out LNode name, out LNode initialValue, Pedantics p=Pedantics.Lax)
Verifies that a declaration of a single variable is valid, and gets its parts.
Definition: EcsValidators.cs:324
Loyc.Collections.Impl.AListIndexer.ItemAdded
void ItemAdded(T item, AListLeafBase< K, T > parent)
Called when an item is added to a leaf node.
Definition: AListIndexer.cs:100
Loyc.Syntax.Lexing.LexerSource.Newline
new void Newline()
Definition: LexerSource.cs:104
Loyc.Syntax.CodeSymbols.Implicit
static readonly Symbol Implicit
e.g. [#implicit] #fn(#int32, [#operator] #cast, (Foo a,))
Definition: CodeSymbols.cs:175
Loyc.Syntax.Les.Les2LanguageService.Print
void Print(IEnumerable< LNode > nodes, StringBuilder target, IMessageSink msgs=null, ParsingMode mode=null, ILNodePrinterOptions options=null)
Serializes a list of syntax trees to a StringBuilder in the syntax supported by this object.
Definition: Les2LanguageService.cs:42
Loyc.Geometry.IRectangleBase
Represents a mutable 2D rectangle.
Definition: IRectangle.cs:71
Loyc.Collections.NegListSlice
Adapter: a random-access range for a slice of an INegListSource<T>.
Definition: NegListSlice.cs:22
Loyc.Syntax.Les.Les2LanguageService.Parse
IListSource< LNode > Parse(IListSource< Token > input, ISourceFile file, IMessageSink msgs, ParsingMode inputType=null)
Parses a token tree, such as one that came from a token literal.
Definition: Les2LanguageService.cs:79
Loyc.Syntax.SourceFileWithLineRemaps.LineToIndex
int LineToIndex(int lineNo)
Returns the index in a source file of the beginning of the specified line, where the first line is nu...
Definition: LineRemapper.cs:44
Loyc.Collections.AList
An all-purpose list structure with the following additional features beyond what's offered by List<T>...
Definition: AList.cs:122
Loyc.Collections.LinqToLists.LastOrDefault< T >
static T LastOrDefault< T >(this IReadOnlyList< T > list, T defaultValue=default(T))
Gets the last item from the list (Count - 1), or defaultValue if the list is empty.
Definition: LinqToLists.out.cs:57
Loyc.Syntax.NodeScanMode
NodeScanMode
Specifies which children to enumerate when calling LNode.Descendants().
Definition: DescendantsFrame.cs:14
Loyc.Collections.IAutoCreatePool.GetIfExists
TValue GetIfExists(TKey key)
Gets the item with the specified key, if it was created earlier.
Loyc.Collections.BMultiMap.BMultiMap
BMultiMap(Func< K, K, int > compareKeys)
Initializes the map with the specified key-comparer and default value comparer. This constructor can ...
Definition: BMultiMap.cs:67
Loyc.Collections.ISparseListEx
A sparse list that supports additional methods including InsertRange(int, ISparseListSource<T>).
Definition: ISparseList.cs:206
Loyc.Collections.AList.Sort
void Sort(Comparer< T > comp)
Uses a specialized "tree quicksort" algorithm to sort this list using the specified Comparer<T>.
Definition: AList.cs:361
Loyc.Collections.MSet.SetEquals
bool SetEquals(Set< T > other)
Definition: MSet.cs:288
Loyc.Collections.VList.Add
VList< T > Add(T item)
Inserts an item at the back (index Count) of the VList.
Definition: VList.cs:353
Loyc.Collections.MSet.IsProperSupersetOf
bool IsProperSupersetOf(MSet< T > other)
Definition: MSet.cs:281
Loyc.Syntax.EscapeC
EscapeC
Flags to control PrintHelpers.EscapeCStyle(UString, EscapeC)and the reverse operation in ParseHelpers...
Definition: PrintHelpers.cs:231
Loyc.Collections.Impl.AListInnerBase.CountSizeInBytes
override long CountSizeInBytes(int sizeOfT, int sizeOfK)
Tallies the memory use of the current node and all child nodes, with the assumption that each object ...
Definition: AListInnerBase.cs:36
Loyc.Collections.AList.Prepend
virtual void Prepend(AList< T > other)
Prepends an AList to this list in sublinear time.
Definition: AList.cs:342
Loyc.Collections.MinHeapInList
This priority queue wrapper type is returned from the AsMinHeap() extension method.
Definition: Heap.cs:300
Loyc.Collections.Set.IsProperSubsetOf
bool IsProperSubsetOf(ISet< T > other)
Definition: Set.cs:153
LeMP.MacroMode
MacroMode
Flags that affect the way that LeMP.MacroProcessor uses a LexicalMacro.
Definition: MacroAttributes.cs:81
Loyc.Syntax.Precedence.Precedence
Precedence(int actual)
Initializes a left-associative operator with the specified precedence.
Definition: Precedence.cs:225
Loyc.Syntax.Lexing.Token.StartIndex
readonly int StartIndex
Location in the orginal source file where the token starts, or -1 for a synthetic token.
Definition: Token.cs:236
Loyc.Collections.Repeated
Helper struct. A sequence that stores one value, but acts like a list in which that value is repeated...
Definition: Repeated.cs:38
Loyc.Syntax.Lexing.ILexer.InputPosition
int InputPosition
Current input position (an index into SourceFile.Text).
Definition: ILexer.cs:33
Loyc.Syntax.Les.INodePrinterWriter
This interface is implemented by helper objects that handle the low-level details of node printing....
Definition: INodePrinterWriter.cs:17
Loyc.Collections.VListBlock.AddRange
static FVList< T > AddRange(VListBlock< T > self, int localCount, IList< T > items, bool isRVList)
Adds a list of items to an immutable FVList.
Definition: VListBlock.cs:517
Loyc.Collections.DictionaryExt.AddRange< K, V >
static int AddRange< K, V >(this IDictionary< K, V > dict, IEnumerable< KeyValuePair< K, V >> list)
Adds data to a dictionary (dict.Add(key, value) for all pairs in a sequence.)
Definition: DictionaryExt.cs:86
Loyc.LLParserGenerator.AndPred.Local
bool Local
A local and-predicate cannot be hoisted into calling rules.
Definition: Predicates.cs:869
Loyc.Syntax.Les.Les3PrettyPrinter.PrintToHtml
StringBuilder PrintToHtml(ILNode node, StringBuilder output=null, bool addPreCode=true)
Definition: Les3PrettyPrinter.cs:208
Loyc.Syntax.CodeSymbols.Case
static readonly Symbol Case
e.g. #case(10, 20) <=> case 10, 20:
Definition: CodeSymbols.cs:135
Loyc.Syntax.Les.Les3PrinterOptions.SpaceAfterComma
bool SpaceAfterComma
Whether to print a space after each comma in an argument list.
Definition: Les3Printer.cs:1445
Loyc.Collections.BList.Do
int Do(AListOperation mode, T item)
Definition: BList.cs:190
Loyc.Syntax.NodeStyle.TDQStringLiteral
@ TDQStringLiteral
Used for a triple-double-quoted string literal like """foo""".
Loyc.void
@void.Value represents the sole value of System.Void (called "void" in C#).
Definition: void.cs:27
Loyc.Collections.ICount
Holds the Count property found in nearly all collection interfaces.
Definition: ICount.cs:18
Loyc.Syntax.StreamCharSource._eofPosition
uint _eofPosition
_eofPosition is the byte position of EOF if it has been reached or, if not, the position of the first...
Definition: StreamCharSource.cs:70
Loyc.Syntax.Les.Les2PrecedenceMap.Reset
virtual void Reset()
Forgets previously encountered operators to save memory.
Definition: LesPrecedenceMap.cs:28
Loyc.Collections.DictionaryExt
Extension methods for Dictionary<K,V>, IDictionary<K,V> and IDictionaryEx<K, V>.
Definition: DictionaryExt.cs:10
Loyc.Collections.IndexedAList.IndexesOf
List< int > IndexesOf(T item, bool sorted)
Returns a list of indexes at which the specified item can be found.
Definition: IndexedAList.cs:83
Loyc.LLParserGenerator.GeneralCodeGenHelper
General-purpose code generator that supports any language with a finite number of input symbols repre...
Definition: GeneralCodeGenHelper.cs:27
Loyc.Syntax.CodeSymbols.PtrArrow
static readonly Symbol PtrArrow
"->": a->b <=> <tt>->(a, b)
Definition: CodeSymbols.cs:107
Loyc.LLParserGenerator.Alts.DefaultArm
int? DefaultArm
Specifies the case that should be encoded as the default in the prediction tree, i....
Definition: Predicates.cs:484
Loyc.Syntax.LiteralNode
Base class of all nodes that represent literal values such as 123 and "foo".
Definition: AbstractNodes.cs:51
Loyc.Math.ITrigonometry
Provides trigonometry operations.
Definition: Interfaces.cs:218
Loyc.Math.IComplexMath
Use this interface for types such as complex numbers that satisfy the field axioms but do not have a ...
Definition: Interfaces.cs:392
Loyc.Syntax.IndexPositionMapper.IndexPositionMapper
IndexPositionMapper(CharSource source, SourcePos startingPos=null)
Initializes CharIndexPositionMapper.
Definition: IndexPositionMapper.cs:46
Loyc.LLParserGenerator.Seq.ChooseGotoLabel
override string ChooseGotoLabel()
Optional. If this predicate represents the matching code for a branch of an Alts and this code is rea...
Definition: Predicates.cs:267
Loyc.Collections.BufferedSequence
Adapter: This class wraps an IEnumerator<T> or IEnumerable<T> into an IListSource<T>,...
Definition: BufferedSequence.cs:45
Loyc.Collections.AListBase.ObserverMgr.Attach
bool? Attach(AListBase< K, T > list)
Called when the observer is being attached to an AList.
Definition: AListNodeObserver.cs:57
Loyc.Syntax.CodeSymbols.PostDec
static readonly Symbol PostDec
"suf--" Unary suffix decrement
Definition: CodeSymbols.cs:40
LeMP.Tests.A.AliasTest
Definition: MacroProcessorTests.cs:95
Loyc.Collections
Contains general-purpose interfaces (Loyc.Collections.IListSource<T>, ranges, etc....
Definition: Disambiguation interfaces.cs:6
Loyc.Collections.ListSlice
Adapter: a wrapper of a list that provides a view of a range of elements. Objects of this type are re...
Definition: ListSlice.cs:36
Loyc.Syntax.LNodeExt.GetCaptureIdentifier
static LNode GetCaptureIdentifier(LNode pattern, bool identifierRequired=true)
Checks if pattern matches one of the syntax trees $x or $(..x) or $(...x) for some identifier x....
Definition: LNodeExt.cs:447
Loyc.Syntax.CodeSymbols.Or
static readonly Symbol Or
"||" Logical short-circuit 'or' operator
Definition: CodeSymbols.cs:43
Loyc.Collections.EnumerableExt.IndexWhere< T >
static int IndexWhere< T >(this IEnumerable< T > list, Func< T, bool > pred)
Gets the lowest index at which a condition is true, or -1 if nowhere.
Loyc
Main Loyc namespace. This namespace includes all general-purpose code in the Loyc megaproject....
Definition: Disambiguation interfaces.cs:6
Loyc.Collections.MutableListExtensionMethods.LinqToLists.LastOrDefault< T >
static T LastOrDefault< T >(this IList< T > list, T defaultValue=default(T))
Gets the last item from the list (Count - 1), or defaultValue if the list is empty.
Definition: LinqToLists.out.cs:276
Loyc.Syntax.Les.Les3Parser
Definition: Les3.cs:401
Loyc.Math.IZeroProvider.Zero
T Zero
Returns the "zero" or additive identity of this type.
Definition: Interfaces.cs:82
Loyc.Collections.Impl.InternalList.Sort< T >
static void Sort< T >(T[] array, int index, int count, Comparison< T > comp)
Performs a quicksort using a Comparison function.
Definition: InternalList.cs:760
Loyc.Syntax.EmptySourceFile
A dummy implementation of ISourceFile that has only a filename, no source text. Used as the source fi...
Definition: EmptySourceFile.cs:13
Loyc.Collections.ISparseListEx.InsertRange
void InsertRange(int index, ISparseListSource< T > list)
Inserts another sparse list into this one.
Loyc.Collections.Heap.ToMinHeap< T >
static MinHeap< T > ToMinHeap< T >(this IList< T > list, IComparer< T > compare=null, bool heapify=true)
Copies the list into a new object with the items arranged as a min-heap (priority queue)....
Definition: Heap.cs:357
Loyc.Collections.ListExt.SelectArray< T, R >
static R[] SelectArray< T, R >(this T[] input, Func< T, R > selector)
Maps an array to another array of the same length.
Definition: ListExt.cs:568
Loyc.Ecs.EcsPrinterOptions.QuoteUnprintableLiterals
bool QuoteUnprintableLiterals
When the printer encounters an unprintable literal, it calls Value.ToString(). When this flag is set,...
Definition: EcsNodePrinter.cs:1357
Loyc.Syntax.CodeSymbols.NewAttribute
static readonly Symbol NewAttribute
"#new": public new void Foo() {} <=> [#public, #new] #fn(#void, Foo, #(), {})
Definition: CodeSymbols.cs:97
Loyc.Syntax.CodeSymbols.Of
static readonly Symbol Of
"'of" for giving generic arguments. @'of(List,int) <=> List<int>
Definition: CodeSymbols.cs:93
Loyc.Collections.FVList.operator==
static bool operator==(FVList< T > lhs, FVList< T > rhs)
Returns whether the two list references are the same. Does not compare the contents of the lists.
Definition: FVList.cs:123
Loyc.Collections.MutableListExtensionMethods.LinqToLists.Last< T >
static T Last< T >(this IList< T > list)
Gets the last item from the list (at list.Max).
Definition: LinqToLists.out.cs:268
Loyc.Syntax.LNodeExt.WithTrailingTrivia
static VList< LNode > WithTrailingTrivia(this VList< LNode > attrs, VList< LNode > trivia)
Removes all existing trailing trivia from an attribute list and adds a new list of trailing trivia.
Definition: LNodeExt.cs:50
Loyc.Collections.Impl.KeyWalker._offset
int _offset
_key[_offset] is the next byte of the key
Definition: CPTrieMisc.cs:133
Loyc.Syntax.PrintHelpers.IntegerToString
static string IntegerToString(long value, string prefix="", int @base=10, int separatorInterval=3, char separatorChar='_')
Converts an integer to a string, optionally with separator characters for readability.
Definition: PrintHelpers.cs:161
Loyc.Collections.BList.Clone
BList< T > Clone(bool keepListChangingHandlers)
Clones a BList.
Definition: BList.cs:277
Loyc.Syntax.CodeSymbols.AddAssign
static readonly Symbol AddAssign
"+=" add-and-set operator
Definition: CodeSymbols.cs:118
Loyc.MiniTest.RunTests.Run
static int Run(object o)
Runs all test methods on the given object (public methods that have a TestAttribute).
Definition: RunTests.cs:27
Loyc.Collections.WeakKeyDictionary.Count
override int Count
Number of items in the collection.
Definition: WeakKeyDictionary.cs:43
Loyc.Collections.DictionaryDebugView
Workaround for a limitation of the debugger: it doesn't support CollectionDebugView<T> when T is KeyV...
Definition: CollectionDebugView.cs:51
LeMP.Tests.TestUnrollMacro
Definition: TestUnrollMacro.cs:10
Loyc.Syntax.Lexing.BaseLexer.BaseLexer
BaseLexer(CharSrc chars, string fileName="", int inputPosition=0, bool newSourceFile=true)
Initializes BaseLexer.
Definition: BaseLexer.cs:91
Loyc.Syntax.Lexing.IndentTokenGenerator.IndentTokenGenerator
IndentTokenGenerator(ILexer< Token > lexer, int[] allIndentTriggers, Token? eolToken, Token indentToken, Token dedentToken)
Initializes the indent detector.
Definition: IndentTokenGenerator.cs:510
Loyc.Collections.VListBlock.RemoveAt
FVList< T > RemoveAt(int localCount, int distanceFromFront)
Removes the specified number of items from a FVList where localCount is the number of items in the FV...
Definition: VListBlock.cs:486
Loyc.Syntax.LNodeExt.ToLNode
static LNode ToLNode(this ILNode node)
Converts ILNode to LNode recursively.
Definition: LNodeExt.cs:606
Loyc.Collections.MSet.RemoveWhere
int RemoveWhere(Predicate< T > match)
Removes all elements that match the conditions defined by the specified predicate from this collectio...
Definition: MSet.cs:415
Loyc.Collections.BList.BList
BList(Func< T, T, int > compareItems, int maxLeafSize)
Definition: BList.cs:70
Loyc.Syntax.CodeSymbols.Assign
static readonly Symbol Assign
"=" Assignment operator
Definition: CodeSymbols.cs:57
Loyc.Syntax.CodeSymbols.Unchecked
static readonly Symbol Unchecked
e.g. #unchecked({ stmt; }); <=> unchecked { stmt; }
Definition: CodeSymbols.cs:143
Loyc.Collections.VListBlockOfTwo.Add
override VListBlock< T > Add(int localIndex, T item)
Inserts a new item at the "front" of a FVList where localCount is the number of items currently in th...
Definition: VListBlockOfTwo.cs:103
Loyc.Collections.ICollectionAndSource
This interface is to be implemented by read-only sequence types that still want to be compatible with...
Definition: Disambiguation interfaces.cs:22
Loyc.Syntax.LNodeVisitor
Base class for people that want to implement the visitor pattern with LNode.
Definition: LNodeVisitor.cs:9
LeMP.LexicalMacroAttribute
Marks a method as a LeMP lexical macro.
Definition: MacroAttributes.cs:54
Loyc.Syntax.LNode.MergeBinary
static LNode MergeBinary(LNode node1, LNode node2, Symbol binaryOpName)
Combines two nodes using a binary operator or function.
Definition: LNode.cs:774
Loyc.Syntax.StreamCharSource._reachedEnd
bool _reachedEnd
Set true when the last block has been scanned. If true, then _eofIndex and _eofPosition indicate the ...
Definition: StreamCharSource.cs:62
LeMP.MacroProcessor.PreOpenedNamespaces
ICollection< Symbol > PreOpenedNamespaces
Macros in these namespaces will be available without an explicit import command (#importMacros)....
Definition: MacroProcessor.cs:116
Loyc.Collections.MutableListExtensionMethods.ICollectionExt.AddRange< K >
static void AddRange< K >(this ICollection< K > set, IEnumerable< K > list)
Adds data to a set (set.Add(value) for all values in a sequence.)
Definition: ICollectionExt.cs:13
Loyc.Collections.VListBlock.ToArray
static T[] ToArray(VListBlock< T > self, int localCount, bool isRList)
Converts any kind of FVList to an array, quickly.
Definition: VListBlock.cs:1041
Loyc.LLParserGenerator.CodeGenHelperBase.Begin
virtual void Begin(WList< LNode > classBody, ISourceFile sourceFile)
Before the parser generator generates code, it calls this method.
Definition: CodeGenHelperBase.cs:131
Loyc.Ecs.EcsPrinterOptions.SpaceAfterPrefixStopPrecedence
int SpaceAfterPrefixStopPrecedence
The printer avoids printing spaces after prefix operators that have the specified precedence or highe...
Definition: EcsNodePrinter.cs:1387
Loyc.Collections.IListAndReadOnly
This interface is meant to be implemented by read-only sequence classes that originally implemented I...
Definition: Disambiguation interfaces.cs:49
Loyc.Collections.FVList.ToWList
WList< T > ToWList()
Returns this list as a WList, which effectively reverses the order of the elements.
Definition: FVList.cs:249
Loyc.Syntax.Precedence.IsRightAssociative
bool IsRightAssociative
Returns true if this object represents a right-associative operator such as equals (x = (y = z)),...
Definition: Precedence.cs:268
Loyc.Collections.MMap.Without
MMap< K, V > Without(K key)
Definition: MMap.cs:262
Loyc.Syntax.NodeStyle.OctalLiteral
@ OctalLiteral
Used for an octal (base-7) literal like 0o37.
Loyc.Collections.SparseAList.Append
virtual void Append(SparseAList< T > other, bool move)
Definition: SparseAList.cs:194
Loyc.Collections.ListSourceDebugView
This helper class gives a nice view of a custom collection within the debugger.
Definition: CollectionDebugView.cs:86
Loyc.Collections.ListExt.StableSort< T >
static void StableSort< T >(this IList< T > list, Comparison< T > comp)
Performs a stable sort, i.e. a sort that preserves the relative order of items that compare equal.
Definition: ListExt.cs:343
Loyc.Collections.Heap.AsMinHeap< T >
static MinHeapInList< T > AsMinHeap< T >(this IList< T > list, IComparer< T > compare=null, bool heapify=false)
Returns a MinHeapInList wrapper object, which treats the list as a binary min-heap (priority queue)....
Definition: Heap.cs:343
Loyc.Syntax.ParsingService.Parse
static IListSource< LNode > Parse(this IParsingService parser, UString input, IMessageSink msgs=null, ParsingMode inputType=null, bool preserveComments=true)
Parses a string by invoking IParsingService.Parse(I