From b6b7db0f9dae32e9cbc98c08f11dec8eaf2924c5 Mon Sep 17 00:00:00 2001 From: nojaf Date: Fri, 28 Aug 2026 18:05:04 +0200 Subject: [PATCH 1/2] Migrate to the .NET 10 SDK Move global.json to 10.0.100 and retarget every net6.0 project to net10.0: the fslex and fsyacc tools, the Expecto test projects and the example projects. The shipped FsLexYacc.targets and the NuGet template now point at build/fslex/net10.0 and build/fsyacc/net10.0, so consumers of the tools package need a .NET 10 runtime. Raise the FSharp.Core floor to 10.0.0. The older versions are no longer usable on this SDK: 4.6.2 and 4.7.2 make the compiler emit dynamic arithmetic instead of inlining, which fails at runtime with "Dynamic invocation of op_Subtraction is not supported" from Position.Column, and 6.0.0 breaks publish with NETSDK1152 because it ships duplicate FSharp.Core.xml content files. Bump the local tools. Paket had to move to 10.3.1 because 8.0.3 cannot parse the net10.0 framework identifier at all. Fantomas 8 no longer recognises fsharp_max_dot_get_expression_width and renamed the check command, and it reformats one call in Lexing.fs. Bump actions/setup-dotnet to v6; the other actions are already on their latest major. --- .config/dotnet-tools.json | 8 ++-- .editorconfig | 1 - .github/workflows/pull-requests.yml | 2 +- .github/workflows/push-main.yml | 2 +- build.fsx | 4 +- global.json | 4 +- nuget/FsLexYacc.template | 4 +- paket.dependencies | 4 +- paket.lock | 48 ++++++++----------- src/FsLex/fslex.fsproj | 2 +- src/FsLexYacc.Build.Tasks/FsLexYacc.targets | 4 +- src/FsLexYacc.Runtime/Lexing.fs | 3 +- src/FsYacc/fsyacc.fsproj | 2 +- .../FsLex.Core.Tests/FsLex.Core.Tests.fsproj | 2 +- .../FsYacc.Core.Tests.fsproj | 2 +- .../JsonLexAndYaccExample.fsproj | 9 ++-- .../LexAndYaccMiniProject.fsproj | 9 ++-- tests/fsyacc/Test1/test1.fsproj | 2 +- tests/fsyacc/Test2/test2.fsproj | 2 +- tests/fsyacc/unicode/test1-unicode.fsproj | 2 +- 20 files changed, 51 insertions(+), 65 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index b452575..af35d61 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,25 +3,25 @@ "isRoot": true, "tools": { "fake-cli": { - "version": "6.1.3", + "version": "6.1.4", "commands": [ "fake" ] }, "paket": { - "version": "8.0.3", + "version": "10.3.1", "commands": [ "paket" ] }, "fantomas": { - "version": "6.3.16", + "version": "8.0.0-alpha-024", "commands": [ "fantomas" ] }, "fsdocs-tool": { - "version": "20.0.1", + "version": "22.1.0", "commands": [ "fsdocs" ] diff --git a/.editorconfig b/.editorconfig index a406490..2e629bf 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,6 +8,5 @@ fsharp_max_function_binding_width = 40 fsharp_max_if_then_else_short_width = 60 fsharp_max_infix_operator_expression = 80 fsharp_max_array_or_list_width = 80 -fsharp_max_dot_get_expression_width = 80 fsharp_multiline_bracket_style = aligned fsharp_keep_max_number_of_blank_lines = 1 diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml index b913622..0576f20 100644 --- a/.github/workflows/pull-requests.yml +++ b/.github/workflows/pull-requests.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v7 - name: Setup .NET for main project build - uses: actions/setup-dotnet@v5 + uses: actions/setup-dotnet@v6 - name: Install local tools run: dotnet tool restore - name: Paket restore diff --git a/.github/workflows/push-main.yml b/.github/workflows/push-main.yml index 960f601..c62de99 100644 --- a/.github/workflows/push-main.yml +++ b/.github/workflows/push-main.yml @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/checkout@v7 - name: Setup .NET for main project build - uses: actions/setup-dotnet@v5 + uses: actions/setup-dotnet@v6 - name: Install local tools run: dotnet tool restore - name: Paket restore diff --git a/build.fsx b/build.fsx index a4c9a32..19512e1 100644 --- a/build.fsx +++ b/build.fsx @@ -78,7 +78,7 @@ Environment.CurrentDirectory <- __SOURCE_DIRECTORY__ let release = ReleaseNotes.parse (IO.File.ReadAllLines "RELEASE_NOTES.md") // Check if the source code was formatted -Target.create "CheckFormat" (fun _ -> dotnet "fantomas . --check") +Target.create "CheckFormat" (fun _ -> dotnet "fantomas check .") // Generate assembly info files with the right version & up-to-date information Target.create "AssemblyInfo" (fun _ -> @@ -119,7 +119,7 @@ Target.create "CleanDocs" (fun _ -> Shell.cleanDirs [ "output"; ".fsdocs" ]) // Build library & test project Target.create "Build" (fun _ -> - for framework in [ "net6.0" ] do + for framework in [ "net10.0" ] do [ "src/FsLex.Core/fslexlex.fs" "src/FsLex.Core/fslexpars.fs" diff --git a/global.json b/global.json index a79a2ea..1e7fdfa 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.400", - "rollForward": "minor" + "version": "10.0.100", + "rollForward": "latestMinor" } } diff --git a/nuget/FsLexYacc.template b/nuget/FsLexYacc.template index 1f0c573..f46a953 100644 --- a/nuget/FsLexYacc.template +++ b/nuget/FsLexYacc.template @@ -12,8 +12,8 @@ iconurl https://raw.githubusercontent.com/fsprojects/FsLexYacc/master/docs/img/l tags F#, fsharp, yacc, fsyacc, lex, parsing, lexing, fslex files - ../src/FsLex/bin/Release/net6.0/publish ==> build/fslex/net6.0 - ../src/FsYacc/bin/Release/net6.0/publish ==> build/fsyacc/net6.0 + ../src/FsLex/bin/Release/net10.0/publish ==> build/fslex/net10.0 + ../src/FsYacc/bin/Release/net10.0/publish ==> build/fsyacc/net10.0 ../src/FsLexYacc.Build.Tasks/FsLexYacc.targets ==> build ../src/FsLexYacc.Runtime/Lexing.fsi ==> src/fslex ../src/FsLexYacc.Runtime/Lexing.fs ==> src/fslex diff --git a/paket.dependencies b/paket.dependencies index 817f1a6..201496e 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -1,9 +1,9 @@ source https://api.nuget.org/v3/index.json storage: none -frameworks: netstandard2.0, net6.0 +frameworks: netstandard2.0, net10.0 -nuget FSharp.Core >= 4.6.0 +nuget FSharp.Core >= 10.0.0 nuget FsLexYacc copy_local: true nuget Microsoft.SourceLink.GitHub copy_local: true nuget Expecto ~> 9.0 diff --git a/paket.lock b/paket.lock index fbcd382..d8dd440 100644 --- a/paket.lock +++ b/paket.lock @@ -1,5 +1,5 @@ STORAGE: NONE -RESTRICTION: || (== net6.0) (== netstandard2.0) +RESTRICTION: || (== net10.0) (== netstandard2.0) NUGET remote: https://api.nuget.org/v3/index.json Expecto (9.0.4) @@ -10,36 +10,30 @@ NUGET FsCheck (>= 2.14.3) FsCheck (2.16.5) FSharp.Core (>= 4.2.3) - FSharp.Core (4.6.2) + FSharp.Core (10.1.400) FsLexYacc (10.2) - copy_local: true FSharp.Core (>= 4.5.2) FsLexYacc.Runtime (>= 10.2 < 10.3) FsLexYacc.Runtime (10.2) - copy_local: true FSharp.Core (>= 4.5.2) - Microsoft.Build.Tasks.Git (1.1.1) - copy_local: true - Microsoft.CodeCoverage (17.4.1) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net462)) (&& (== netstandard2.0) (>= netcoreapp3.1)) - Microsoft.NET.Test.Sdk (17.4.1) - Microsoft.CodeCoverage (>= 17.4.1) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net462)) (&& (== netstandard2.0) (>= netcoreapp3.1)) - Microsoft.TestPlatform.TestHost (>= 17.4.1) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) - Microsoft.SourceLink.Common (1.1.1) - copy_local: true - Microsoft.SourceLink.GitHub (1.1.1) - copy_local: true - Microsoft.Build.Tasks.Git (>= 1.1.1) - Microsoft.SourceLink.Common (>= 1.1.1) - Microsoft.TestPlatform.ObjectModel (17.4.1) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) - NuGet.Frameworks (>= 5.11) - System.Reflection.Metadata (>= 1.6) - Microsoft.TestPlatform.TestHost (17.4.1) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) - Microsoft.TestPlatform.ObjectModel (>= 17.4.1) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) - Newtonsoft.Json (>= 13.0.1) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) + Microsoft.Build.Tasks.Git (10.0.400) - copy_local: true, restriction: || (== net10.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net8.0)) + System.IO.Hashing (>= 10.0.11) - restriction: || (== net10.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net8.0)) + Microsoft.CodeCoverage (18.9) - restriction: || (== net10.0) (&& (== netstandard2.0) (>= net462)) (&& (== netstandard2.0) (>= net8.0)) + Microsoft.NET.Test.Sdk (18.9) + Microsoft.CodeCoverage (>= 18.9) - restriction: || (== net10.0) (&& (== netstandard2.0) (>= net462)) (&& (== netstandard2.0) (>= net8.0)) + Microsoft.TestPlatform.TestHost (>= 18.9) - restriction: || (== net10.0) (&& (== netstandard2.0) (>= net8.0)) + Microsoft.SourceLink.Common (10.0.400) - copy_local: true, restriction: || (== net10.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net8.0)) + Microsoft.SourceLink.GitHub (10.0.400) - copy_local: true + Microsoft.Build.Tasks.Git (>= 10.0.400) - restriction: || (== net10.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net8.0)) + Microsoft.SourceLink.Common (>= 10.0.400) - restriction: || (== net10.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net8.0)) + System.IO.Hashing (>= 10.0.11) - restriction: || (== net10.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net8.0)) + Microsoft.TestPlatform.ObjectModel (18.9) - restriction: || (== net10.0) (&& (== netstandard2.0) (>= net8.0)) + Microsoft.TestPlatform.TestHost (18.9) - restriction: || (== net10.0) (&& (== netstandard2.0) (>= net8.0)) + Microsoft.TestPlatform.ObjectModel (>= 18.9) - restriction: || (== net10.0) (&& (== netstandard2.0) (>= net8.0)) Mono.Cecil (0.11.4) - Newtonsoft.Json (13.0.2) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) - NuGet.Frameworks (6.4) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) - System.Collections.Immutable (7.0) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - System.Reflection.Metadata (7.0) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) - System.Collections.Immutable (>= 7.0) - System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= net6.0)) (&& (== netstandard2.0) (>= netcoreapp3.1)) + System.Collections.Immutable (7.0) - restriction: || (== net10.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) + System.IO.Hashing (10.0.11) - copy_local: true, restriction: || (== net10.0) (&& (== netstandard2.0) (>= net472)) (&& (== netstandard2.0) (>= net8.0)) YoloDev.Expecto.TestSdk (0.13.3) - Expecto (>= 9.0 < 10.0) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) - FSharp.Core (>= 4.6.2) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) - System.Collections.Immutable (>= 6.0) - restriction: || (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) + Expecto (>= 9.0 < 10.0) - restriction: || (== net10.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) + FSharp.Core (>= 4.6.2) - restriction: || (== net10.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) + System.Collections.Immutable (>= 6.0) - restriction: || (== net10.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) diff --git a/src/FsLex/fslex.fsproj b/src/FsLex/fslex.fsproj index 5a51a32..4ee02d6 100644 --- a/src/FsLex/fslex.fsproj +++ b/src/FsLex/fslex.fsproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 Major false true diff --git a/src/FsLexYacc.Build.Tasks/FsLexYacc.targets b/src/FsLexYacc.Build.Tasks/FsLexYacc.targets index 120a632..7963595 100644 --- a/src/FsLexYacc.Build.Tasks/FsLexYacc.targets +++ b/src/FsLexYacc.Build.Tasks/FsLexYacc.targets @@ -15,9 +15,9 @@ Copyright (C) Microsoft Corporation. All rights reserved. CallFsLex;CallFsYacc;$(CompileDependsOn) - $(MSBuildThisFileDirectory)/fslex/net6.0 + $(MSBuildThisFileDirectory)/fslex/net10.0 fslex.dll - $(MSBuildThisFileDirectory)/fsyacc/net6.0 + $(MSBuildThisFileDirectory)/fsyacc/net10.0 fsyacc.dll dotnet diff --git a/src/FsLexYacc.Runtime/Lexing.fs b/src/FsLexYacc.Runtime/Lexing.fs index 6c2c387..bd70b85 100644 --- a/src/FsLexYacc.Runtime/Lexing.fs +++ b/src/FsLexYacc.Runtime/Lexing.fs @@ -268,8 +268,7 @@ and [] LexBuffer<'char>(filler: LexBufferFiller<'char>) as this = #if !FABLE_COMPILER static member FromTextReader(tr: System.IO.TextReader) : LexBuffer = - LexBuffer - .FromReadFunctions(Some tr.Read, Some(tr.ReadAsync >> Async.AwaitTask)) + LexBuffer.FromReadFunctions(Some tr.Read, Some(tr.ReadAsync >> Async.AwaitTask)) static member FromBinaryReader(br: System.IO.BinaryReader) : LexBuffer = LexBuffer.FromFunction(br.Read) diff --git a/src/FsYacc/fsyacc.fsproj b/src/FsYacc/fsyacc.fsproj index f10313c..29e60f7 100644 --- a/src/FsYacc/fsyacc.fsproj +++ b/src/FsYacc/fsyacc.fsproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 Major false diff --git a/tests/FsLex.Core.Tests/FsLex.Core.Tests.fsproj b/tests/FsLex.Core.Tests/FsLex.Core.Tests.fsproj index e7639cc..1154c8c 100644 --- a/tests/FsLex.Core.Tests/FsLex.Core.Tests.fsproj +++ b/tests/FsLex.Core.Tests/FsLex.Core.Tests.fsproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 false diff --git a/tests/FsYacc.Core.Tests/FsYacc.Core.Tests.fsproj b/tests/FsYacc.Core.Tests/FsYacc.Core.Tests.fsproj index 58bac53..7baa7e4 100644 --- a/tests/FsYacc.Core.Tests/FsYacc.Core.Tests.fsproj +++ b/tests/FsYacc.Core.Tests/FsYacc.Core.Tests.fsproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 false diff --git a/tests/JsonLexAndYaccExample/JsonLexAndYaccExample.fsproj b/tests/JsonLexAndYaccExample/JsonLexAndYaccExample.fsproj index 356a643..030b188 100644 --- a/tests/JsonLexAndYaccExample/JsonLexAndYaccExample.fsproj +++ b/tests/JsonLexAndYaccExample/JsonLexAndYaccExample.fsproj @@ -2,9 +2,9 @@ Exe - net6.0 - ..\..\src\FsLex\bin\$(Configuration)\net6.0 - ..\..\src\FsYacc\bin\$(Configuration)\net6.0 + net10.0 + ..\..\src\FsLex\bin\$(Configuration)\net10.0 + ..\..\src\FsYacc\bin\$(Configuration)\net10.0 @@ -22,9 +22,6 @@ Always - - - diff --git a/tests/LexAndYaccMiniProject/LexAndYaccMiniProject.fsproj b/tests/LexAndYaccMiniProject/LexAndYaccMiniProject.fsproj index 90bb7d9..c3db814 100644 --- a/tests/LexAndYaccMiniProject/LexAndYaccMiniProject.fsproj +++ b/tests/LexAndYaccMiniProject/LexAndYaccMiniProject.fsproj @@ -2,9 +2,9 @@ Exe - net6.0 - ..\..\src\FsLex\bin\$(Configuration)\net6.0 - ..\..\src\FsYacc\bin\$(Configuration)\net6.0 + net10.0 + ..\..\src\FsLex\bin\$(Configuration)\net10.0 + ..\..\src\FsYacc\bin\$(Configuration)\net10.0 @@ -18,9 +18,6 @@ - - - diff --git a/tests/fsyacc/Test1/test1.fsproj b/tests/fsyacc/Test1/test1.fsproj index 678fbd2..6bfb95c 100644 --- a/tests/fsyacc/Test1/test1.fsproj +++ b/tests/fsyacc/Test1/test1.fsproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 FS0760 diff --git a/tests/fsyacc/Test2/test2.fsproj b/tests/fsyacc/Test2/test2.fsproj index c37087c..4c9279a 100644 --- a/tests/fsyacc/Test2/test2.fsproj +++ b/tests/fsyacc/Test2/test2.fsproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 FS0760 diff --git a/tests/fsyacc/unicode/test1-unicode.fsproj b/tests/fsyacc/unicode/test1-unicode.fsproj index ade3fda..e6fb491 100644 --- a/tests/fsyacc/unicode/test1-unicode.fsproj +++ b/tests/fsyacc/unicode/test1-unicode.fsproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 FS0760 From 0fc1f3dbbba3be707075768d4dac0849ef019a82 Mon Sep 17 00:00:00 2001 From: nojaf Date: Fri, 28 Aug 2026 18:26:17 +0200 Subject: [PATCH 2/2] Replace FAKE with Fun.Build build.fsx is now a Fun.Build script run through dotnet fsi, and OldFsYaccTests.fsx is a plain dotnet fsi script. FAKE compiles a script against the reference assemblies of the framework named in its "#r paket:" header, and a machine with only the .NET 10 SDK has no net6.0 targeting pack, so the build died before the first target ran. Its bundled Paket cannot parse net10.0 either, so no value of that header worked. Beyond that, FAKE has seen little maintenance lately. The FAKE targets become three pipelines: Build (the default), Release, which adds packaging, and Docs. ReleaseNotes.parse, AssemblyInfoFile, Shell.cleanDirs and Paket.pack are replaced by local equivalents. Release notes reach dotnet pack and paket pack through an explicit argument list rather than a command string, so the multi-line text survives without quoting. build.sh and build.cmd invoke dotnet fsi, and pipelines are selected with -p instead of -t. Ignore the signature files fslex has emitted since 11.2.0. Every generated .fs was ignored but none of its .fsi siblings were, and fantomas checks src/, so a leftover signature file failed CheckFormat on the second consecutive build. repro1885.fs is generated too and was tracked by mistake; nothing compiles it, and the committed copy still held an absolute path from whoever last ran the suite. --- .config/dotnet-tools.json | 6 - .fantomasignore | 3 +- .github/workflows/pull-requests.yml | 2 +- .github/workflows/push-main.yml | 4 +- .gitignore | 9 +- RELEASE_NOTES.md | 4 + build.cmd | 2 +- build.fsx | 420 +++++++++++++++----------- build.sh | 2 +- src/FsLex.Core/AssemblyInfo.fs | 10 +- src/FsLex/AssemblyInfo.fs | 10 +- src/FsLexYacc.Runtime/AssemblyInfo.fs | 10 +- src/FsYacc.Core/AssemblyInfo.fs | 10 +- src/FsYacc/AssemblyInfo.fs | 10 +- tests/fsyacc/OldFsYaccTests.fsx | 325 ++++++++++++-------- tests/fsyacc/repro1885/repro1885.fs | 122 -------- 16 files changed, 493 insertions(+), 456 deletions(-) mode change 100644 => 100755 build.fsx mode change 100644 => 100755 tests/fsyacc/OldFsYaccTests.fsx delete mode 100644 tests/fsyacc/repro1885/repro1885.fs diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index af35d61..389d011 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -2,12 +2,6 @@ "version": 1, "isRoot": true, "tools": { - "fake-cli": { - "version": "6.1.4", - "commands": [ - "fake" - ] - }, "paket": { "version": "10.3.1", "commands": [ diff --git a/.fantomasignore b/.fantomasignore index da79112..ec7ca35 100644 --- a/.fantomasignore +++ b/.fantomasignore @@ -1,6 +1,5 @@ # Generated by FAKE AssemblyInfo.fs -.fake/ # Generated files src/FsLex.Core/fslexlex.fs @@ -9,6 +8,8 @@ src/FsLex.Core/fslexpars.fsi src/FsYacc.Core/fsyacclex.fs src/FsYacc.Core/fsyaccpars.fs src/FsYacc.Core/fsyaccpars.fsi +src/FsLex.Core/fslexlex.fsi +src/FsYacc.Core/fsyacclex.fsi # Ignore for now tests/ diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml index 0576f20..7c124a7 100644 --- a/.github/workflows/pull-requests.yml +++ b/.github/workflows/pull-requests.yml @@ -23,4 +23,4 @@ jobs: - name: Paket restore run: dotnet paket restore - name: Build - run: dotnet fake run build.fsx + run: dotnet fsi build.fsx diff --git a/.github/workflows/push-main.yml b/.github/workflows/push-main.yml index c62de99..045e3e0 100644 --- a/.github/workflows/push-main.yml +++ b/.github/workflows/push-main.yml @@ -28,11 +28,11 @@ jobs: - name: Paket restore run: dotnet paket restore - name: Build - run: dotnet fake run build.fsx -t Release + run: dotnet fsi build.fsx -p Release - name: Publish NuGets (if main version changed) run: dotnet nuget push "bin/*.nupkg" -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_KEY }} --skip-duplicate - name: Build documentation - run: dotnet fake run build.fsx -t GenerateDocs + run: dotnet fsi build.fsx -p Docs - name: Upload documentation uses: actions/upload-pages-artifact@v5 with: diff --git a/.gitignore b/.gitignore index 6059d3d..81b324f 100644 --- a/.gitignore +++ b/.gitignore @@ -177,7 +177,6 @@ TestResults.xml nuget/*.nupkg # FAKE build -.fake/ # IDEs .vs/ @@ -193,6 +192,8 @@ src/FsLex/fslexpars.fsi src/FsYacc/fsyacclex.fs src/FsYacc/fsyaccpars.fs src/FsYacc/fsyaccpars.fsi +src/FsLex.Core/fslexlex.fsi +src/FsYacc.Core/fsyacclex.fsi tests/fsyacc/test1-unicode.exe.config tests/fsyacc/test1.exe.config tests/fsyacc/test1.input1.bsl.err @@ -202,16 +203,22 @@ tests/fsyacc/test2compat.exe.config tests/fsyacc/Test1/test1.fs tests/fsyacc/Test1/test1.fsi tests/fsyacc/Test1/test1lex.fs +tests/fsyacc/Test1/test1lex.fsi .paket .idea/ .vs/ .ionide/ tests/fsyacc/unicode/test1-unicode-lex.fs +tests/fsyacc/unicode/test1-unicode-lex.fsi tests/fsyacc/unicode/test1-unicode.fs tests/fsyacc/unicode/test1-unicode.fsi tests/fsyacc/unicode/test1-unicode.input3.tokens.bsl.err tests/fsyacc/Test2/test2lex.fs +tests/fsyacc/Test2/test2lex.fsi tests/fsyacc/Test2/test2.fs tests/fsyacc/Test2/test2.fsi tests/fsyacc/repro_#141/Lexer_fail_option_i.fs +tests/fsyacc/repro_#141/Lexer_fail_option_i.fsi +tests/fsyacc/repro1885/repro1885.fs +tests/fsyacc/repro1885/repro1885.fsi diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index cc3c7d4..b3d67ae 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,7 @@ +#### 12.0.0 - Unreleased +* Migrate fslex and fsyacc to net10.0. The tools now require a .NET 10 runtime #244 +* Raise the minimum FSharp.Core version to 10.0.0 #244 + #### 11.4.1 - 28 August, 2026 * Fix fslex generating an invalid signature file when the header defines a module #240 diff --git a/build.cmd b/build.cmd index 068103a..609bd28 100644 --- a/build.cmd +++ b/build.cmd @@ -1,4 +1,4 @@ @echo off dotnet tool restore dotnet paket restore -dotnet fake run build.fsx %* +dotnet fsi build.fsx %* diff --git a/build.fsx b/build.fsx old mode 100644 new mode 100755 index 19512e1..08892bb --- a/build.fsx +++ b/build.fsx @@ -1,138 +1,167 @@ -#r @"paket: -frameworks: net6.0 - -nuget FSharp.Core ~> 6 -nuget Fake.Core.Target -nuget Fake.Core.ReleaseNotes -nuget Fake.IO.FileSystem -nuget Fake.DotNet.AssemblyInfoFile -nuget Fake.DotNet.Paket -nuget Fake.Tools.Git -nuget MsBuild.StructuredLogger //" - -#if !FAKE -#load "./.fake/build.fsx/intellisense.fsx" -#r "netstandard" // Temp fix for https://github.com/fsharp/FAKE/issues/1985 -#endif - -open Fake.DotNet -// -------------------------------------------------------------------------------------- -// FAKE build script -// -------------------------------------------------------------------------------------- +#!/usr/bin/env -S dotnet fsi + +#r "nuget: Fun.Build, 1.1.17" -//#I @"packages/FAKE/tools" -//#r @"packages/FAKE/tools/FakeLib.dll" -open Fake -open Fake.Core.TargetOperators -open Fake.Core -open Fake.Tools.Git -open Fake.IO -open Fake.IO.FileSystemOperators -open Fake.IO.Globbing.Operators open System open System.IO +open Fun.Build + +let () (a: string) (b: string) = Path.Combine(a, b) + +let root = __SOURCE_DIRECTORY__ // -------------------------------------------------------------------------------------- -// START TODO: Provide project-specific details below +// Project information, used for the generated AssemblyInfo files and the NuGet packages. // -------------------------------------------------------------------------------------- -// Information about the project are used -// - for version and project name in generated AssemblyInfo file -// - by the generated NuGet package -// - to run tests and to publish documentation on GitHub gh-pages -// - for documentation, you also need to edit info in "docs/tools/generate.fsx" - -// The name of the project -// (used by attributes in AssemblyInfo, name of a NuGet package and directory in 'src') +/// The tool projects. These carry the FsLexYacc product name. let projects = [ "FsLex"; "FsLex.Core"; "FsYacc"; "FsYacc.Core" ] + +/// The runtime library, which is its own product because it ships as its own package. let runtimeProjects = [ "FsLexYacc.Runtime" ] -let project = "FsLexYacc" -// Short summary of the project -// (used as description in AssemblyInfo and as a short summary for NuGet package) + let summary = "FsLex/FsYacc lexer/parser generation tools" -// File system information -// (.sln is built during the building process) -let solutionFile = "FsLexYacc" -// Pattern specifying assemblies to be tested using NUnit -let testAssemblies = "tests/**/bin/Release/*Tests*.dll" +// -------------------------------------------------------------------------------------- +// Release notes +// -------------------------------------------------------------------------------------- -// Git configuration (used for publishing documentation in gh-pages branch) -// The profile where the project is posted -let gitHome = "https://github.com/fsprojects" -// The name of the project on GitHub -let gitName = "FsLexYacc" +type Release = + { + /// The version exactly as written in RELEASE_NOTES.md, prerelease suffix included. + NugetVersion: string + /// major.minor.patch only, because an assembly version cannot carry a prerelease suffix. + AssemblyVersion: string + Notes: string list + } + +/// The topmost entry of RELEASE_NOTES.md, which is the one being worked towards. +/// +/// An entry is a "#### - " heading followed by "* " bullets, and the date is +/// allowed to read "Unreleased" while the version is still in flight. +let release: Release = + let isHeading (line: string) = line.StartsWith "####" + + let lines = File.ReadAllLines(root "RELEASE_NOTES.md") + let headingIndex = Array.findIndex isHeading lines + + let version = lines.[headingIndex].TrimStart('#').Trim().Split(' ') |> Array.head + + let notes = + lines + |> Array.skip (headingIndex + 1) + |> Array.takeWhile (isHeading >> not) + |> Array.filter (String.IsNullOrWhiteSpace >> not) + |> List.ofArray + + { + NugetVersion = version + AssemblyVersion = version.Split('-') |> Array.head + Notes = notes + } // -------------------------------------------------------------------------------------- -// END TODO: The rest of the file includes standard build steps +// Helpers // -------------------------------------------------------------------------------------- -let dotnet arguments = - let result = CreateProcess.fromRawCommandLine "dotnet" arguments |> Proc.run - - if result.ExitCode <> 0 then - failwithf "Failed to run \"dotnet %s\"" arguments +/// Start a process with an explicit argument list rather than a command line. +/// +/// The packaging steps pass release notes through as a single argument, and those contain +/// newlines. Handing them to a shell to be re-split would mangle them, so the arguments are +/// never joined into a string in the first place. +let exec (fileName: string) (arguments: string list) = + async { + let startInfo = + Diagnostics.ProcessStartInfo(fileName, UseShellExecute = false, WorkingDirectory = root) + + for argument in arguments do + startInfo.ArgumentList.Add argument + + use proc = Diagnostics.Process.Start startInfo + do! proc.WaitForExitAsync() |> Async.AwaitTask + return proc.ExitCode + } + +let cleanDirs (dirs: string list) = + async { + for dir in dirs do + if Directory.Exists dir then + Directory.Delete(dir, true) + + return 0 + } + +let deleteFiles (files: string list) = + async { + for file in files do + let path = root file + + if File.Exists path then + File.Delete path + + return 0 + } + +/// Write the AssemblyInfo.fs that every project compiles, stamped with the release version. +let writeAssemblyInfo (project: string) (product: string) = + let version = release.AssemblyVersion + + let content = + [ + "// Auto-Generated by build.fsx; do not edit" + "namespace System" + "open System.Reflection" + "" + $"[]" + $"[]" + $"[]" + $"[]" + $"[]" + "do ()" + "" + "module internal AssemblyVersionInformation =" + $" let [] AssemblyTitle = \"{project}\"" + $" let [] AssemblyProduct = \"{product}\"" + $" let [] AssemblyDescription = \"{summary}\"" + $" let [] AssemblyVersion = \"{version}\"" + $" let [] AssemblyFileVersion = \"{version}\"" + "" + ] + |> String.concat Environment.NewLine -// Read additional information from the release notes document -Environment.CurrentDirectory <- __SOURCE_DIRECTORY__ -let release = ReleaseNotes.parse (IO.File.ReadAllLines "RELEASE_NOTES.md") + // A BOM, because that is what the file has always carried and the compiler reads either way. + File.WriteAllText(root "src" project "AssemblyInfo.fs", content, Text.UTF8Encoding true) -// Check if the source code was formatted -Target.create "CheckFormat" (fun _ -> dotnet "fantomas check .") +let generateAssemblyInfo = + async { + for project in runtimeProjects do + writeAssemblyInfo project "FsLexYacc.Runtime" -// Generate assembly info files with the right version & up-to-date information -Target.create "AssemblyInfo" (fun _ -> - for project in runtimeProjects do - let fileName = "src/" + project + "/AssemblyInfo.fs" + for project in projects do + writeAssemblyInfo project "FsLexYacc" - AssemblyInfoFile.createFSharp - fileName - [ - AssemblyInfo.Title project - AssemblyInfo.Product "FsLexYacc.Runtime" - AssemblyInfo.Description summary - AssemblyInfo.Version release.AssemblyVersion - AssemblyInfo.FileVersion release.AssemblyVersion - ] - - for project in projects do - let fileName = "src/" + project + "/AssemblyInfo.fs" - - AssemblyInfoFile.createFSharp - fileName - [ - AssemblyInfo.Title project - AssemblyInfo.Product "FsLexYacc" - AssemblyInfo.Description summary - AssemblyInfo.Version release.AssemblyVersion - AssemblyInfo.FileVersion release.AssemblyVersion - ]) + return 0 + } // -------------------------------------------------------------------------------------- -// Clean build results & restore NuGet packages - -Target.create "Clean" (fun _ -> Shell.cleanDirs [ "bin"; "temp" ]) - -Target.create "CleanDocs" (fun _ -> Shell.cleanDirs [ "output"; ".fsdocs" ]) - +// Build // -------------------------------------------------------------------------------------- -// Build library & test project -Target.create "Build" (fun _ -> - for framework in [ "net10.0" ] do - [ - "src/FsLex.Core/fslexlex.fs" - "src/FsLex.Core/fslexpars.fs" - "src/FsLex.Core/fslexpars.fsi" - "src/FsYacc.Core/fsyacclex.fs" - "src/FsYacc.Core/fsyaccpars.fs" - "src/FsYacc.Core/fsyaccpars.fsi" - ] - |> File.deleteAll +let targetFramework = "net10.0" - for project in [ "src/FsLex/fslex.fsproj"; "src/FsYacc/fsyacc.fsproj" ] do - dotnet $"publish {project} -c Release /v:n -f {framework}" +/// Sources fslex and fsyacc regenerate. They are deleted first so that a stale copy can never +/// be what gets compiled into the tools that are about to regenerate it. +let generatedSources = + [ + "src/FsLex.Core/fslexlex.fs" + "src/FsLex.Core/fslexpars.fs" + "src/FsLex.Core/fslexpars.fsi" + "src/FsYacc.Core/fsyacclex.fs" + "src/FsYacc.Core/fsyaccpars.fs" + "src/FsYacc.Core/fsyaccpars.fsi" + ] +let generatedTestSources = [ "tests/JsonLexAndYaccExample/Lexer.fs" "tests/JsonLexAndYaccExample/Parser.fs" @@ -141,85 +170,124 @@ Target.create "Build" (fun _ -> "tests/LexAndYaccMiniProject/Parser.fs" "tests/LexAndYaccMiniProject/Parser.fsi" ] - |> File.deleteAll - for project in - [ - "src/FsLexYacc.Runtime/FsLexYacc.Runtime.fsproj" - "tests/JsonLexAndYaccExample/JsonLexAndYaccExample.fsproj" - "tests/LexAndYaccMiniProject/LexAndYaccMiniProject.fsproj" - ] do - dotnet $"build {project} -c Release /v:n") +let buildTools = + async { + let! _ = deleteFiles generatedSources -Target.create "RunTests" (fun _ -> dotnet "test .") + let mutable exitCode = 0 -// -------------------------------------------------------------------------------------- -// Run the unit tests using test runner + for project in [ "src/FsLex/fslex.fsproj"; "src/FsYacc/fsyacc.fsproj" ] do + if exitCode = 0 then + let! code = + exec "dotnet" [ "publish"; project; "-c"; "Release"; "/v:n"; "-f"; targetFramework ] -Target.create "RunOldFsYaccTests" (fun _ -> - let script = - Path.Combine(__SOURCE_DIRECTORY__, "tests", "fsyacc", "OldFsYaccTests.fsx") + exitCode <- code - dotnet $"fake run {script}") + return exitCode + } -// -------------------------------------------------------------------------------------- -// Build a NuGet package - -Target.create "NuGet" (fun _ -> - // project-specific packages - let releaseNotes = String.toLines release.Notes - dotnet $"pack FsLexYacc.sln -c Release -o bin /p:PackageReleaseNotes=\"{releaseNotes}\" /p:PackageVersion={release.NugetVersion}" - - // the meta-package - Paket.pack (fun p -> - { p with - ToolType = ToolType.CreateLocalTool() - TemplateFile = "nuget/FsLexYacc.template" - Version = release.NugetVersion - OutputPath = "bin" - ReleaseNotes = String.toLines release.Notes - })) +/// The runtime, plus the two sample projects that exercise the freshly published tools. +let buildLibraries = + async { + let! _ = deleteFiles generatedTestSources -// -------------------------------------------------------------------------------------- -// Generate the documentation + let mutable exitCode = 0 -Target.create "GenerateDocs" (fun _ -> - let result = - DotNet.exec - (fun p -> - { p with - WorkingDirectory = __SOURCE_DIRECTORY__ - }) - "fsdocs" - "build --eval" + for project in + [ + "src/FsLexYacc.Runtime/FsLexYacc.Runtime.fsproj" + "tests/JsonLexAndYaccExample/JsonLexAndYaccExample.fsproj" + "tests/LexAndYaccMiniProject/LexAndYaccMiniProject.fsproj" + ] do + if exitCode = 0 then + let! code = exec "dotnet" [ "build"; project; "-c"; "Release"; "/v:n" ] + exitCode <- code - if not result.OK then - failwith "error generating docs") + return exitCode + } // -------------------------------------------------------------------------------------- -// Release Scripts - -Target.create "Release" ignore - +// Packaging // -------------------------------------------------------------------------------------- -// Run all targets by default. Invoke 'build ' to override - -Target.create "All" ignore - -"Clean" -==> "CheckFormat" -==> "AssemblyInfo" -==> "Build" -==> "RunTests" -==> "RunOldFsYaccTests" -==> "All" -"CleanDocs" ==> "Build" ==> "GenerateDocs" +let pack = + async { + let releaseNotes = String.concat Environment.NewLine release.Notes + + // The per-project packages. + let! projectPackages = + exec + "dotnet" + [ + "pack" + "FsLexYacc.sln" + "-c" + "Release" + "-o" + "bin" + $"/p:PackageReleaseNotes={releaseNotes}" + $"/p:PackageVersion={release.NugetVersion}" + ] + + if projectPackages <> 0 then + return projectPackages + else + // The FsLexYacc meta-package, which is assembled by paket from a template rather + // than from a project, because it ships the published tools instead of a library. + return! + exec + "dotnet" + [ + "paket" + "pack" + "--template" + "nuget/FsLexYacc.template" + "--version" + release.NugetVersion + "--release-notes" + releaseNotes + "bin" + ] + } -"Build" ==> "NuGet" - -"All" ==> "Release" - -"NuGet" ==> "Release" +// -------------------------------------------------------------------------------------- +// Pipelines +// -------------------------------------------------------------------------------------- -Target.runOrDefaultWithArguments "All" +pipeline "Build" { + workingDir root + stage "Clean" { run (cleanDirs [ "bin"; "temp" ]) } + stage "CheckFormat" { run "dotnet fantomas check ." } + stage "AssemblyInfo" { run generateAssemblyInfo } + stage "BuildTools" { run buildTools } + stage "BuildLibraries" { run buildLibraries } + stage "UnitTests" { run "dotnet test ." } + stage "OldFsYaccTests" { run "dotnet fsi tests/fsyacc/OldFsYaccTests.fsx" } + runIfOnlySpecified false +} + +pipeline "Release" { + workingDir root + stage "Clean" { run (cleanDirs [ "bin"; "temp" ]) } + stage "CheckFormat" { run "dotnet fantomas check ." } + stage "AssemblyInfo" { run generateAssemblyInfo } + stage "BuildTools" { run buildTools } + stage "BuildLibraries" { run buildLibraries } + stage "UnitTests" { run "dotnet test ." } + stage "OldFsYaccTests" { run "dotnet fsi tests/fsyacc/OldFsYaccTests.fsx" } + stage "NuGet" { run pack } + runIfOnlySpecified true +} + +pipeline "Docs" { + workingDir root + stage "CleanDocs" { run (cleanDirs [ "output"; ".fsdocs" ]) } + stage "AssemblyInfo" { run generateAssemblyInfo } + stage "BuildTools" { run buildTools } + stage "BuildLibraries" { run buildLibraries } + stage "GenerateDocs" { run "dotnet fsdocs build --eval" } + runIfOnlySpecified true +} + +tryPrintPipelineCommandHelp () diff --git a/build.sh b/build.sh index 2fc8163..7ffcb84 100755 --- a/build.sh +++ b/build.sh @@ -5,5 +5,5 @@ then else dotnet tool restore dotnet paket restore - dotnet fake run build.fsx $@ + dotnet fsi build.fsx $@ fi \ No newline at end of file diff --git a/src/FsLex.Core/AssemblyInfo.fs b/src/FsLex.Core/AssemblyInfo.fs index 22f554d..6a2d90c 100644 --- a/src/FsLex.Core/AssemblyInfo.fs +++ b/src/FsLex.Core/AssemblyInfo.fs @@ -1,17 +1,17 @@ -// Auto-Generated by FAKE; do not edit +// Auto-Generated by build.fsx; do not edit namespace System open System.Reflection [] [] [] -[] -[] +[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "FsLex.Core" let [] AssemblyProduct = "FsLexYacc" let [] AssemblyDescription = "FsLex/FsYacc lexer/parser generation tools" - let [] AssemblyVersion = "11.3.0" - let [] AssemblyFileVersion = "11.3.0" + let [] AssemblyVersion = "12.0.0" + let [] AssemblyFileVersion = "12.0.0" diff --git a/src/FsLex/AssemblyInfo.fs b/src/FsLex/AssemblyInfo.fs index 1ccbd7e..98743eb 100644 --- a/src/FsLex/AssemblyInfo.fs +++ b/src/FsLex/AssemblyInfo.fs @@ -1,17 +1,17 @@ -// Auto-Generated by FAKE; do not edit +// Auto-Generated by build.fsx; do not edit namespace System open System.Reflection [] [] [] -[] -[] +[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "FsLex" let [] AssemblyProduct = "FsLexYacc" let [] AssemblyDescription = "FsLex/FsYacc lexer/parser generation tools" - let [] AssemblyVersion = "11.3.0" - let [] AssemblyFileVersion = "11.3.0" + let [] AssemblyVersion = "12.0.0" + let [] AssemblyFileVersion = "12.0.0" diff --git a/src/FsLexYacc.Runtime/AssemblyInfo.fs b/src/FsLexYacc.Runtime/AssemblyInfo.fs index a205a99..4851b29 100644 --- a/src/FsLexYacc.Runtime/AssemblyInfo.fs +++ b/src/FsLexYacc.Runtime/AssemblyInfo.fs @@ -1,17 +1,17 @@ -// Auto-Generated by FAKE; do not edit +// Auto-Generated by build.fsx; do not edit namespace System open System.Reflection [] [] [] -[] -[] +[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "FsLexYacc.Runtime" let [] AssemblyProduct = "FsLexYacc.Runtime" let [] AssemblyDescription = "FsLex/FsYacc lexer/parser generation tools" - let [] AssemblyVersion = "11.3.0" - let [] AssemblyFileVersion = "11.3.0" + let [] AssemblyVersion = "12.0.0" + let [] AssemblyFileVersion = "12.0.0" diff --git a/src/FsYacc.Core/AssemblyInfo.fs b/src/FsYacc.Core/AssemblyInfo.fs index 4f48a46..1532178 100644 --- a/src/FsYacc.Core/AssemblyInfo.fs +++ b/src/FsYacc.Core/AssemblyInfo.fs @@ -1,17 +1,17 @@ -// Auto-Generated by FAKE; do not edit +// Auto-Generated by build.fsx; do not edit namespace System open System.Reflection [] [] [] -[] -[] +[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "FsYacc.Core" let [] AssemblyProduct = "FsLexYacc" let [] AssemblyDescription = "FsLex/FsYacc lexer/parser generation tools" - let [] AssemblyVersion = "11.3.0" - let [] AssemblyFileVersion = "11.3.0" + let [] AssemblyVersion = "12.0.0" + let [] AssemblyFileVersion = "12.0.0" diff --git a/src/FsYacc/AssemblyInfo.fs b/src/FsYacc/AssemblyInfo.fs index 6e3b55d..9edfe3c 100644 --- a/src/FsYacc/AssemblyInfo.fs +++ b/src/FsYacc/AssemblyInfo.fs @@ -1,17 +1,17 @@ -// Auto-Generated by FAKE; do not edit +// Auto-Generated by build.fsx; do not edit namespace System open System.Reflection [] [] [] -[] -[] +[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "FsYacc" let [] AssemblyProduct = "FsLexYacc" let [] AssemblyDescription = "FsLex/FsYacc lexer/parser generation tools" - let [] AssemblyVersion = "11.3.0" - let [] AssemblyFileVersion = "11.3.0" + let [] AssemblyVersion = "12.0.0" + let [] AssemblyFileVersion = "12.0.0" diff --git a/tests/fsyacc/OldFsYaccTests.fsx b/tests/fsyacc/OldFsYaccTests.fsx old mode 100644 new mode 100755 index 1227a1a..9cc98a2 --- a/tests/fsyacc/OldFsYaccTests.fsx +++ b/tests/fsyacc/OldFsYaccTests.fsx @@ -1,22 +1,13 @@ -#r @"paket: -frameworks: net6.0 +#!/usr/bin/env -S dotnet fsi -nuget FSharp.Core ~> 5.0 -nuget Fake.IO.FileSystem -nuget Fake.DotNet.Fsc -nuget Fake.Core.Trace //" - -#if !FAKE -#load "./.fake/oldfsyacctests.fsx/intellisense.fsx" -#r "netstandard" // Temp fix for https://github.com/fsharp/FAKE/issues/1985 -#endif +// The original fsyacc/fslex test suite: generate a lexer and parser from the checked-in +// specifications, build the project that consumes them, and compare its output against a +// baseline file. Run on its own with `dotnet fsi tests/fsyacc/OldFsYaccTests.fsx`. open System -open System.Runtime.InteropServices +open System.Diagnostics open System.IO - -open Fake.IO -open Fake.Core +open System.Runtime.InteropServices let assertFileExists file = if File.Exists(file) then @@ -24,84 +15,114 @@ let assertFileExists file = else failwithf "'%s' doesn't exist" file -let dotnet arguments = - let result = - CreateProcess.fromRawCommandLine "dotnet" arguments - |> Proc.run +/// Start a process with an explicit argument list, so a path containing a space survives. +let private start (redirect: bool) (arguments: string list) = + let startInfo = + ProcessStartInfo( + "dotnet", + UseShellExecute = false, + RedirectStandardOutput = redirect, + RedirectStandardError = redirect + ) + + for argument in arguments do + startInfo.ArgumentList.Add argument + + Process.Start startInfo - if result.ExitCode <> 0 then - failwithf "Failed to run \"dotnet %s\"" arguments +let dotnet (arguments: string list) = + use proc = start false arguments + proc.WaitForExit() -let run project args = - Trace.traceImportant <| sprintf "Running '%s' with args %s" project args - dotnet $"build {project} -c Release" - dotnet $"run --project {project} {args}" + if proc.ExitCode <> 0 then + failwithf "Failed to run \"dotnet %s\"" (String.concat " " arguments) -let test proj shouldBeOK (args, baseLineOutput) = - Trace.traceImportant <| sprintf "Running '%s' with args '%s'" proj args +/// Run and capture, returning the exit code together with everything written to stderr. +let private dotnetCaptured (arguments: string list) = + use proc = start true arguments + let error = proc.StandardError.ReadToEnd() + proc.StandardOutput.ReadToEnd() |> ignore + proc.WaitForExit() + proc.ExitCode, error - let res = - CreateProcess.fromRawCommandLine "dotnet" $"run --project {proj} {args}" - |> CreateProcess.redirectOutput - |> Proc.run +let run project (arguments: string list) = + printfn "Running '%s' with args %s" project (String.concat " " arguments) + dotnet [ "build"; project; "-c"; "Release" ] + dotnet [ "run"; "--project"; project; yield! arguments ] - if (res.ExitCode = 0) <> shouldBeOK then - failwithf "Process failed with code %d on input %s" res.ExitCode args +let test proj shouldBeOK (arguments: string list, baseLineOutput) = + printfn "Running '%s' with args '%s'" proj (String.concat " " arguments) + + let exitCode, error = dotnetCaptured [ "run"; "--project"; proj; yield! arguments ] + + if (exitCode = 0) <> shouldBeOK then + failwithf "Process failed with code %d on input %s" exitCode (String.concat " " arguments) let output = // For some reason, the output is captured in the stderr - res.Result.Error.Split('\n', StringSplitOptions.RemoveEmptyEntries) + error.Split('\n', StringSplitOptions.RemoveEmptyEntries) |> Array.map (fun line -> if line.StartsWith("parsed") then let pieces = line.Split(' ') - let pathPiece = pieces.[1] + let pathPiece = pieces.[1] + let idx = let value = if RuntimeInformation.IsOSPlatform(OSPlatform.Windows) then @"\" else "/" + pathPiece.LastIndexOf(value) + let pathPiece = if idx >= 0 then - pathPiece.[idx+1 ..] + pathPiece.[idx + 1 ..] else pathPiece + pieces.[0] + " " + pathPiece + " " + pieces.[2] else line) - if (not <| File.Exists baseLineOutput) - then failwithf "Baseline file '%s' does not exist" baseLineOutput + if (not <| File.Exists baseLineOutput) then + failwithf "Baseline file '%s' does not exist" baseLineOutput let expectedLines = File.ReadAllLines baseLineOutput - if output.Length <> expectedLines.Length || - Seq.map2 (=) output expectedLines |> Seq.exists not - then - printfn "Expected:" - for line in expectedLines do + if + output.Length <> expectedLines.Length + || Seq.map2 (=) output expectedLines |> Seq.exists not + then + printfn "Expected:" + + for line in expectedLines do printfn "\t%s" line - printfn "Output:" - for line in output do + printfn "Output:" + + for line in output do printfn "\t%s" line - File.WriteAllLines(baseLineOutput+".err", output) - failwithf "Output is not equal to expected base line '%s'" baseLineOutput + File.WriteAllLines(baseLineOutput + ".err", output) + failwithf "Output is not equal to expected base line '%s'" baseLineOutput + +let fslexProject = + Path.Combine(__SOURCE_DIRECTORY__, "..", "..", "src", "FsLex", "fslex.fsproj") -let fslexProject = Path.Combine(__SOURCE_DIRECTORY__, "..", "..", "src", "FsLex", "fslex.fsproj") -let fsYaccProject = Path.Combine(__SOURCE_DIRECTORY__ , "..", "..", "src", "FsYacc", "fsyacc.fsproj") +let fsYaccProject = + Path.Combine(__SOURCE_DIRECTORY__, "..", "..", "src", "FsYacc", "fsyacc.fsproj") assertFileExists fslexProject assertFileExists fsYaccProject -let fsLex = run fslexProject +let fsLex = run fslexProject let fsYacc = run fsYaccProject -let repro1885Fsl = Path.Combine(__SOURCE_DIRECTORY__, "repro1885", "repro1885.fsl") +let repro1885Fsl = + Path.Combine(__SOURCE_DIRECTORY__, "repro1885", "repro1885.fsl") // Regression test for FSB 1885 -fsLex repro1885Fsl +fsLex [ repro1885Fsl ] // Test 1 let test1lexFs = Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1lex.fs") @@ -109,78 +130,131 @@ let test1lexFsl = Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1lex.fsl") let test1Fs = Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1.fs") let test1Fsy = Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1.fsy") let test1Input1 = Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1.input1") -let test1Input1Bsl = Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1.input1.bsl") -let test1Input1TokensBsl = Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1.input1.tokens.bsl") -let test1Input2Variation1 = Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1.input2.variation1") -let test1Input2Variation2 = Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1.input2.variation2") -let test1Input2Bsl = Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1.input2.bsl") + +let test1Input1Bsl = + Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1.input1.bsl") + +let test1Input1TokensBsl = + Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1.input1.tokens.bsl") + +let test1Input2Variation1 = + Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1.input2.variation1") + +let test1Input2Variation2 = + Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1.input2.variation2") + +let test1Input2Bsl = + Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1.input2.bsl") + let test1Input3 = Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1.input3") -let test1Input3Bsl = Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1.input3.bsl") -let test1Input3TokensBsl = Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1.input3.tokens.bsl") + +let test1Input3Bsl = + Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1.input3.bsl") + +let test1Input3TokensBsl = + Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1.input3.tokens.bsl") + let test1Proj = Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1.fsproj") let test1Input4 = Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1.input4") -let test1Input4Bsl = Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1.input4.bsl") -let test1Input4TokensBsl = Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1.input4.tokens.bsl") +let test1Input4Bsl = + Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1.input4.bsl") + +let test1Input4TokensBsl = + Path.Combine(__SOURCE_DIRECTORY__, "Test1", "test1.input4.tokens.bsl") -let runTests' shouldBeOK projFile xs = - dotnet $"build {projFile} -c Release" +let runTests' shouldBeOK projFile xs = + dotnet [ "build"; projFile; "-c"; "Release" ] xs |> List.iter (test projFile shouldBeOK) -let runTests projFile xs = runTests' true projFile xs - -fsLex ("-o " + test1lexFs + " " + test1lexFsl) -fsYacc ("--module TestParser -o " + test1Fs + " " + test1Fsy) -runTests test1Proj [ - sprintf "--tokens %s" test1Input1, test1Input1TokensBsl - test1Input1, test1Input1Bsl - test1Input1, test1Input1Bsl - sprintf "%s %s" test1Input2Variation1 test1Input2Variation2, test1Input2Bsl - sprintf "--tokens %s" test1Input3, test1Input3TokensBsl - test1Input3, test1Input3Bsl - ] + +let runTests projFile xs = runTests' true projFile xs + +fsLex [ "-o"; test1lexFs; test1lexFsl ] +fsYacc [ "--module"; "TestParser"; "-o"; test1Fs; test1Fsy ] + +runTests + test1Proj + [ + [ "--tokens"; test1Input1 ], test1Input1TokensBsl + [ test1Input1 ], test1Input1Bsl + [ test1Input1 ], test1Input1Bsl + [ test1Input2Variation1; test1Input2Variation2 ], test1Input2Bsl + [ "--tokens"; test1Input3 ], test1Input3TokensBsl + [ test1Input3 ], test1Input3Bsl + ] // Case insensitive option test -fsLex ("-i -o " + test1lexFs + " " + test1lexFsl) -runTests test1Proj [ - sprintf "--tokens %s" test1Input4, test1Input4TokensBsl - sprintf "--tokens %s" test1Input3, test1Input4TokensBsl - sprintf "%s %s" test1Input3 test1Input4, test1Input4Bsl +fsLex [ "-i"; "-o"; test1lexFs; test1lexFsl ] + +runTests + test1Proj + [ + [ "--tokens"; test1Input4 ], test1Input4TokensBsl + [ "--tokens"; test1Input3 ], test1Input4TokensBsl + [ test1Input3; test1Input4 ], test1Input4Bsl ] // Test 1 unicode -let test1unicodelexFs = Path.Combine(__SOURCE_DIRECTORY__, "unicode", "test1-unicode-lex.fs") -let test1unicodelexFsl = Path.Combine(__SOURCE_DIRECTORY__, "unicode", "test1-unicode-lex.fsl") -let test1unicodeFs = Path.Combine(__SOURCE_DIRECTORY__, "unicode", "test1-unicode.fs") -let test1unicodeFsy = Path.Combine(__SOURCE_DIRECTORY__, "unicode", "test1-unicode.fsy") -let test1unicodeProj = Path.Combine(__SOURCE_DIRECTORY__, "unicode", "test1-unicode.fsproj") -let test1unicodeInput3 = Path.Combine(__SOURCE_DIRECTORY__, "unicode", "test1-unicode.input3.utf8") -let test1unicodeInput3TokensBsl = Path.Combine(__SOURCE_DIRECTORY__, "unicode", "test1-unicode.input3.tokens.bsl") -let test1unicodeWithTitleCaseLetter = Path.Combine(__SOURCE_DIRECTORY__, "unicode", "test1-unicode.WithTitleCaseLetter.utf8") -let test1unicodeWithTitleCaseLetterTokensBsl = Path.Combine(__SOURCE_DIRECTORY__, "unicode", "test1-unicode.WithTitleCaseLetter.tokens.bsl") -let test1unicodeWithTitleCaseLetterTokensErrorBsl = Path.Combine(__SOURCE_DIRECTORY__, "unicode", "test1-unicode.WithTitleCaseLetter.tokens.error.bsl") - -fsLex ("--unicode -o " + test1unicodelexFs + " " + test1unicodelexFsl) -fsYacc ("--module TestParser -o " + test1unicodeFs + " " + test1unicodeFsy) - -runTests test1unicodeProj [ - sprintf "--tokens %s" test1Input1, test1Input1TokensBsl - test1Input1, test1Input1Bsl - sprintf "%s %s" test1Input2Variation1 test1Input2Variation2, test1Input2Bsl - sprintf "--tokens %s" test1unicodeInput3, test1unicodeInput3TokensBsl +let test1unicodelexFs = + Path.Combine(__SOURCE_DIRECTORY__, "unicode", "test1-unicode-lex.fs") + +let test1unicodelexFsl = + Path.Combine(__SOURCE_DIRECTORY__, "unicode", "test1-unicode-lex.fsl") + +let test1unicodeFs = + Path.Combine(__SOURCE_DIRECTORY__, "unicode", "test1-unicode.fs") + +let test1unicodeFsy = + Path.Combine(__SOURCE_DIRECTORY__, "unicode", "test1-unicode.fsy") + +let test1unicodeProj = + Path.Combine(__SOURCE_DIRECTORY__, "unicode", "test1-unicode.fsproj") + +let test1unicodeInput3 = + Path.Combine(__SOURCE_DIRECTORY__, "unicode", "test1-unicode.input3.utf8") + +let test1unicodeInput3TokensBsl = + Path.Combine(__SOURCE_DIRECTORY__, "unicode", "test1-unicode.input3.tokens.bsl") + +let test1unicodeWithTitleCaseLetter = + Path.Combine(__SOURCE_DIRECTORY__, "unicode", "test1-unicode.WithTitleCaseLetter.utf8") + +let test1unicodeWithTitleCaseLetterTokensBsl = + Path.Combine(__SOURCE_DIRECTORY__, "unicode", "test1-unicode.WithTitleCaseLetter.tokens.bsl") + +let test1unicodeWithTitleCaseLetterTokensErrorBsl = + Path.Combine(__SOURCE_DIRECTORY__, "unicode", "test1-unicode.WithTitleCaseLetter.tokens.error.bsl") + +fsLex [ "--unicode"; "-o"; test1unicodelexFs; test1unicodelexFsl ] +fsYacc [ "--module"; "TestParser"; "-o"; test1unicodeFs; test1unicodeFsy ] + +runTests + test1unicodeProj + [ + [ "--tokens"; test1Input1 ], test1Input1TokensBsl + [ test1Input1 ], test1Input1Bsl + [ test1Input2Variation1; test1Input2Variation2 ], test1Input2Bsl + [ "--tokens"; test1unicodeInput3 ], test1unicodeInput3TokensBsl ] -runTests' false test1unicodeProj [ - sprintf "--tokens %s" test1unicodeWithTitleCaseLetter, test1unicodeWithTitleCaseLetterTokensErrorBsl -] +runTests' + false + test1unicodeProj + [ + [ "--tokens"; test1unicodeWithTitleCaseLetter ], test1unicodeWithTitleCaseLetterTokensErrorBsl + ] // Case insensitive option test -fsLex ("--unicode -i -o " + test1unicodelexFs + " " + test1unicodelexFsl) -runTests test1unicodeProj [ - sprintf "--tokens %s" test1Input1, test1Input1TokensBsl - test1Input1, test1Input1Bsl - sprintf "%s %s" test1Input2Variation1 test1Input2Variation2, test1Input2Bsl - sprintf "--tokens %s" test1unicodeInput3, test1unicodeInput3TokensBsl - sprintf "--tokens %s" test1unicodeWithTitleCaseLetter, test1unicodeWithTitleCaseLetterTokensBsl +fsLex [ "--unicode"; "-i"; "-o"; test1unicodelexFs; test1unicodelexFsl ] + +runTests + test1unicodeProj + [ + [ "--tokens"; test1Input1 ], test1Input1TokensBsl + [ test1Input1 ], test1Input1Bsl + [ test1Input2Variation1; test1Input2Variation2 ], test1Input2Bsl + [ "--tokens"; test1unicodeInput3 ], test1unicodeInput3TokensBsl + [ "--tokens"; test1unicodeWithTitleCaseLetter ], test1unicodeWithTitleCaseLetterTokensBsl ] // Test 2 @@ -190,20 +264,31 @@ let test2Fs = Path.Combine(__SOURCE_DIRECTORY__, "Test2", "test2.fs") let test2Fsy = Path.Combine(__SOURCE_DIRECTORY__, "Test2", "test2.fsy") let test2Proj = Path.Combine(__SOURCE_DIRECTORY__, "Test2", "test2.fsproj") let test2Input1 = Path.Combine(__SOURCE_DIRECTORY__, "Test2", "test2.input1") -let test2Input1TokensBsl = Path.Combine(__SOURCE_DIRECTORY__, "Test2", "test2.input1.tokens.bsl") + +let test2Input1TokensBsl = + Path.Combine(__SOURCE_DIRECTORY__, "Test2", "test2.input1.tokens.bsl") + let test2BadInput = Path.Combine(__SOURCE_DIRECTORY__, "Test2", "test2.badInput") -let test2BadInputTokensBsl = Path.Combine(__SOURCE_DIRECTORY__, "Test2", "test2.badInput.tokens.bsl") -fsLex ("-o " + test2lexFs + " " + test2lexFsl) -fsYacc ("--module TestParser -o " + test2Fs + " " + test2Fsy) +let test2BadInputTokensBsl = + Path.Combine(__SOURCE_DIRECTORY__, "Test2", "test2.badInput.tokens.bsl") + +fsLex [ "-o"; test2lexFs; test2lexFsl ] +fsYacc [ "--module"; "TestParser"; "-o"; test2Fs; test2Fsy ] -runTests test2Proj [ - sprintf "--tokens %s" test2Input1, test2Input1TokensBsl - sprintf "--tokens %s" test2BadInput, test2BadInputTokensBsl +runTests + test2Proj + [ + [ "--tokens"; test2Input1 ], test2Input1TokensBsl + [ "--tokens"; test2BadInput ], test2BadInputTokensBsl ] // #141 TODO -let repro141Fsl = Path.Combine(__SOURCE_DIRECTORY__, "repro_#141", "Lexer_fail_option_i.fsl") -let repro141Fs = Path.Combine(__SOURCE_DIRECTORY__, "repro_#141", "Lexer_fail_option_i.fs") -fsLex ("-i -o " + repro141Fs + " " + repro141Fsl) -fsLex ("--unicode -i -o " + repro141Fs + " " + repro141Fsl) +let repro141Fsl = + Path.Combine(__SOURCE_DIRECTORY__, "repro_#141", "Lexer_fail_option_i.fsl") + +let repro141Fs = + Path.Combine(__SOURCE_DIRECTORY__, "repro_#141", "Lexer_fail_option_i.fs") + +fsLex [ "-i"; "-o"; repro141Fs; repro141Fsl ] +fsLex [ "--unicode"; "-i"; "-o"; repro141Fs; repro141Fsl ] diff --git a/tests/fsyacc/repro1885/repro1885.fs b/tests/fsyacc/repro1885/repro1885.fs deleted file mode 100644 index a14ca65..0000000 --- a/tests/fsyacc/repro1885/repro1885.fs +++ /dev/null @@ -1,122 +0,0 @@ -# 1 "C:\Users\grzeg\repos\FsLexYacc\tests\fsyacc\repro1885\repro1885.fsl" - -(* - Repro of FSharp Bugs 1885, "FSLex doesn't ignore strings in comments" -*) - -open System - -(* -Testcase " <-------------------------- -*) - -(* -Testcase "asdfasdfasdf" <-------------------------- -*) - -// Opens methods related to fslex.exe -open Lexing - -// All of our token types are now generated by fsYacc -open Parser - - -let inc_lnum bol pos = - let lnum = pos.pos_lnum in - {pos with pos_lnum = lnum+1; pos_bol = bol } - -let newline lexbuf = - lexbuf_set_curr_p lexbuf - ( inc_lnum (lexeme_end lexbuf) (lexeme_end_p lexbuf)) - -// Convert a string such as "\"c:\\windows\\\"" into "c:\windows\" <-------------------------- -// "another testcase" <-------------------------- -// "and another <-------------------------- -let normalizeString (str : string) = - let str = str.Replace("\\\"", "\"") - let str = str.Replace("\\\\", "\\") - if str.[0] = '\"' && str.[str.Length - 1] = '\"' then - str.Substring(1, str.Length - 2) - else - str - - -# 44 "C:\Users\grzeg\repos\FsLexYacc\tests\fsyacc\repro1885\repro1885.fs" -let trans : uint16[] array = - [| - (* State 0 *) - [|8us;8us;8us;8us;8us;8us;8us;8us;8us;5us;6us;8us;8us;7us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;5us;8us;4us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;3us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;1us;8us;2us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;8us;9us;|]; - (* State 1 *) - [|65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;|]; - (* State 2 *) - [|65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;|]; - (* State 3 *) - [|65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;|]; - (* State 4 *) - [|12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;11us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;65535us;|]; - (* State 5 *) - [|65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;|]; - (* State 6 *) - [|65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;|]; - (* State 7 *) - [|65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;10us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;|]; - (* State 8 *) - [|65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;|]; - (* State 9 *) - [|65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;|]; - (* State 10 *) - [|65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;|]; - (* State 11 *) - [|65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;65535us;|]; - (* State 12 *) - [|12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;11us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;12us;65535us;|]; - |] -let actions : uint16[] = [|65535us;0us;1us;2us;6us;4us;5us;6us;6us;7us;5us;3us;65535us;|] -let _fslex_tables = FSharp.Text.Lexing.AsciiTables.Create(trans,actions) -let rec _fslex_dummy () = _fslex_dummy() -// Rule tokenstream -and tokenstream lexbuf = - match _fslex_tables.Interpret(0,lexbuf) with - | 0 -> ( -# 51 "C:\Users\grzeg\repos\FsLexYacc\tests\fsyacc\repro1885\repro1885.fsl" - LCURLY -# 83 "C:\Users\grzeg\repos\FsLexYacc\tests\fsyacc\repro1885\repro1885.fs" - ) - | 1 -> ( -# 52 "C:\Users\grzeg\repos\FsLexYacc\tests\fsyacc\repro1885\repro1885.fsl" - RCURLY -# 88 "C:\Users\grzeg\repos\FsLexYacc\tests\fsyacc\repro1885\repro1885.fs" - ) - | 2 -> ( -# 53 "C:\Users\grzeg\repos\FsLexYacc\tests\fsyacc\repro1885\repro1885.fsl" - EQUALS -# 93 "C:\Users\grzeg\repos\FsLexYacc\tests\fsyacc\repro1885\repro1885.fs" - ) - | 3 -> ( -# 55 "C:\Users\grzeg\repos\FsLexYacc\tests\fsyacc\repro1885\repro1885.fsl" - STR(lexeme lexbuf) -# 98 "C:\Users\grzeg\repos\FsLexYacc\tests\fsyacc\repro1885\repro1885.fs" - ) - | 4 -> ( -# 57 "C:\Users\grzeg\repos\FsLexYacc\tests\fsyacc\repro1885\repro1885.fsl" - tokenstream lexbuf -# 103 "C:\Users\grzeg\repos\FsLexYacc\tests\fsyacc\repro1885\repro1885.fs" - ) - | 5 -> ( -# 58 "C:\Users\grzeg\repos\FsLexYacc\tests\fsyacc\repro1885\repro1885.fsl" - newline lexbuf; tokenstream lexbuf -# 108 "C:\Users\grzeg\repos\FsLexYacc\tests\fsyacc\repro1885\repro1885.fs" - ) - | 6 -> ( -# 60 "C:\Users\grzeg\repos\FsLexYacc\tests\fsyacc\repro1885\repro1885.fsl" - STR("ParseError" + (lexeme lexbuf)) -# 113 "C:\Users\grzeg\repos\FsLexYacc\tests\fsyacc\repro1885\repro1885.fs" - ) - | 7 -> ( -# 61 "C:\Users\grzeg\repos\FsLexYacc\tests\fsyacc\repro1885\repro1885.fsl" - EOF -# 118 "C:\Users\grzeg\repos\FsLexYacc\tests\fsyacc\repro1885\repro1885.fs" - ) - | _ -> failwith "tokenstream" - -# 3000000 "C:\Users\grzeg\repos\FsLexYacc\tests\fsyacc\repro1885\repro1885.fs"