LALR parser combinators for C# and F#.
MarkForPrecompile
extension method that enables the precompiler to be used in AOT environments. See https://teo-tsirpanis.github.io/Farkle/the-precompiler.html#Using-the-precompiler-in-AOT-environments for more details.null
and throw ArgumentNullException
s.params
in the array parameter overload of Nonterminal.CreateUntyped
that takes a name and a series of production builders.Finish(Constant)
without calling Appended()
or Extending()
. Previously only some combinations were supported (Finish
on typed designtime Farkles and FinishConstant
on literals), but now all can be used.farkle new
command will place the output in the current directory instead of the input grammar's or assembly's directory, if not given an output path by the user.Production<T>
type became a covariant interface, fixing issue #26. Because it used to be a sealed class with no members, it is not expected to be a breaking change. User code is not allowed to implement it.Farkle.Tools.MSBuild
require MSBuild 17, which comes with Visual Studio 2022 and the .NET 6 SDK..>>
and .>>.
.FarklePrecompilerErrorMode
property. Its allowed values are ReportOnly
(default), ErrorsOnly
and Both
.Greek Extended
character set by specifying \p{Greek Extended}
. From now on, \p{GreekExtended}
will work too.Farkle.Builder.RegexGrammar.designtime
's type became a regular DesigntimeFarkle<Regex>
, after being changed to a Nonterminal<Regex>
in Farkle 6.3.0 by mistake. This change is unlikely to affect any regular user of Farkle.Farkle.Builder.GrammarMetadata
type has an additional field of type Farkle.Builder.OperatorPrecedence.OperatorScope
. User code that does not directly set metadata to designtime Farkles is not affected.Farkle.Tools
.IndistinguishableSymbols2
was introduced.DesigntimeFarkle.cast
function. There were some binary breaking changes but none is source breaking.literal
operator that got passed the same string.new
CLI tool command where the --prop
option could not be specified more than once.new
CLI tool command could not be used on projects or assemblies.sepBy
operator could not match exactly one item.Farkle.Builder.LALRBuildTypes
module, as well as most functions of the Farkle.Builder.LALRBuild
module became internal.n
times" regex string quantifiers is no longer allowed. Using string regexes like \d{ 4}
will cause an error.Farkle.Builder.IRawDelegateProvider
interface and a function in the Farkle.Builder.DFABuild
module became private. They were public by accident and served no purpose for Farkle's users.Advance
d at once, otherwise the character stream's position will be incorrect. The vast majority of use cases (those that doesn't involve custom tokenizers) will not be affected by this change.NewLine
will have an underscore prepended to their name when built, making them _NewLine
for example. This change is a temporary workaround for a design deficiency of Farkle, where these terminals could end line groups and comments. It will be thoroughly fixed in the next major version. Because these names are only used for diagnostics and documentation generation, parser behavior will not be affected by this change. Nor will grammars read by EGT files be changed.\s
and \S
string regex symbol will now match exactly either horizontal tabs, line feeds, carriage returns or spaces. Other characters like vertical tabs and non-breaking spaces are no longer matched. This change matches Farkle's definition of whitespace. To revert to the previous behavior use \p{Whitespace}
or \P{Whitespace}
.Position.Advance
method got a new overload that accepts a ReadOnlySpan
of characters. It is recommended over the existing one that accepts a single character because it reliably handles line endings.Farkle.Builder
's DFABuild
, LALRBuild
and DesigntimeFarkleBuild
modules. Additionally the Build
and BuildUntyped
extension methods of designtime Farkles now accept an optional cancellation token.ParserApplicationExceptionWithPosition
type was deprecated in favor of a new constructor in ParserApplicationException
.many
and many1
operators now have the correct name.ParserException
during post-processing will not be thrown in user code inside a PostProcessorException
, but will be caught by the runtime Farkle API, allowing to customize the parser error message in greater detail.RuntimeFarkle.ofEGTFile
and RuntimeFarkle.ofBase64String
as well as their corresponding RuntimeFarkle
static methods were removed. Users are advised to migrate away from GOLD Parser.RuntimeFarkle.GetBuildError
method was replaced by GetBuildErrors
, which returns a list of build errors.Farkle.Grammar.Grammar.Properties
member now holds a strongly-typed record of informative grammar properties. Unrecognized GOLD Parser properties such as "Author", "Description" and "Version" are discarded. Existing grammar files remain compatible.let foo (x: Terminal) = printfn "%s" x.Name
becomes let foo (Terminal(_, name)) = printfn "%s" name
. For C# users, duplicate properties like Terminal.name
with a lowercase "n" were removed; they are replaced by their corresponding title-cased properties.Farkle
item.Farkle.Common.SetOnce
type became internal.LALRParser.parseLALR
was renamed to LALRParser.parse
.Farkle.Parser.OptimizedOperations
type was made internal.ITransformerContext
type containing more information.FarkleException
.PostProcessorException
and thrown to user code.PrecompilableDesigntimeFarkle
can be marked for precompilation.Transformers
and Fusers
properties were removed from the Farkle.Builder.GrammarDefinition
type.CharStream
type was published.AppContext
switch.