Enhanced C#
Language of your choice: library documentation
|
Macros for using LLLPG in LeMP. More...
Macros for using LLLPG in LeMP.
Example:
Up to three macros are used to invoke LLLPG.
LLLPG(lexer, {...})
and translate "lexer" to an unprintable literal of type IntStreamCodeGenHelper, and another macro for LLLPG(parser(Symbol, false), {...})"</c> that creates a
<see cref="GeneralCodeGenHelper"/> (this is the default helper).</li>
<li>The stage-one rule() macro uses <see cref="StageOneParser"/> to
translate token trees into expressions, e.g. <c>@[ ("Foo" | bar)* ~';' ]</c>
is currently translated to <c>#tuple(@`suf*`("Foo" | bar), ~';')
. Public static fields | |
static readonly Symbol | MacroNamespace = GSymbol.Get("Loyc.LLPG") |
Static Public Member Functions | |
static LNode | LLLPG_lexer (LNode node, IMacroContext context) |
Helper macro that translates lexer in LLLPG(lexer, {...}) into a IntStreamCodeGenHelper object. More... | |
static LNode | LLLPG_parser (LNode node, IMacroContext context) |
Helper macro that translates parser in LLLPG(parser, {...}) into a GeneralCodeGenHelper object. More... | |
static LNode | rule (LNode node, IMacroContext context) |
static LNode | ECSharpRule (LNode node, IMacroContext context) |
static LNode | LLLPG_stage1 (LNode node, IMessageSink sink) |
static LNode | run_LLLPG (LNode node, IMacroContext context) |
|
inlinestatic |
Helper macro that translates lexer
in LLLPG(lexer, {...})
into a IntStreamCodeGenHelper object.
References LeMP.MacroContext.GetOptions().
|
inlinestatic |
Helper macro that translates parser
in LLLPG(parser, {...})
into a GeneralCodeGenHelper object.
References Loyc.Syntax.LNode.Args, LeMP.MacroContext.GetOptions(), Loyc.Syntax.LNode.Value, and Loyc.IMessageSink.Write().