From dfb86ea8a0e0e648af51f25cff3e70a851b6b288 Mon Sep 17 00:00:00 2001 From: b3b00 Date: Wed, 17 Apr 2024 20:11:00 +0200 Subject: [PATCH] v 3.0.1 (generic lexer performance) --- precompute.dtp.State | 4 ++++ src/sly/lexer/TokenChannel.cs | 2 -- src/sly/sly.csproj | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 precompute.dtp.State diff --git a/precompute.dtp.State b/precompute.dtp.State new file mode 100644 index 00000000..8bf19f09 --- /dev/null +++ b/precompute.dtp.State @@ -0,0 +1,4 @@ + + [{"CurrentPrefix":{"Path":{"Items":[{"Fuid":5,"IsLogicalRoot":true}]}},"BacktraceSelection":{"Path":[]},"DowntraceSelection":{"Path":[{"Fuid":7,"IsLogicalRoot":true},{"Fuid":2305843009215791107,"MergeType":2},{"Fuid":2305843009218936880}]},"GroupedByThreadBacktraceSelection":{"Path":[]},"GroupedByThreadDowntraceSelection":{"Path":[]}},{"CurrentPrefix":{"Path":{"Items":[{"Fuid":7,"IsLogicalRoot":true},{"Fuid":2305843009215791107,"MergeType":2},{"Fuid":2305843009218936880,"IsLogicalRoot":true}]}},"BacktraceSelection":{"Path":[]},"DowntraceSelection":{"Path":[{"Fuid":2305843009218936880,"IsLogicalRoot":true},{"Fuid":2305843009218936881},{"Fuid":2305843009218937558},{"Fuid":2305843009218937559},{"Fuid":2305843009218937664},{"Fuid":2305843009218937665},{"Fuid":2305843009218937751}]},"GroupedByThreadBacktraceSelection":{"Path":[]},"GroupedByThreadDowntraceSelection":{"Path":[]}}] + 1 + {"Root":{"Key":{},"Children":[{"$id":"1","Key":{"Fuid":{"Value":7}},"Value":{},"Children":[{"$id":"2","Key":{"Fuid":{"Value":2305843009215791107},"MergeType":2},"Value":{},"Children":[{"$id":"3","Key":{"Fuid":{"Value":2305843009218936880}},"Value":{},"Children":[{"$id":"4","Key":{"Fuid":{"Value":2305843009218936881}},"Value":{},"Children":[{"$id":"5","Key":{"Fuid":{"Value":2305843009218937558}},"Value":{"ChangedState":2,"Values":2},"Children":[{"$id":"6","Key":{"Fuid":{"Value":2305843009218937559}},"Value":{},"Children":[{"$id":"7","Key":{"Fuid":{"Value":2305843009218937664}},"Value":{"ChangedState":2,"Values":2},"Children":[{"$id":"8","Key":{"Fuid":{"Value":2305843009218937665}},"Value":{},"Children":[{"$id":"9","Key":{"Fuid":{"Value":2305843009218937751}},"Value":{"ChangedState":2,"Values":2}}]}]}]}]}]}]}]}]}]}} \ No newline at end of file diff --git a/src/sly/lexer/TokenChannel.cs b/src/sly/lexer/TokenChannel.cs index 2f4c6af8..c6e97fac 100644 --- a/src/sly/lexer/TokenChannel.cs +++ b/src/sly/lexer/TokenChannel.cs @@ -60,8 +60,6 @@ public void Add(Token token) Tokens.Add(token); if (token != null) token.PositionInTokenFlow = Tokens.Count; - _notNullTokens = Tokens.Where(x => x != null).ToList(); - _notNullOrEosTokens = Tokens.Where(x => x != null && !x.IsEOS).ToList(); } [ExcludeFromCodeCoverage] diff --git a/src/sly/sly.csproj b/src/sly/sly.csproj index 373fa544..5d20fad5 100644 --- a/src/sly/sly.csproj +++ b/src/sly/sly.csproj @@ -6,11 +6,11 @@ $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb #LY is a parser generator halfway between parser combinators and parser generator like ANTLR b3b00 - 3.0.0 + 3.0.1 https://github.com/b3b00/sly https://github.com/b3b00/sly https://github.com/b3b00/sly/blob/master/LICENSE - 3.0.0 + 3.0.1 Library