diff --git a/.gitignore b/.gitignore
index 964cde2fc6..857182a3dc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,12 +1,9 @@
-# Downloaded packages and build tools.
-/lkg
-/packages
-/Tools
+# output location
+artifacts/
+
+packages/
/tests/scripts/current
-/release
-/debug
-/Proto
# Patches that may have been generated by scripts.
# (These aren't generally useful to commit directly; if anything, they should be applied.)
@@ -218,7 +215,6 @@ times
/tests/fsharpqa/testenv/bin/System.ValueTuple.dll
source_link.json
.vs/
-/VSRelease/net40/bin
System.ValueTuple.dll
tests/fsharpqa/testenv/bin/System.ValueTuple.dll
lib/netcore/fsc/bin/
diff --git a/.vsts-pr.yaml b/.vsts-pr.yaml
index 67f78e6df0..44c277a394 100644
--- a/.vsts-pr.yaml
+++ b/.vsts-pr.yaml
@@ -1,31 +1,34 @@
-phases:
-- phase: Linux
- queue:
- name: Hosted Linux Preview
- timeoutInMinutes: 90
- parallel: 2
+jobs:
+- job: Linux
+ pool:
+ vmImage: ubuntu-16.04
+ timeoutInMinutes: 90
+ strategy:
+ maxParallel: 2
matrix:
- release_default:
- _command: ./mono/cibuild.sh
- _args: release
+ dotnet_sdk:
+ _command: make
+ _args: Configuration=release
+ # disabled until it can be properly fixed
release_fcs:
_command: ./fcs/build.sh
_args: Build
steps:
- - script: $(_command) $(_args)
- - task: PublishBuildArtifacts@1
- inputs:
- PathtoPublish: '$(Build.SourcesDirectory)/tests/TestResults'
- ArtifactName: 'Linux $(_command) $(_args)'
- publishLocation: Container
- continueOnError: true
- condition: failed()
+ - script: $(_command) $(_args)
+ - task: PublishBuildArtifacts@1
+ inputs:
+ PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults'
+ ArtifactName: 'Linux $(_command) $(_args)'
+ publishLocation: Container
+ continueOnError: true
+ condition: failed()
-- phase: Windows
- queue:
- name: Hosted VS2017
- timeoutInMinutes: 90
- parallel: 7
+- job: Windows
+ pool:
+ vmImage: vs2017-win2016
+ timeoutInMinutes: 120
+ strategy:
+ maxParallel: 7
matrix:
ci_part1:
_command: build.cmd
@@ -49,11 +52,11 @@ phases:
_command: fcs\build.cmd
_args: TestAndNuget
steps:
- - script: $(_command) $(_args)
- - task: PublishBuildArtifacts@1
- inputs:
- PathtoPublish: '$(Build.SourcesDirectory)\tests\TestResults'
- ArtifactName: 'Windows $(_command) $(_args)'
- publishLocation: Container
- continueOnError: true
- condition: failed()
+ - script: $(_command) $(_args)
+ - task: PublishBuildArtifacts@1
+ inputs:
+ PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults'
+ ArtifactName: 'Windows $(_command) $(_args)'
+ publishLocation: Container
+ continueOnError: true
+ condition: failed()
diff --git a/CoordinateXlif.targets b/CoordinateXlif.targets
new file mode 100644
index 0000000000..ea1ed17aaa
--- /dev/null
+++ b/CoordinateXlif.targets
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/FSharp.Directory.Build.props b/FSharp.Directory.Build.props
new file mode 100644
index 0000000000..e9c2a5c5e9
--- /dev/null
+++ b/FSharp.Directory.Build.props
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/FSharp.Directory.Build.targets b/FSharp.Directory.Build.targets
new file mode 100644
index 0000000000..84125426d5
--- /dev/null
+++ b/FSharp.Directory.Build.targets
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/FSharp.Profiles.props b/FSharp.Profiles.props
new file mode 100644
index 0000000000..2e2edb7370
--- /dev/null
+++ b/FSharp.Profiles.props
@@ -0,0 +1,53 @@
+
+
+
+
+
+ $(DefineConstants);CROSS_PLATFORM_COMPILER
+ $(DefineConstants);ENABLE_MONO_SUPPORT
+ $(DefineConstants);BE_SECURITY_TRANSPARENT
+ $(DefineConstants);FX_LCIDFROMCODEPAGE
+
+
+
+ $(DefineConstants);NETSTANDARD
+ $(DefineConstants);NETSTANDARD1_6
+ $(DefineConstants);FX_NO_APP_DOMAINS
+ $(DefineConstants);FX_NO_ARRAY_LONG_LENGTH
+ $(DefineConstants);FX_NO_BEGINEND_READWRITE
+ $(DefineConstants);FX_NO_BINARY_SERIALIZATION
+ $(DefineConstants);FX_NO_CONVERTER
+ $(DefineConstants);FX_NO_DEFAULT_DEPENDENCY_TYPE
+ $(DefineConstants);FX_NO_CORHOST_SIGNER
+ $(DefineConstants);FX_NO_EVENTWAITHANDLE_IDISPOSABLE
+ $(DefineConstants);FX_NO_EXIT_CONTEXT_FLAGS
+ $(DefineConstants);FX_NO_HEAPTERMINATION
+ $(DefineConstants);FX_NO_LINKEDRESOURCES
+ $(DefineConstants);FX_NO_LOADER_OPTIMIZATION
+ $(DefineConstants);FX_NO_PARAMETERIZED_THREAD_START
+ $(DefineConstants);FX_NO_PDB_READER
+ $(DefineConstants);FX_NO_PDB_WRITER
+ $(DefineConstants);FX_NO_REFLECTION_MODULE_HANDLES
+ $(DefineConstants);FX_NO_REFLECTION_ONLY
+ $(DefineConstants);FX_NO_RUNTIMEENVIRONMENT
+ $(DefineConstants);FX_NO_SECURITY_PERMISSIONS
+ $(DefineConstants);FX_NO_SERVERCODEPAGES
+ $(DefineConstants);FX_NO_SYMBOLSTORE
+ $(DefineConstants);FX_NO_SYSTEM_CONFIGURATION
+ $(DefineConstants);FX_NO_THREAD
+ $(DefineConstants);FX_NO_THREADABORT
+ $(DefineConstants);FX_NO_WAITONE_MILLISECONDS
+ $(DefineConstants);FX_NO_WEB_CLIENT
+ $(DefineConstants);FX_NO_WIN_REGISTRY
+ $(DefineConstants);FX_NO_WINFORMS
+ $(DefineConstants);FX_NO_INDENTED_TEXT_WRITER
+ $(DefineConstants);FX_REDUCED_EXCEPTIONS
+ $(DefineConstants);FX_REDUCED_CONSOLE
+ $(DefineConstants);FX_RESHAPED_REFEMIT
+ $(DefineConstants);FX_RESHAPED_GLOBALIZATION
+ $(DefineConstants);FX_RESHAPED_REFLECTION
+ $(DefineConstants);FX_RESHAPED_MSBUILD
+ $(OtherFlags) --simpleresolution
+
+
+
diff --git a/FSharpBuild.Directory.Build.props b/FSharpBuild.Directory.Build.props
new file mode 100644
index 0000000000..c5e4108181
--- /dev/null
+++ b/FSharpBuild.Directory.Build.props
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+ Debug
+ $(MSBuildThisFileDirectory)
+ $(RepoRoot)src
+ $(RepoRoot)artifacts
+ $(ArtifactsDir)\toolset
+ $(ArtifactsDir)\bin
+ $(ArtifactsDir)\obj
+ $(ArtifactsDir)\packages
+ $(ArtifactsBinDir)\$(MSBuildProjectName)
+ $(ArtifactsObjDir)\$(MSBuildProjectName)
+ $(ArtifactsDir)\SymStore
+ $(ArtifactsBinDir)\fsc\Proto\net46
+ $(ArtifactsBinDir)/fsc/Proto/netcoreapp2.1
+ 4.4.0
+
+
+
+
+
+ $(NUGET_PACKAGES)
+ $(UserProfile)\.nuget\packages\
+ $(HOME)/.nuget/packages/
+
+ $(NuGetPackageRoot)\
+ $(NuGetPackageRoot)/
+
+ true
+
+
+
+
+ true
+ /usr/lib/mono/4.5-api
+ /usr/lib/mono/4.6-api
+
+
+
+
+ false
+ true
+ $(FSharpSourcesRoot)\fsharp\msft.pubkey
+ true
+ true
+
+
+ $(FSharpSourcesRoot)\fsharp\test.snk
+ false
+ STRONG_NAME_FSHARP_COMPILER_WITH_TEST_KEY;$(DefineConstants)
+
+
+
+
+ false
+ true
+
+
+
+
+ portable
+ fs
+ false
+ true
+
+
+
+
+ $(ProtoOutputPath)\Microsoft.FSharp.Targets
+ $(ProtoOutputPath)\Microsoft.FSharp.NetSdk.props
+ $(ProtoOutputPath)\Microsoft.FSharp.NetSdk.targets
+ $(ProtoOutputPath)\Microsoft.FSharp.Overrides.NetSdk.targets
+
+
+
diff --git a/FSharpBuild.Directory.Build.targets b/FSharpBuild.Directory.Build.targets
new file mode 100644
index 0000000000..fa39d7498f
--- /dev/null
+++ b/FSharpBuild.Directory.Build.targets
@@ -0,0 +1,42 @@
+
+
+
+
+
+ en;$(XlfLanguages)
+
+
+
+
+ $(AssetTargetFallback);net462
+
+
+
+ $(CompileDependsOn);CopyAndSubstituteTextFiles
+
+
+
+
+ <_ReplacementText>$([System.IO.File]::ReadAllText('%(CopyAndSubstituteText.FullPath)'))
+ <_ReplacementText Condition="'%(CopyAndSubstituteText.Pattern1)' != ''">$(_ReplacementText.Replace('%(CopyAndSubstituteText.Pattern1)', '%(CopyAndSubstituteText.Replacement1)'))
+ <_ReplacementText Condition="'%(CopyAndSubstituteText.Pattern2)' != ''">$(_ReplacementText.Replace('%(CopyAndSubstituteText.Pattern2)', '%(CopyAndSubstituteText.Replacement2)'))
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/NuGet.Config b/NuGet.Config
index f4c19635b0..8f21de1b15 100644
--- a/NuGet.Config
+++ b/NuGet.Config
@@ -1,13 +1,15 @@
-
-
-
+
+
-
+
+
-
-
\ No newline at end of file
+
+
+
+
diff --git a/PublishToBlob.proj b/PublishToBlob.proj
index 00bcee6335..21e8ec6eb6 100644
--- a/PublishToBlob.proj
+++ b/PublishToBlob.proj
@@ -10,26 +10,33 @@
Microsoft.DotNet.Build.Tasks.Feed
- 2.1.0-prerelease-02419-02
+ 2.2.0-beta.19066.1
-
-
+
+
+
+ $(MSBuildThisFileDirectory)artifacts\log\$(Configuration)\
+ AnyCPU
+ $(Platform)
+ $(ArtifactsLogDir)AssetManifest\$(OS)-$(PlatformName).xml
+
+
+ AssetManifestPath="$(AssetManifestFilePath)" />
diff --git a/RoslynPackageVersion.txt b/RoslynPackageVersion.txt
new file mode 100644
index 0000000000..593eafec19
--- /dev/null
+++ b/RoslynPackageVersion.txt
@@ -0,0 +1 @@
+2.9.0-beta8-63208-01
diff --git a/benchmarks/Benchmarks.sln b/benchmarks/Benchmarks.sln
new file mode 100644
index 0000000000..5d339f7a99
--- /dev/null
+++ b/benchmarks/Benchmarks.sln
@@ -0,0 +1,37 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.28307.136
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "CompilerServiceBenchmarks", "CompilerServiceBenchmarks\CompilerServiceBenchmarks.fsproj", "{9A3C565C-B514-4AE0-8B01-CA80E8453EB0}"
+EndProject
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Core", "..\src\fsharp\FSharp.Core\FSharp.Core.fsproj", "{BB9EAE76-194A-49D8-9618-586CBE7031D9}"
+EndProject
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Private", "..\src\fsharp\FSharp.Compiler.Private\FSharp.Compiler.Private.fsproj", "{F57B02B1-CF26-4D93-9211-8CEB4F1572F0}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {9A3C565C-B514-4AE0-8B01-CA80E8453EB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9A3C565C-B514-4AE0-8B01-CA80E8453EB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9A3C565C-B514-4AE0-8B01-CA80E8453EB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9A3C565C-B514-4AE0-8B01-CA80E8453EB0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BB9EAE76-194A-49D8-9618-586CBE7031D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BB9EAE76-194A-49D8-9618-586CBE7031D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BB9EAE76-194A-49D8-9618-586CBE7031D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BB9EAE76-194A-49D8-9618-586CBE7031D9}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F57B02B1-CF26-4D93-9211-8CEB4F1572F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F57B02B1-CF26-4D93-9211-8CEB4F1572F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F57B02B1-CF26-4D93-9211-8CEB4F1572F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F57B02B1-CF26-4D93-9211-8CEB4F1572F0}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {049A4D02-709F-418C-AD59-7FB0DBE956B1}
+ EndGlobalSection
+EndGlobal
diff --git a/benchmarks/CompilerServiceBenchmarks/CompilerServiceBenchmarks.fsproj b/benchmarks/CompilerServiceBenchmarks/CompilerServiceBenchmarks.fsproj
new file mode 100644
index 0000000000..fcdd08995e
--- /dev/null
+++ b/benchmarks/CompilerServiceBenchmarks/CompilerServiceBenchmarks.fsproj
@@ -0,0 +1,21 @@
+
+
+
+ Exe
+ net472
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/benchmarks/CompilerServiceBenchmarks/Program.fs b/benchmarks/CompilerServiceBenchmarks/Program.fs
new file mode 100644
index 0000000000..d5e4527577
--- /dev/null
+++ b/benchmarks/CompilerServiceBenchmarks/Program.fs
@@ -0,0 +1,60 @@
+open System
+open System.IO
+open BenchmarkDotNet.Attributes
+open BenchmarkDotNet.Running
+open Microsoft.FSharp.Compiler.ErrorLogger
+open Microsoft.FSharp.Compiler.SourceCodeServices
+open System.Text
+
+[]
+type CompilerServiceParsing() =
+
+ let mutable checkerOpt = None
+
+ let mutable sourceOpt = None
+
+ let parsingOptions =
+ {
+ SourceFiles = [|"TypeChecker.fs"|]
+ ConditionalCompilationDefines = []
+ ErrorSeverityOptions = FSharpErrorSeverityOptions.Default
+ IsInteractive = false
+ LightSyntax = None
+ CompilingFsLib = false
+ IsExe = false
+ }
+
+ []
+ member __.Setup() =
+ match checkerOpt with
+ | None -> checkerOpt <- Some(FSharpChecker.Create())
+ | _ -> ()
+
+ match sourceOpt with
+ | None ->
+ let source = File.ReadAllText("""..\..\..\..\..\src\fsharp\TypeChecker.fs""")
+ sourceOpt <- Some(source)
+ | _ -> ()
+
+ []
+ member __.ParsingSetup() =
+ match checkerOpt with
+ | None -> failwith "no checker"
+ | Some(checker) ->
+ checker.InvalidateAll()
+ checker.ClearLanguageServiceRootCachesAndCollectAndFinalizeAllTransients()
+ checker.ParseFile("dummy.fs", "dummy", parsingOptions) |> Async.RunSynchronously |> ignore
+
+ []
+ member __.Parsing() =
+ match checkerOpt, sourceOpt with
+ | None, _ -> failwith "no checker"
+ | _, None -> failwith "no source"
+ | Some(checker), Some(source) ->
+ let results = checker.ParseFile("TypeChecker.fs", source, parsingOptions) |> Async.RunSynchronously
+ if results.ParseHadErrors then failwithf "parse had errors: %A" results.Errors
+
+[]
+let main argv =
+ let _ = BenchmarkRunner.Run()
+ 0
diff --git a/build/projects/Directory.Build.props b/build/projects/Directory.Build.props
new file mode 100644
index 0000000000..bb8eac309b
--- /dev/null
+++ b/build/projects/Directory.Build.props
@@ -0,0 +1,3 @@
+
+
+
diff --git a/build/projects/Directory.Build.targets b/build/projects/Directory.Build.targets
new file mode 100644
index 0000000000..ccd47cc0a9
--- /dev/null
+++ b/build/projects/Directory.Build.targets
@@ -0,0 +1,3 @@
+
+
+
diff --git a/build/projects/Signing.proj b/build/projects/Signing.proj
new file mode 100644
index 0000000000..9e981e135e
--- /dev/null
+++ b/build/projects/Signing.proj
@@ -0,0 +1,27 @@
+
+
+
+
+ net46
+ $(NuGetPackageRoot)RoslynTools.SignTool\$(RoslynToolsSignToolPackageVersion)\tools\SignTool.exe
+ -msbuildPath "$(MSBuildBinPath)\msbuild.exe" -nugetPackagesPath "$(NuGetPackageRoot.TrimEnd('\'))" -config "$(ConfigFile)"
+ -testSign $(SignToolArgs)
+ -test $(SignToolArgs)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/targets/AssemblyVersions.props b/build/targets/AssemblyVersions.props
new file mode 100644
index 0000000000..b17f940a93
--- /dev/null
+++ b/build/targets/AssemblyVersions.props
@@ -0,0 +1,60 @@
+
+
+
+
+ $([System.DateTime]::Now.ToString(yyyyMMdd.0))
+
+ $(BUILD_BUILDNUMBER.Replace(".DRAFT", ""))
+
+
+ <_Build_Year>$(BUILD_BUILDNUMBER.Substring(0, 4))
+ <_Build_Month>$(BUILD_BUILDNUMBER.Substring(4, 2))
+ <_Build_Day>$(BUILD_BUILDNUMBER.Substring(6, 2))
+ <_Build_Number>$(BUILD_BUILDNUMBER.Substring(9))
+ $(_Build_Year).$(_Build_Month).$(_Build_Day).$(_Build_Number)
+
+ 4.5
+ $(FSCoreMajorVersion).5
+ $(FSCoreMajorVersion).0.0
+
+ 10.2
+ $(FSPackageMajorVersion).3
+ $(FSPackageVersion).0
+
+ 15
+ 9
+ $(VSMajorVersion).0
+ $(VSMajorVersion).$(VSMinorVersion).0.0
+
+
+ $(BUILD_BUILDNUMBER.Split('.')[0].Substring(2))
+ $(BUILD_BUILDNUMBER.Split('.')[1].PadLeft(2, '0'))
+ $(BuildTimeStamp_Date)$(BuildTimeStamp_Number)
+ $(VSAssemblyVersion.Split('.')[0]).$(VSAssemblyVersion.Split('.')[1]).$(BUILD_BUILDNUMBER)
+ 42.42.42.42
+ $(BuildTimeStamp_Date)-$(BuildTimeStamp_Number)
+
+
+
+
+
+
diff --git a/build/targets/CommonPackages.targets b/build/targets/CommonPackages.targets
new file mode 100644
index 0000000000..fad7b97612
--- /dev/null
+++ b/build/targets/CommonPackages.targets
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/build/targets/ConvertPortablePdbs.targets b/build/targets/ConvertPortablePdbs.targets
new file mode 100644
index 0000000000..c43042a499
--- /dev/null
+++ b/build/targets/ConvertPortablePdbs.targets
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+ $(NuGetPackageRoot)Pdb2Pdb\$(Pdb2PdbPackageVersion)\tools\Pdb2Pdb.exe
+ "$(TargetPath)" /out "$(SymStoreDirectory)\$(TargetName).pdb" /srcsvrvar SRC_INDEX=public
+
+
+
+
+
+
+
+
+ $(TargetDir)\$(TargetName).pdb
+
+
+
+
+
+
+
diff --git a/build/targets/GenerateAssemblyAttributes.targets b/build/targets/GenerateAssemblyAttributes.targets
new file mode 100644
index 0000000000..7b747c9dd9
--- /dev/null
+++ b/build/targets/GenerateAssemblyAttributes.targets
@@ -0,0 +1,119 @@
+
+
+
+
+ false
+
+
+
+
+ $(IntermediateOutputPath)$(MSBuildProjectName).AssemblyLevelAttributes$(DefaultLanguageSourceExtension)
+
+
+ $(NoWarn);2003
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(FSCoreVersion)
+
+
+ $(FSProductVersion)
+
+
+ $(VSAssemblyVersion)
+
+ $(IntermediateOutputPath)$(MSBuildProjectName).AssemblyVersion$(DefaultLanguageSourceExtension)
+
+
+
+ <_UseWriteCodeFragmentHack Condition="'$(OS)' == 'Unix' and '$(Language)' == 'F#'">true
+
+
+
+ <_AssemblyVersionAttributes Include="System.Reflection.AssemblyCompanyAttribute">
+ <_Parameter1>Microsoft Corporation
+
+ <_AssemblyVersionAttributes Include="System.Reflection.AssemblyCopyrightAttribute">
+ <_Parameter1>© Microsoft Corporation. All Rights Reserved.
+
+ <_AssemblyVersionAttributes Include="System.Reflection.AssemblyDescriptionAttribute">
+ <_Parameter1>$(AssemblyName)
+
+ <_AssemblyVersionAttributes Include="System.Reflection.AssemblyFileVersionAttribute">
+ <_Parameter1>$(Build_FileVersion)
+
+ <_AssemblyVersionAttributes Include="System.Reflection.AssemblyInformationalVersionAttribute">
+ <_Parameter1>$(MicroBuildAssemblyVersion). Commit Hash: $(GitHeadSha).
+
+ <_AssemblyVersionAttributes Include="System.Reflection.AssemblyProductAttribute">
+ <_Parameter1>Microsoft® F#
+
+ <_AssemblyVersionAttributes Include="System.Reflection.AssemblyTitleAttribute">
+ <_Parameter1>$(AssemblyName)
+
+ <_AssemblyVersionAttributes Include="System.Reflection.AssemblyVersionAttribute">
+ <_Parameter1>$(MicroBuildAssemblyVersion)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_LinesToWrite Include="// <auto-generated>" />
+ <_LinesToWrite Include="namespace FSharp" />
+ <_LinesToWrite Include="open System" />
+ <_LinesToWrite Include="open System.Reflection" />
+ <_LinesToWrite Include="[<assembly: %(_AssemblyVersionAttributes.Identity)("%(_AssemblyVersionAttributes._Parameter1)")>]" />
+ <_LinesToWrite Include="do()" />
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/targets/GenerateInternalsVisibleTo.targets b/build/targets/GenerateInternalsVisibleTo.targets
new file mode 100644
index 0000000000..4950837d36
--- /dev/null
+++ b/build/targets/GenerateInternalsVisibleTo.targets
@@ -0,0 +1,80 @@
+
+
+
+ $(IntermediateOutputPath)$(MSBuildProjectName).InternalsVisibleTo$(DefaultLanguageSourceExtension)
+
+
+
+
+ false
+
+
+
+
+
+ <_PublicKey>002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293
+
+
+ <_PublicKey>002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee
+
+
+ <_InternalsVisibleToAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
+ <_Parameter1 Condition="'%(InternalsVisibleTo.Key)' != ''">%(InternalsVisibleTo.Identity), PublicKey=%(InternalsVisibleTo.Key)
+ <_Parameter1 Condition="'%(InternalsVisibleTo.Key)' == ''">%(InternalsVisibleTo.Identity), PublicKey=$(_PublicKey)
+
+
+
+
+
+
+
+
+ <_UseWriteCodeFragmentHack Condition="'$(OS)' == 'Unix' and '$(Language)' == 'F#'">true
+
+
+
+
+
+
+
+
+
+
+
+
+ <_LinesToWrite Include="// <auto-generated>" />
+ <_LinesToWrite Include="namespace FSharp" />
+ <_LinesToWrite Include="open System" />
+ <_LinesToWrite Include="open System.Reflection" />
+ <_LinesToWrite Include="[<assembly: %(_InternalsVisibleToAttribute.Identity)("%(_InternalsVisibleToAttribute._Parameter1)")>]" />
+ <_LinesToWrite Include="do()" />
+
+
+
+
+
+
+
+
+
diff --git a/build/targets/GitHash.props b/build/targets/GitHash.props
new file mode 100644
index 0000000000..30f2d03b91
--- /dev/null
+++ b/build/targets/GitHash.props
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+ $(MSBuildThisFileDirectory)..\..\
+
+
+
+
+
+ $(BUILD_SOURCEVERSION)
+
+
+
+
+
+ $(GIT_COMMIT)
+
+
+
+
+
+ <developer build>
+
+
+
+
+
+
+ <_DotGitDir>$(RepoRoot).git
+ <_HeadFileContent Condition="Exists('$(_DotGitDir)/HEAD')">$([System.IO.File]::ReadAllText('$(_DotGitDir)/HEAD').Trim())
+ <_RefPath Condition="$(_HeadFileContent.StartsWith('ref: '))">$(_DotGitDir)/$(_HeadFileContent.Substring(5))
+ $([System.IO.File]::ReadAllText('$(_RefPath)').Trim())
+ $(_HeadFileContent)
+
+
+
+
+
diff --git a/build/targets/NGenOrCrossGen.targets b/build/targets/NGenOrCrossGen.targets
new file mode 100644
index 0000000000..33dcaa3a63
--- /dev/null
+++ b/build/targets/NGenOrCrossGen.targets
@@ -0,0 +1,36 @@
+
+
+
+
+ $(windir)\Microsoft.NET\Framework64\v4.0.30319\ngen.exe
+ $(windir)\Microsoft.NET\Framework\v4.0.30319\ngen.exe
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ false
+
+
+
+
diff --git a/build/targets/PackageVersions.props b/build/targets/PackageVersions.props
new file mode 100644
index 0000000000..42a2305f6f
--- /dev/null
+++ b/build/targets/PackageVersions.props
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+ $(RestoreSources);
+ https://www.myget.org/F/fsharp-daily/api/v3/index.json;
+ https://dotnet.myget.org/F/roslyn-master-nightly/api/v3/index.json;
+ https://dotnet.myget.org/F/dotnet-core/api/v3/index.json;
+ https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json;
+ https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json;
+ https://api.nuget.org/v3/index.json;
+ https://dotnet.myget.org/F/roslyn/api/v3/index.json;
+ https://dotnet.myget.org/F/symreader-converter/api/v3/index.json;
+
+
+
+ $(PB_RestoreSource);$(RestoreSources)
+ $(MSBuildThisFileDirectory)..\..\artifacts\dependencyUptake\PackageVersions.props
+
+
+ $([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)..\..\RoslynPackageVersion.txt').Trim())
+
+
+ 1.5.0
+ 4.3.0
+ 4.3.0
+ 4.3.0
+ 4.3.0
+ 4.3.0
+ 4.3.0
+ 4.5.0
+ 4.3.0
+ 4.3.0
+ 4.3.0
+ 1.6.0
+ 4.3.0
+ 1.5.0
+ 4.3.0
+ 4.3.0
+ 4.3.0
+ 4.3.0
+ 4.3.0
+ 4.3.0
+ 4.3.0
+ 4.3.0
+ 4.3.0
+ 4.3.0
+ 4.3.0
+ 4.4.0
+
+
+ $(RoslynPackageVersion)
+ $(RoslynPackageVersion)
+ $(RoslynPackageVersion)
+ $(RoslynPackageVersion)
+ $(RoslynPackageVersion)
+
+
+ 15.8.166
+ $(MicrosoftBuildOverallPackagesVersion)
+ $(MicrosoftBuildOverallPackagesVersion)
+ $(MicrosoftBuildOverallPackagesVersion)
+ $(MicrosoftBuildOverallPackagesVersion)
+
+
+ 8.0.1
+ 14.0.25420
+ 15.6.27740
+ 15.0.26201-alpha
+ 1.1.4322
+ 15.0.26201
+ 15.0.26201
+ 15.6.27740
+ 15.6.27740
+ 15.6.27740
+ 8.0.50727
+ 7.10.6071
+ 15.0.26201
+ 8.0.50727
+ 2.3.6152103
+ 14.3.25407
+ 15.0.26201
+ 15.0.26201
+ 15.0.26201
+ 10.0.30319
+ 11.0.50727
+ 15.0.25123-Dev15Preview
+ 7.10.6072
+ 8.0.50727
+ 9.0.30729
+ 10.0.30319
+ 11.0.61030
+ 12.0.30110
+ 15.6.27740
+ 7.10.6071
+ 8.0.50727
+ 10.0.30319
+ 12.0.30112
+ 15.6.27740
+ 15.6.27740
+ 15.3.23
+ 15.0.26201
+ 15.3.15
+ 9.0.30729
+ 15.6.170
+ 12.0.4
+ 7.0.4
+ 8.0.4
+ 11.0.4
+ 7.0.4
+
+
+ 0.2.0
+ 1.0.0
+ 1.0.147
+ 10.1.0
+ 1.0.0
+
+
+ 3.0.0-alpha3
+ 1.0.30
+ 1.1.0-beta1-63314-01
+ 8.0.0-alpha
+ 2.7.0
+ 2.0.3
+ 15.8.0
+ 1.0.0
+ 4.3.0
+ 9.0.1
+ 3.10.1
+ 3.10.0
+ 3.10.1
+ 1.0.0-beta2-dev3
+ 5.22.2.1
+ 0.2.0-beta-000081
+
+
+
+
+
+
+
diff --git a/eng/common/CIBuild.cmd b/eng/common/CIBuild.cmd
new file mode 100644
index 0000000000..56c2f25ac2
--- /dev/null
+++ b/eng/common/CIBuild.cmd
@@ -0,0 +1,2 @@
+@echo off
+powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0Build.ps1""" -restore -build -test -sign -pack -publish -ci %*"
\ No newline at end of file
diff --git a/eng/common/PublishBuildAssets.cmd b/eng/common/PublishBuildAssets.cmd
new file mode 100644
index 0000000000..3c6e4ff829
--- /dev/null
+++ b/eng/common/PublishBuildAssets.cmd
@@ -0,0 +1,3 @@
+@echo off
+powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0sdk-task.ps1""" -msbuildEngine dotnet -restore -projects PublishBuildAssets.proj -ci %*"
+exit /b %ErrorLevel%
diff --git a/eng/common/PublishToPackageFeed.proj b/eng/common/PublishToPackageFeed.proj
new file mode 100644
index 0000000000..7dc478d981
--- /dev/null
+++ b/eng/common/PublishToPackageFeed.proj
@@ -0,0 +1,37 @@
+
+
+
+ netcoreapp2.1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/eng/common/README.md b/eng/common/README.md
new file mode 100644
index 0000000000..ff49c37152
--- /dev/null
+++ b/eng/common/README.md
@@ -0,0 +1,28 @@
+# Don't touch this folder
+
+ uuuuuuuuuuuuuuuuuuuu
+ u" uuuuuuuuuuuuuuuuuu "u
+ u" u$$$$$$$$$$$$$$$$$$$$u "u
+ u" u$$$$$$$$$$$$$$$$$$$$$$$$u "u
+ u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u
+ u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u
+ u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u
+ $ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $
+ $ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $
+ $ $$$" ... "$... ...$" ... "$$$ ... "$$$ $
+ $ $$$u `"$$$$$$$ $$$ $$$$$ $$ $$$ $$$ $
+ $ $$$$$$uu "$$$$ $$$ $$$$$ $$ """ u$$$ $
+ $ $$$""$$$ $$$$ $$$u "$$$" u$$ $$$$$$$$ $
+ $ $$$$....,$$$$$..$$$$$....,$$$$..$$$$$$$$ $
+ $ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $
+ "u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u"
+ "u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u"
+ "u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u"
+ "u "$$$$$$$$$$$$$$$$$$$$$$$$" u"
+ "u "$$$$$$$$$$$$$$$$$$$$" u"
+ "u """""""""""""""""" u"
+ """"""""""""""""""""
+
+!!! Changes made in this directory are subject to being overwritten by automation !!!
+
+The files in this directory are shared by all Arcade repos and managed by automation. If you need to make changes to these files, open an issue or submit a pull request to https://github.com/dotnet/arcade first.
diff --git a/eng/common/build.ps1 b/eng/common/build.ps1
new file mode 100644
index 0000000000..8279dc7133
--- /dev/null
+++ b/eng/common/build.ps1
@@ -0,0 +1,133 @@
+[CmdletBinding(PositionalBinding=$false)]
+Param(
+ [string][Alias('c')]$configuration = "Debug",
+ [string] $projects,
+ [string][Alias('v')]$verbosity = "minimal",
+ [string] $msbuildEngine = $null,
+ [bool] $warnAsError = $true,
+ [bool] $nodeReuse = $true,
+ [switch][Alias('r')]$restore,
+ [switch] $deployDeps,
+ [switch][Alias('b')]$build,
+ [switch] $rebuild,
+ [switch] $deploy,
+ [switch] $test,
+ [switch] $integrationTest,
+ [switch] $performanceTest,
+ [switch] $sign,
+ [switch] $pack,
+ [switch] $publish,
+ [switch][Alias('bl')]$binaryLog,
+ [switch] $ci,
+ [switch] $prepareMachine,
+ [switch] $help,
+ [Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
+)
+
+. $PSScriptRoot\tools.ps1
+
+function Print-Usage() {
+ Write-Host "Common settings:"
+ Write-Host " -configuration Build configuration: 'Debug' or 'Release' (short: -c)"
+ Write-Host " -verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
+ Write-Host " -binaryLog Output binary log (short: -bl)"
+ Write-Host " -help Print help and exit"
+ Write-Host ""
+
+ Write-Host "Actions:"
+ Write-Host " -restore Restore dependencies (short: -r)"
+ Write-Host " -build Build solution (short: -b)"
+ Write-Host " -rebuild Rebuild solution"
+ Write-Host " -deploy Deploy built VSIXes"
+ Write-Host " -deployDeps Deploy dependencies (e.g. VSIXes for integration tests)"
+ Write-Host " -test Run all unit tests in the solution"
+ Write-Host " -pack Package build outputs into NuGet packages and Willow components"
+ Write-Host " -integrationTest Run all integration tests in the solution"
+ Write-Host " -performanceTest Run all performance tests in the solution"
+ Write-Host " -sign Sign build outputs"
+ Write-Host " -publish Publish artifacts (e.g. symbols)"
+ Write-Host ""
+
+ Write-Host "Advanced settings:"
+ Write-Host " -projects Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)"
+ Write-Host " -ci Set when running on CI server"
+ Write-Host " -prepareMachine Prepare machine for CI run"
+ Write-Host " -msbuildEngine Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
+ Write-Host ""
+ Write-Host "Command line arguments not listed above are passed thru to msbuild."
+ Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)."
+}
+
+function InitializeCustomToolset {
+ if (-not $restore) {
+ return
+ }
+
+ $script = Join-Path $EngRoot "restore-toolset.ps1"
+
+ if (Test-Path $script) {
+ . $script
+ }
+}
+
+function Build {
+ $toolsetBuildProj = InitializeToolset
+ InitializeCustomToolset
+
+ $bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "Build.binlog") } else { "" }
+
+ if ($projects) {
+ # Re-assign properties to a new variable because PowerShell doesn't let us append properties directly for unclear reasons.
+ # Explicitly set the type as string[] because otherwise PowerShell would make this char[] if $properties is empty.
+ [string[]] $msbuildArgs = $properties
+ $msbuildArgs += "/p:Projects=$projects"
+ $properties = $msbuildArgs
+ }
+
+ MSBuild $toolsetBuildProj `
+ $bl `
+ /p:Configuration=$configuration `
+ /p:RepoRoot=$RepoRoot `
+ /p:Restore=$restore `
+ /p:DeployDeps=$deployDeps `
+ /p:Build=$build `
+ /p:Rebuild=$rebuild `
+ /p:Deploy=$deploy `
+ /p:Test=$test `
+ /p:Pack=$pack `
+ /p:IntegrationTest=$integrationTest `
+ /p:PerformanceTest=$performanceTest `
+ /p:Sign=$sign `
+ /p:Publish=$publish `
+ /p:ContinuousIntegrationBuild=$ci `
+ @properties
+}
+
+try {
+ if ($help -or (($properties -ne $null) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
+ Print-Usage
+ exit 0
+ }
+
+ if ($ci) {
+ $binaryLog = $true
+ $nodeReuse = $false
+ }
+
+ # Import custom tools configuration, if present in the repo.
+ # Note: Import in global scope so that the script set top-level variables without qualification.
+ $configureToolsetScript = Join-Path $EngRoot "configure-toolset.ps1"
+ if (Test-Path $configureToolsetScript) {
+ . $configureToolsetScript
+ }
+
+ Build
+}
+catch {
+ Write-Host $_
+ Write-Host $_.Exception
+ Write-Host $_.ScriptStackTrace
+ ExitWithExitCode 1
+}
+
+ExitWithExitCode 0
diff --git a/eng/common/build.sh b/eng/common/build.sh
new file mode 100755
index 0000000000..4fe8b41ed7
--- /dev/null
+++ b/eng/common/build.sh
@@ -0,0 +1,213 @@
+#!/usr/bin/env bash
+
+# Stop script if unbound variable found (use ${var:-} if intentional)
+set -u
+
+# Stop script if command returns non-zero exit code.
+# Prevents hidden errors caused by missing error code propagation.
+set -e
+
+usage()
+{
+ echo "Common settings:"
+ echo " --configuration Build configuration: 'Debug' or 'Release' (short: --c)"
+ echo " --verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
+ echo " --binaryLog Create MSBuild binary log (short: -bl)"
+ echo ""
+ echo "Actions:"
+ echo " --restore Restore dependencies (short: -r)"
+ echo " --build Build all projects (short: -b)"
+ echo " --rebuild Rebuild all projects"
+ echo " --test Run all unit tests (short: -t)"
+ echo " --sign Sign build outputs"
+ echo " --publish Publish artifacts (e.g. symbols)"
+ echo " --pack Package build outputs into NuGet packages and Willow components"
+ echo " --help Print help and exit (short: -h)"
+ echo ""
+ echo "Advanced settings:"
+ echo " --projects Project or solution file(s) to build"
+ echo " --ci Set when running on CI server"
+ echo " --prepareMachine Prepare machine for CI run, clean up processes after build"
+ echo " --nodeReuse Sets nodereuse msbuild parameter ('true' or 'false')"
+ echo " --warnAsError Sets warnaserror msbuild parameter ('true' or 'false')"
+ echo ""
+ echo "Command line arguments starting with '/p:' are passed through to MSBuild."
+}
+
+source="${BASH_SOURCE[0]}"
+
+# resolve $source until the file is no longer a symlink
+while [[ -h "$source" ]]; do
+ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+ source="$(readlink "$source")"
+ # if $source was a relative symlink, we need to resolve it relative to the path where the
+ # symlink file was located
+ [[ $source != /* ]] && source="$scriptroot/$source"
+done
+scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+
+restore=false
+build=false
+rebuild=false
+test=false
+pack=false
+publish=false
+integration_test=false
+performance_test=false
+sign=false
+public=false
+ci=false
+
+warn_as_error=true
+node_reuse=true
+binary_log=false
+
+projects=''
+configuration='Debug'
+prepare_machine=false
+verbosity='minimal'
+properties=''
+
+while [[ $# > 0 ]]; do
+ opt="$(echo "$1" | awk '{print tolower($0)}')"
+ case "$opt" in
+ --help|-h)
+ usage
+ exit 0
+ ;;
+ --configuration|-c)
+ configuration=$2
+ shift
+ ;;
+ --verbosity|-v)
+ verbosity=$2
+ shift
+ ;;
+ --binarylog|-bl)
+ binary_log=true
+ ;;
+ --restore|-r)
+ restore=true
+ ;;
+ --build|-b)
+ build=true
+ ;;
+ --rebuild)
+ rebuild=true
+ ;;
+ --pack)
+ pack=true
+ ;;
+ --test|-t)
+ test=true
+ ;;
+ --integrationtest)
+ integration_test=true
+ ;;
+ --performancetest)
+ performance_test=true
+ ;;
+ --sign)
+ sign=true
+ ;;
+ --publish)
+ publish=true
+ ;;
+ --preparemachine)
+ prepare_machine=true
+ ;;
+ --projects)
+ projects=$2
+ shift
+ ;;
+ --ci)
+ ci=true
+ ;;
+ --warnaserror)
+ warn_as_error=$2
+ shift
+ ;;
+ --nodereuse)
+ node_reuse=$2
+ shift
+ ;;
+ /p:*)
+ properties="$properties $1"
+ ;;
+ /m:*)
+ properties="$properties $1"
+ ;;
+ /bl:*)
+ properties="$properties $1"
+ ;;
+ *)
+ echo "Invalid argument: $1"
+ usage
+ exit 1
+ ;;
+ esac
+
+ shift
+done
+
+if [[ "$ci" == true ]]; then
+ binary_log=true
+ node_reuse=false
+fi
+
+. "$scriptroot/tools.sh"
+
+function InitializeCustomToolset {
+ local script="$eng_root/restore-toolset.sh"
+
+ if [[ -a "$script" ]]; then
+ . "$script"
+ fi
+}
+
+function Build {
+ InitializeToolset
+ InitializeCustomToolset
+
+ if [[ ! -z "$projects" ]]; then
+ properties="$properties /p:Projects=$projects"
+ fi
+
+ local bl=""
+ if [[ "$binary_log" == true ]]; then
+ bl="/bl:\"$log_dir/Build.binlog\""
+ fi
+
+ MSBuild $_InitializeToolset \
+ $bl \
+ /p:Configuration=$configuration \
+ /p:RepoRoot="$repo_root" \
+ /p:Restore=$restore \
+ /p:Build=$build \
+ /p:Rebuild=$rebuild \
+ /p:Test=$test \
+ /p:Pack=$pack \
+ /p:IntegrationTest=$integration_test \
+ /p:PerformanceTest=$performance_test \
+ /p:Sign=$sign \
+ /p:Publish=$publish \
+ /p:ContinuousIntegrationBuild=$ci \
+ $properties
+
+ ExitWithExitCode 0
+}
+
+# Import custom tools configuration, if present in the repo.
+configure_toolset_script="$eng_root/configure-toolset.sh"
+if [[ -a "$configure_toolset_script" ]]; then
+ . "$configure_toolset_script"
+fi
+
+# TODO: https://github.com/dotnet/arcade/issues/1468
+# Temporary workaround to avoid breaking change.
+# Remove once repos are updated.
+if [[ -n "${useInstalledDotNetCli:-}" ]]; then
+ use_installed_dotnet_cli="$useInstalledDotNetCli"
+fi
+
+Build
diff --git a/eng/common/cibuild.sh b/eng/common/cibuild.sh
new file mode 100755
index 0000000000..1a02c0dec8
--- /dev/null
+++ b/eng/common/cibuild.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+source="${BASH_SOURCE[0]}"
+
+# resolve $SOURCE until the file is no longer a symlink
+while [[ -h $source ]]; do
+ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+ source="$(readlink "$source")"
+
+ # if $source was a relative symlink, we need to resolve it relative to the path where
+ # the symlink file was located
+ [[ $source != /* ]] && source="$scriptroot/$source"
+done
+scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+
+. "$scriptroot/build.sh" --restore --build --test --pack --publish --ci $@
\ No newline at end of file
diff --git a/eng/common/cross/android/arm/toolchain.cmake b/eng/common/cross/android/arm/toolchain.cmake
new file mode 100644
index 0000000000..a7e1c73501
--- /dev/null
+++ b/eng/common/cross/android/arm/toolchain.cmake
@@ -0,0 +1,41 @@
+set(CROSS_NDK_TOOLCHAIN $ENV{ROOTFS_DIR}/../)
+set(CROSS_ROOTFS ${CROSS_NDK_TOOLCHAIN}/sysroot)
+set(CLR_CMAKE_PLATFORM_ANDROID "Android")
+
+set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_SYSTEM_VERSION 1)
+set(CMAKE_SYSTEM_PROCESSOR arm)
+
+## Specify the toolchain
+set(TOOLCHAIN "arm-linux-androideabi")
+set(CMAKE_PREFIX_PATH ${CROSS_NDK_TOOLCHAIN})
+set(TOOLCHAIN_PREFIX ${TOOLCHAIN}-)
+
+find_program(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}clang)
+find_program(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}clang++)
+find_program(CMAKE_ASM_COMPILER ${TOOLCHAIN_PREFIX}clang)
+find_program(CMAKE_AR ${TOOLCHAIN_PREFIX}ar)
+find_program(CMAKE_LD ${TOOLCHAIN_PREFIX}ar)
+find_program(CMAKE_OBJCOPY ${TOOLCHAIN_PREFIX}objcopy)
+find_program(CMAKE_OBJDUMP ${TOOLCHAIN_PREFIX}objdump)
+
+add_compile_options(--sysroot=${CROSS_ROOTFS})
+add_compile_options(-fPIE)
+add_compile_options(-mfloat-abi=soft)
+include_directories(SYSTEM ${CROSS_NDK_TOOLCHAIN}/include/c++/4.9.x/)
+include_directories(SYSTEM ${CROSS_NDK_TOOLCHAIN}/include/c++/4.9.x/arm-linux-androideabi/)
+
+set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -B ${CROSS_ROOTFS}/usr/lib/gcc/${TOOLCHAIN}")
+set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -L${CROSS_ROOTFS}/lib/${TOOLCHAIN}")
+set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} --sysroot=${CROSS_ROOTFS}")
+set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -fPIE -pie")
+
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE)
+set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE)
+set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE)
+
+set(CMAKE_FIND_ROOT_PATH "${CROSS_ROOTFS}")
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
diff --git a/eng/common/cross/android/arm64/toolchain.cmake b/eng/common/cross/android/arm64/toolchain.cmake
new file mode 100644
index 0000000000..29415899c1
--- /dev/null
+++ b/eng/common/cross/android/arm64/toolchain.cmake
@@ -0,0 +1,42 @@
+set(CROSS_NDK_TOOLCHAIN $ENV{ROOTFS_DIR}/../)
+set(CROSS_ROOTFS ${CROSS_NDK_TOOLCHAIN}/sysroot)
+set(CLR_CMAKE_PLATFORM_ANDROID "Android")
+
+set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_SYSTEM_VERSION 1)
+set(CMAKE_SYSTEM_PROCESSOR aarch64)
+
+## Specify the toolchain
+set(TOOLCHAIN "aarch64-linux-android")
+set(CMAKE_PREFIX_PATH ${CROSS_NDK_TOOLCHAIN})
+set(TOOLCHAIN_PREFIX ${TOOLCHAIN}-)
+
+find_program(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}clang)
+find_program(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}clang++)
+find_program(CMAKE_ASM_COMPILER ${TOOLCHAIN_PREFIX}clang)
+find_program(CMAKE_AR ${TOOLCHAIN_PREFIX}ar)
+find_program(CMAKE_LD ${TOOLCHAIN_PREFIX}ar)
+find_program(CMAKE_OBJCOPY ${TOOLCHAIN_PREFIX}objcopy)
+find_program(CMAKE_OBJDUMP ${TOOLCHAIN_PREFIX}objdump)
+
+add_compile_options(--sysroot=${CROSS_ROOTFS})
+add_compile_options(-fPIE)
+
+## Needed for Android or bionic specific conditionals
+add_compile_options(-D__ANDROID__)
+add_compile_options(-D__BIONIC__)
+
+set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -B ${CROSS_ROOTFS}/usr/lib/gcc/${TOOLCHAIN}")
+set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -L${CROSS_ROOTFS}/lib/${TOOLCHAIN}")
+set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} --sysroot=${CROSS_ROOTFS}")
+set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -fPIE -pie")
+
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE)
+set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE)
+set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE)
+
+set(CMAKE_FIND_ROOT_PATH "${CROSS_ROOTFS}")
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
diff --git a/eng/common/cross/arm/sources.list.bionic b/eng/common/cross/arm/sources.list.bionic
new file mode 100644
index 0000000000..2109557409
--- /dev/null
+++ b/eng/common/cross/arm/sources.list.bionic
@@ -0,0 +1,11 @@
+deb http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted
+deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted
+
+deb http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse
+deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse
diff --git a/eng/common/cross/arm/sources.list.jessie b/eng/common/cross/arm/sources.list.jessie
new file mode 100644
index 0000000000..4d142ac9b1
--- /dev/null
+++ b/eng/common/cross/arm/sources.list.jessie
@@ -0,0 +1,3 @@
+# Debian (sid) # UNSTABLE
+deb http://ftp.debian.org/debian/ sid main contrib non-free
+deb-src http://ftp.debian.org/debian/ sid main contrib non-free
diff --git a/eng/common/cross/arm/sources.list.trusty b/eng/common/cross/arm/sources.list.trusty
new file mode 100644
index 0000000000..07d8f88d82
--- /dev/null
+++ b/eng/common/cross/arm/sources.list.trusty
@@ -0,0 +1,11 @@
+deb http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ trusty-backports main restricted
+deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-backports main restricted
+
+deb http://ports.ubuntu.com/ubuntu-ports/ trusty-security main restricted universe multiverse
+deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-security main restricted universe multiverse
\ No newline at end of file
diff --git a/eng/common/cross/arm/sources.list.vivid b/eng/common/cross/arm/sources.list.vivid
new file mode 100644
index 0000000000..0b1215e475
--- /dev/null
+++ b/eng/common/cross/arm/sources.list.vivid
@@ -0,0 +1,11 @@
+deb http://ports.ubuntu.com/ubuntu-ports/ vivid main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ vivid-updates main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid-updates main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ vivid-backports main restricted
+deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid-backports main restricted
+
+deb http://ports.ubuntu.com/ubuntu-ports/ vivid-security main restricted universe multiverse
+deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid-security main restricted universe multiverse
\ No newline at end of file
diff --git a/eng/common/cross/arm/sources.list.wily b/eng/common/cross/arm/sources.list.wily
new file mode 100644
index 0000000000..e23d1e02a0
--- /dev/null
+++ b/eng/common/cross/arm/sources.list.wily
@@ -0,0 +1,11 @@
+deb http://ports.ubuntu.com/ubuntu-ports/ wily main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ wily main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ wily-updates main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ wily-updates main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ wily-backports main restricted
+deb-src http://ports.ubuntu.com/ubuntu-ports/ wily-backports main restricted
+
+deb http://ports.ubuntu.com/ubuntu-ports/ wily-security main restricted universe multiverse
+deb-src http://ports.ubuntu.com/ubuntu-ports/ wily-security main restricted universe multiverse
\ No newline at end of file
diff --git a/eng/common/cross/arm/sources.list.xenial b/eng/common/cross/arm/sources.list.xenial
new file mode 100644
index 0000000000..eacd86b7df
--- /dev/null
+++ b/eng/common/cross/arm/sources.list.xenial
@@ -0,0 +1,11 @@
+deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
+deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
+
+deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
+deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
\ No newline at end of file
diff --git a/eng/common/cross/arm/sources.list.zesty b/eng/common/cross/arm/sources.list.zesty
new file mode 100644
index 0000000000..ea2c14a787
--- /dev/null
+++ b/eng/common/cross/arm/sources.list.zesty
@@ -0,0 +1,11 @@
+deb http://ports.ubuntu.com/ubuntu-ports/ zesty main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ zesty-updates main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-updates main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ zesty-backports main restricted
+deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-backports main restricted
+
+deb http://ports.ubuntu.com/ubuntu-ports/ zesty-security main restricted universe multiverse
+deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-security main restricted universe multiverse
diff --git a/eng/common/cross/arm/trusty-lttng-2.4.patch b/eng/common/cross/arm/trusty-lttng-2.4.patch
new file mode 100644
index 0000000000..8e4dd7ae71
--- /dev/null
+++ b/eng/common/cross/arm/trusty-lttng-2.4.patch
@@ -0,0 +1,71 @@
+From e72c9d7ead60e3317bd6d1fade995c07021c947b Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers
+Date: Thu, 7 May 2015 13:25:04 -0400
+Subject: [PATCH] Fix: building probe providers with C++ compiler
+
+Robert Daniels wrote:
+> > I'm attempting to use lttng userspace tracing with a C++ application
+> > on an ARM platform. I'm using GCC 4.8.4 on Linux 3.14 with the 2.6
+> > release of lttng. I've compiled lttng-modules, lttng-ust, and
+> > lttng-tools and have been able to get a simple test working with C
+> > code. When I attempt to run the hello.cxx test on my target it will
+> > segfault.
+>
+>
+> I spent a little time digging into this issue and finally discovered the
+> cause of my segfault with ARM C++ tracepoints.
+>
+> There is a struct called 'lttng_event' in ust-events.h which contains an
+> empty union 'u'. This was the cause of my issue. Under C, this empty union
+> compiles to a zero byte member while under C++ it compiles to a one byte
+> member, and in my case was four-byte aligned which caused my C++ code to
+> have the 'cds_list_head node' offset incorrectly by four bytes. This lead
+> to an incorrect linked list structure which caused my issue.
+>
+> Since this union is empty, I simply removed it from the struct and everything
+> worked correctly.
+>
+> I don't know the history or purpose behind this empty union so I'd like to
+> know if this is a safe fix. If it is I can submit a patch with the union
+> removed.
+
+That's a very nice catch!
+
+We do not support building tracepoint probe provider with
+g++ yet, as stated in lttng-ust(3):
+
+"- Note for C++ support: although an application instrumented with
+ tracepoints can be compiled with g++, tracepoint probes should be
+ compiled with gcc (only tested with gcc so far)."
+
+However, if it works fine with this fix, then I'm tempted to take it,
+especially because removing the empty union does not appear to affect
+the layout of struct lttng_event as seen from liblttng-ust, which must
+be compiled with a C compiler, and from probe providers compiled with
+a C compiler. So all we are changing is the layout of a probe provider
+compiled with a C++ compiler, which is anyway buggy at the moment,
+because it is not compatible with the layout expected by liblttng-ust
+compiled with a C compiler.
+
+Reported-by: Robert Daniels
+Signed-off-by: Mathieu Desnoyers
+---
+ include/lttng/ust-events.h | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/usr/include/lttng/ust-events.h b/usr/include/lttng/ust-events.h
+index 328a875..3d7a274 100644
+--- a/usr/include/lttng/ust-events.h
++++ b/usr/include/lttng/ust-events.h
+@@ -407,8 +407,6 @@ struct lttng_event {
+ void *_deprecated1;
+ struct lttng_ctx *ctx;
+ enum lttng_ust_instrumentation instrumentation;
+- union {
+- } u;
+ struct cds_list_head node; /* Event list in session */
+ struct cds_list_head _deprecated2;
+ void *_deprecated3;
+--
+2.7.4
+
diff --git a/eng/common/cross/arm/trusty.patch b/eng/common/cross/arm/trusty.patch
new file mode 100644
index 0000000000..2f2972f8eb
--- /dev/null
+++ b/eng/common/cross/arm/trusty.patch
@@ -0,0 +1,97 @@
+diff -u -r a/usr/include/urcu/uatomic/generic.h b/usr/include/urcu/uatomic/generic.h
+--- a/usr/include/urcu/uatomic/generic.h 2014-03-28 06:04:42.000000000 +0900
++++ b/usr/include/urcu/uatomic/generic.h 2017-02-13 10:35:21.189927116 +0900
+@@ -65,17 +65,17 @@
+ switch (len) {
+ #ifdef UATOMIC_HAS_ATOMIC_BYTE
+ case 1:
+- return __sync_val_compare_and_swap_1(addr, old, _new);
++ return __sync_val_compare_and_swap_1((uint8_t *) addr, old, _new);
+ #endif
+ #ifdef UATOMIC_HAS_ATOMIC_SHORT
+ case 2:
+- return __sync_val_compare_and_swap_2(addr, old, _new);
++ return __sync_val_compare_and_swap_2((uint16_t *) addr, old, _new);
+ #endif
+ case 4:
+- return __sync_val_compare_and_swap_4(addr, old, _new);
++ return __sync_val_compare_and_swap_4((uint32_t *) addr, old, _new);
+ #if (CAA_BITS_PER_LONG == 64)
+ case 8:
+- return __sync_val_compare_and_swap_8(addr, old, _new);
++ return __sync_val_compare_and_swap_8((uint64_t *) addr, old, _new);
+ #endif
+ }
+ _uatomic_link_error();
+@@ -100,20 +100,20 @@
+ switch (len) {
+ #ifdef UATOMIC_HAS_ATOMIC_BYTE
+ case 1:
+- __sync_and_and_fetch_1(addr, val);
++ __sync_and_and_fetch_1((uint8_t *) addr, val);
+ return;
+ #endif
+ #ifdef UATOMIC_HAS_ATOMIC_SHORT
+ case 2:
+- __sync_and_and_fetch_2(addr, val);
++ __sync_and_and_fetch_2((uint16_t *) addr, val);
+ return;
+ #endif
+ case 4:
+- __sync_and_and_fetch_4(addr, val);
++ __sync_and_and_fetch_4((uint32_t *) addr, val);
+ return;
+ #if (CAA_BITS_PER_LONG == 64)
+ case 8:
+- __sync_and_and_fetch_8(addr, val);
++ __sync_and_and_fetch_8((uint64_t *) addr, val);
+ return;
+ #endif
+ }
+@@ -139,20 +139,20 @@
+ switch (len) {
+ #ifdef UATOMIC_HAS_ATOMIC_BYTE
+ case 1:
+- __sync_or_and_fetch_1(addr, val);
++ __sync_or_and_fetch_1((uint8_t *) addr, val);
+ return;
+ #endif
+ #ifdef UATOMIC_HAS_ATOMIC_SHORT
+ case 2:
+- __sync_or_and_fetch_2(addr, val);
++ __sync_or_and_fetch_2((uint16_t *) addr, val);
+ return;
+ #endif
+ case 4:
+- __sync_or_and_fetch_4(addr, val);
++ __sync_or_and_fetch_4((uint32_t *) addr, val);
+ return;
+ #if (CAA_BITS_PER_LONG == 64)
+ case 8:
+- __sync_or_and_fetch_8(addr, val);
++ __sync_or_and_fetch_8((uint64_t *) addr, val);
+ return;
+ #endif
+ }
+@@ -180,17 +180,17 @@
+ switch (len) {
+ #ifdef UATOMIC_HAS_ATOMIC_BYTE
+ case 1:
+- return __sync_add_and_fetch_1(addr, val);
++ return __sync_add_and_fetch_1((uint8_t *) addr, val);
+ #endif
+ #ifdef UATOMIC_HAS_ATOMIC_SHORT
+ case 2:
+- return __sync_add_and_fetch_2(addr, val);
++ return __sync_add_and_fetch_2((uint16_t *) addr, val);
+ #endif
+ case 4:
+- return __sync_add_and_fetch_4(addr, val);
++ return __sync_add_and_fetch_4((uint32_t *) addr, val);
+ #if (CAA_BITS_PER_LONG == 64)
+ case 8:
+- return __sync_add_and_fetch_8(addr, val);
++ return __sync_add_and_fetch_8((uint64_t *) addr, val);
+ #endif
+ }
+ _uatomic_link_error();
diff --git a/eng/common/cross/arm64/sources.list.bionic b/eng/common/cross/arm64/sources.list.bionic
new file mode 100644
index 0000000000..2109557409
--- /dev/null
+++ b/eng/common/cross/arm64/sources.list.bionic
@@ -0,0 +1,11 @@
+deb http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted
+deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted
+
+deb http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse
+deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse
diff --git a/eng/common/cross/arm64/sources.list.trusty b/eng/common/cross/arm64/sources.list.trusty
new file mode 100644
index 0000000000..07d8f88d82
--- /dev/null
+++ b/eng/common/cross/arm64/sources.list.trusty
@@ -0,0 +1,11 @@
+deb http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ trusty-backports main restricted
+deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-backports main restricted
+
+deb http://ports.ubuntu.com/ubuntu-ports/ trusty-security main restricted universe multiverse
+deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-security main restricted universe multiverse
\ No newline at end of file
diff --git a/eng/common/cross/arm64/sources.list.vivid b/eng/common/cross/arm64/sources.list.vivid
new file mode 100644
index 0000000000..0b1215e475
--- /dev/null
+++ b/eng/common/cross/arm64/sources.list.vivid
@@ -0,0 +1,11 @@
+deb http://ports.ubuntu.com/ubuntu-ports/ vivid main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ vivid-updates main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid-updates main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ vivid-backports main restricted
+deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid-backports main restricted
+
+deb http://ports.ubuntu.com/ubuntu-ports/ vivid-security main restricted universe multiverse
+deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid-security main restricted universe multiverse
\ No newline at end of file
diff --git a/eng/common/cross/arm64/sources.list.wily b/eng/common/cross/arm64/sources.list.wily
new file mode 100644
index 0000000000..e23d1e02a0
--- /dev/null
+++ b/eng/common/cross/arm64/sources.list.wily
@@ -0,0 +1,11 @@
+deb http://ports.ubuntu.com/ubuntu-ports/ wily main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ wily main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ wily-updates main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ wily-updates main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ wily-backports main restricted
+deb-src http://ports.ubuntu.com/ubuntu-ports/ wily-backports main restricted
+
+deb http://ports.ubuntu.com/ubuntu-ports/ wily-security main restricted universe multiverse
+deb-src http://ports.ubuntu.com/ubuntu-ports/ wily-security main restricted universe multiverse
\ No newline at end of file
diff --git a/eng/common/cross/arm64/sources.list.xenial b/eng/common/cross/arm64/sources.list.xenial
new file mode 100644
index 0000000000..eacd86b7df
--- /dev/null
+++ b/eng/common/cross/arm64/sources.list.xenial
@@ -0,0 +1,11 @@
+deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
+deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
+
+deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
+deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
\ No newline at end of file
diff --git a/eng/common/cross/arm64/sources.list.zesty b/eng/common/cross/arm64/sources.list.zesty
new file mode 100644
index 0000000000..ea2c14a787
--- /dev/null
+++ b/eng/common/cross/arm64/sources.list.zesty
@@ -0,0 +1,11 @@
+deb http://ports.ubuntu.com/ubuntu-ports/ zesty main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ zesty-updates main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-updates main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ zesty-backports main restricted
+deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-backports main restricted
+
+deb http://ports.ubuntu.com/ubuntu-ports/ zesty-security main restricted universe multiverse
+deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-security main restricted universe multiverse
diff --git a/eng/common/cross/armel/sources.list.jessie b/eng/common/cross/armel/sources.list.jessie
new file mode 100644
index 0000000000..3d9c3059d8
--- /dev/null
+++ b/eng/common/cross/armel/sources.list.jessie
@@ -0,0 +1,3 @@
+# Debian (jessie) # Stable
+deb http://ftp.debian.org/debian/ jessie main contrib non-free
+deb-src http://ftp.debian.org/debian/ jessie main contrib non-free
diff --git a/eng/common/cross/armel/tizen-build-rootfs.sh b/eng/common/cross/armel/tizen-build-rootfs.sh
new file mode 100755
index 0000000000..87c48e78fb
--- /dev/null
+++ b/eng/common/cross/armel/tizen-build-rootfs.sh
@@ -0,0 +1,44 @@
+#!/usr/bin/env bash
+set -e
+
+__ARM_SOFTFP_CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+__TIZEN_CROSSDIR="$__ARM_SOFTFP_CrossDir/tizen"
+
+if [[ -z "$ROOTFS_DIR" ]]; then
+ echo "ROOTFS_DIR is not defined."
+ exit 1;
+fi
+
+# Clean-up (TODO-Cleanup: We may already delete $ROOTFS_DIR at ./cross/build-rootfs.sh.)
+# hk0110
+if [ -d "$ROOTFS_DIR" ]; then
+ umount $ROOTFS_DIR/*
+ rm -rf $ROOTFS_DIR
+fi
+
+TIZEN_TMP_DIR=$ROOTFS_DIR/tizen_tmp
+mkdir -p $TIZEN_TMP_DIR
+
+# Download files
+echo ">>Start downloading files"
+VERBOSE=1 $__ARM_SOFTFP_CrossDir/tizen-fetch.sh $TIZEN_TMP_DIR
+echo "<>Start constructing Tizen rootfs"
+TIZEN_RPM_FILES=`ls $TIZEN_TMP_DIR/*.rpm`
+cd $ROOTFS_DIR
+for f in $TIZEN_RPM_FILES; do
+ rpm2cpio $f | cpio -idm --quiet
+done
+echo "<>Start configuring Tizen rootfs"
+rm ./usr/lib/libunwind.so
+ln -s libunwind.so.8 ./usr/lib/libunwind.so
+ln -sfn asm-arm ./usr/include/asm
+patch -p1 < $__TIZEN_CROSSDIR/tizen.patch
+echo "</dev/null; then
+ VERBOSE=0
+fi
+
+Log()
+{
+ if [ $VERBOSE -ge $1 ]; then
+ echo ${@:2}
+ fi
+}
+
+Inform()
+{
+ Log 1 -e "\x1B[0;34m$@\x1B[m"
+}
+
+Debug()
+{
+ Log 2 -e "\x1B[0;32m$@\x1B[m"
+}
+
+Error()
+{
+ >&2 Log 0 -e "\x1B[0;31m$@\x1B[m"
+}
+
+Fetch()
+{
+ URL=$1
+ FILE=$2
+ PROGRESS=$3
+ if [ $VERBOSE -ge 1 ] && [ $PROGRESS ]; then
+ CURL_OPT="--progress-bar"
+ else
+ CURL_OPT="--silent"
+ fi
+ curl $CURL_OPT $URL > $FILE
+}
+
+hash curl 2> /dev/null || { Error "Require 'curl' Aborting."; exit 1; }
+hash xmllint 2> /dev/null || { Error "Require 'xmllint' Aborting."; exit 1; }
+hash sha256sum 2> /dev/null || { Error "Require 'sha256sum' Aborting."; exit 1; }
+
+TMPDIR=$1
+if [ ! -d $TMPDIR ]; then
+ TMPDIR=./tizen_tmp
+ Debug "Create temporary directory : $TMPDIR"
+ mkdir -p $TMPDIR
+fi
+
+TIZEN_URL=http://download.tizen.org/releases/milestone/tizen
+BUILD_XML=build.xml
+REPOMD_XML=repomd.xml
+PRIMARY_XML=primary.xml
+TARGET_URL="http://__not_initialized"
+
+Xpath_get()
+{
+ XPATH_RESULT=''
+ XPATH=$1
+ XML_FILE=$2
+ RESULT=$(xmllint --xpath $XPATH $XML_FILE)
+ if [[ -z ${RESULT// } ]]; then
+ Error "Can not find target from $XML_FILE"
+ Debug "Xpath = $XPATH"
+ exit 1
+ fi
+ XPATH_RESULT=$RESULT
+}
+
+fetch_tizen_pkgs_init()
+{
+ TARGET=$1
+ PROFILE=$2
+ Debug "Initialize TARGET=$TARGET, PROFILE=$PROFILE"
+
+ TMP_PKG_DIR=$TMPDIR/tizen_${PROFILE}_pkgs
+ if [ -d $TMP_PKG_DIR ]; then rm -rf $TMP_PKG_DIR; fi
+ mkdir -p $TMP_PKG_DIR
+
+ PKG_URL=$TIZEN_URL/$PROFILE/latest
+
+ BUILD_XML_URL=$PKG_URL/$BUILD_XML
+ TMP_BUILD=$TMP_PKG_DIR/$BUILD_XML
+ TMP_REPOMD=$TMP_PKG_DIR/$REPOMD_XML
+ TMP_PRIMARY=$TMP_PKG_DIR/$PRIMARY_XML
+ TMP_PRIMARYGZ=${TMP_PRIMARY}.gz
+
+ Fetch $BUILD_XML_URL $TMP_BUILD
+
+ Debug "fetch $BUILD_XML_URL to $TMP_BUILD"
+
+ TARGET_XPATH="//build/buildtargets/buildtarget[@name=\"$TARGET\"]/repo[@type=\"binary\"]/text()"
+ Xpath_get $TARGET_XPATH $TMP_BUILD
+ TARGET_PATH=$XPATH_RESULT
+ TARGET_URL=$PKG_URL/$TARGET_PATH
+
+ REPOMD_URL=$TARGET_URL/repodata/repomd.xml
+ PRIMARY_XPATH='string(//*[local-name()="data"][@type="primary"]/*[local-name()="location"]/@href)'
+
+ Fetch $REPOMD_URL $TMP_REPOMD
+
+ Debug "fetch $REPOMD_URL to $TMP_REPOMD"
+
+ Xpath_get $PRIMARY_XPATH $TMP_REPOMD
+ PRIMARY_XML_PATH=$XPATH_RESULT
+ PRIMARY_URL=$TARGET_URL/$PRIMARY_XML_PATH
+
+ Fetch $PRIMARY_URL $TMP_PRIMARYGZ
+
+ Debug "fetch $PRIMARY_URL to $TMP_PRIMARYGZ"
+
+ gunzip $TMP_PRIMARYGZ
+
+ Debug "unzip $TMP_PRIMARYGZ to $TMP_PRIMARY"
+}
+
+fetch_tizen_pkgs()
+{
+ ARCH=$1
+ PACKAGE_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="location"]/@href)'
+
+ PACKAGE_CHECKSUM_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="checksum"]/text())'
+
+ for pkg in ${@:2}
+ do
+ Inform "Fetching... $pkg"
+ XPATH=${PACKAGE_XPATH_TPL/_PKG_/$pkg}
+ XPATH=${XPATH/_ARCH_/$ARCH}
+ Xpath_get $XPATH $TMP_PRIMARY
+ PKG_PATH=$XPATH_RESULT
+
+ XPATH=${PACKAGE_CHECKSUM_XPATH_TPL/_PKG_/$pkg}
+ XPATH=${XPATH/_ARCH_/$ARCH}
+ Xpath_get $XPATH $TMP_PRIMARY
+ CHECKSUM=$XPATH_RESULT
+
+ PKG_URL=$TARGET_URL/$PKG_PATH
+ PKG_FILE=$(basename $PKG_PATH)
+ PKG_PATH=$TMPDIR/$PKG_FILE
+
+ Debug "Download $PKG_URL to $PKG_PATH"
+ Fetch $PKG_URL $PKG_PATH true
+
+ echo "$CHECKSUM $PKG_PATH" | sha256sum -c - > /dev/null
+ if [ $? -ne 0 ]; then
+ Error "Fail to fetch $PKG_URL to $PKG_PATH"
+ Debug "Checksum = $CHECKSUM"
+ exit 1
+ fi
+ done
+}
+
+Inform "Initialize arm base"
+fetch_tizen_pkgs_init standard base
+Inform "fetch common packages"
+fetch_tizen_pkgs armv7l gcc glibc glibc-devel libicu libicu-devel
+fetch_tizen_pkgs noarch linux-glibc-devel
+Inform "fetch coreclr packages"
+fetch_tizen_pkgs armv7l lldb lldb-devel libgcc libstdc++ libstdc++-devel libunwind libunwind-devel tizen-release lttng-ust-devel lttng-ust userspace-rcu-devel userspace-rcu
+Inform "fetch corefx packages"
+fetch_tizen_pkgs armv7l libcom_err libcom_err-devel zlib zlib-devel libopenssl libopenssl-devel krb5 krb5-devel libcurl libcurl-devel
+
+Inform "Initialize standard unified"
+fetch_tizen_pkgs_init standard unified
+Inform "fetch corefx packages"
+fetch_tizen_pkgs armv7l gssdp gssdp-devel
+
diff --git a/eng/common/cross/armel/tizen/tizen-dotnet.ks b/eng/common/cross/armel/tizen/tizen-dotnet.ks
new file mode 100644
index 0000000000..506d455bd4
--- /dev/null
+++ b/eng/common/cross/armel/tizen/tizen-dotnet.ks
@@ -0,0 +1,50 @@
+lang en_US.UTF-8
+keyboard us
+timezone --utc Asia/Seoul
+
+part / --fstype="ext4" --size=3500 --ondisk=mmcblk0 --label rootfs --fsoptions=defaults,noatime
+
+rootpw tizen
+desktop --autologinuser=root
+user --name root --groups audio,video --password 'tizen'
+
+repo --name=standard --baseurl=http://download.tizen.org/releases/milestone/tizen/unified/latest/repos/standard/packages/ --ssl_verify=no
+repo --name=base --baseurl=http://download.tizen.org/releases/milestone/tizen/base/latest/repos/standard/packages/ --ssl_verify=no
+
+%packages
+tar
+gzip
+
+sed
+grep
+gawk
+perl
+
+binutils
+findutils
+util-linux
+lttng-ust
+userspace-rcu
+procps-ng
+tzdata
+ca-certificates
+
+
+### Core FX
+libicu
+libunwind
+iputils
+zlib
+krb5
+libcurl
+libopenssl
+
+%end
+
+%post
+
+### Update /tmp privilege
+chmod 777 /tmp
+####################################
+
+%end
diff --git a/eng/common/cross/armel/tizen/tizen.patch b/eng/common/cross/armel/tizen/tizen.patch
new file mode 100644
index 0000000000..d223427c97
--- /dev/null
+++ b/eng/common/cross/armel/tizen/tizen.patch
@@ -0,0 +1,18 @@
+diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so
+--- a/usr/lib/libc.so 2016-12-30 23:00:08.284951863 +0900
++++ b/usr/lib/libc.so 2016-12-30 23:00:32.140951815 +0900
+@@ -2,4 +2,4 @@
+ Use the shared library, but some functions are only in
+ the static library, so try that secondarily. */
+ OUTPUT_FORMAT(elf32-littlearm)
+-GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux.so.3 ) )
++GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux.so.3 ) )
+diff -u -r a/usr/lib/libpthread.so b/usr/lib/libpthread.so
+--- a/usr/lib/libpthread.so 2016-12-30 23:00:19.408951841 +0900
++++ b/usr/lib/libpthread.so 2016-12-30 23:00:39.068951801 +0900
+@@ -2,4 +2,4 @@
+ Use the shared library, but some functions are only in
+ the static library, so try that secondarily. */
+ OUTPUT_FORMAT(elf32-littlearm)
+-GROUP ( /lib/libpthread.so.0 /usr/lib/libpthread_nonshared.a )
++GROUP ( libpthread.so.0 libpthread_nonshared.a )
diff --git a/eng/common/cross/build-android-rootfs.sh b/eng/common/cross/build-android-rootfs.sh
new file mode 100755
index 0000000000..adceda877a
--- /dev/null
+++ b/eng/common/cross/build-android-rootfs.sh
@@ -0,0 +1,137 @@
+#!/usr/bin/env bash
+set -e
+__NDK_Version=r14
+
+usage()
+{
+ echo "Creates a toolchain and sysroot used for cross-compiling for Android."
+ echo.
+ echo "Usage: $0 [BuildArch] [ApiLevel]"
+ echo.
+ echo "BuildArch is the target architecture of Android. Currently only arm64 is supported."
+ echo "ApiLevel is the target Android API level. API levels usually match to Android releases. See https://source.android.com/source/build-numbers.html"
+ echo.
+ echo "By default, the toolchain and sysroot will be generated in cross/android-rootfs/toolchain/[BuildArch]. You can change this behavior"
+ echo "by setting the TOOLCHAIN_DIR environment variable"
+ echo.
+ echo "By default, the NDK will be downloaded into the cross/android-rootfs/android-ndk-$__NDK_Version directory. If you already have an NDK installation,"
+ echo "you can set the NDK_DIR environment variable to have this script use that installation of the NDK."
+ echo "By default, this script will generate a file, android_platform, in the root of the ROOTFS_DIR directory that contains the RID for the supported and tested Android build: android.21-arm64. This file is to replace '/etc/os-release', which is not available for Android."
+ exit 1
+}
+
+__ApiLevel=21 # The minimum platform for arm64 is API level 21
+__BuildArch=arm64
+__AndroidArch=aarch64
+__AndroidToolchain=aarch64-linux-android
+
+for i in "$@"
+ do
+ lowerI="$(echo $i | awk '{print tolower($0)}')"
+ case $lowerI in
+ -?|-h|--help)
+ usage
+ exit 1
+ ;;
+ arm64)
+ __BuildArch=arm64
+ __AndroidArch=aarch64
+ __AndroidToolchain=aarch64-linux-android
+ ;;
+ arm)
+ __BuildArch=arm
+ __AndroidArch=arm
+ __AndroidToolchain=arm-linux-androideabi
+ ;;
+ *[0-9])
+ __ApiLevel=$i
+ ;;
+ *)
+ __UnprocessedBuildArgs="$__UnprocessedBuildArgs $i"
+ ;;
+ esac
+done
+
+# Obtain the location of the bash script to figure out where the root of the repo is.
+__CrossDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+
+__Android_Cross_Dir="$__CrossDir/android-rootfs"
+__NDK_Dir="$__Android_Cross_Dir/android-ndk-$__NDK_Version"
+__libunwind_Dir="$__Android_Cross_Dir/libunwind"
+__lldb_Dir="$__Android_Cross_Dir/lldb"
+__ToolchainDir="$__Android_Cross_Dir/toolchain/$__BuildArch"
+
+if [[ -n "$TOOLCHAIN_DIR" ]]; then
+ __ToolchainDir=$TOOLCHAIN_DIR
+fi
+
+if [[ -n "$NDK_DIR" ]]; then
+ __NDK_Dir=$NDK_DIR
+fi
+
+echo "Target API level: $__ApiLevel"
+echo "Target architecture: $__BuildArch"
+echo "NDK location: $__NDK_Dir"
+echo "Target Toolchain location: $__ToolchainDir"
+
+# Download the NDK if required
+if [ ! -d $__NDK_Dir ]; then
+ echo Downloading the NDK into $__NDK_Dir
+ mkdir -p $__NDK_Dir
+ wget -nv -nc --show-progress https://dl.google.com/android/repository/android-ndk-$__NDK_Version-linux-x86_64.zip -O $__Android_Cross_Dir/android-ndk-$__NDK_Version-linux-x86_64.zip
+ unzip -q $__Android_Cross_Dir/android-ndk-$__NDK_Version-linux-x86_64.zip -d $__Android_Cross_Dir
+fi
+
+if [ ! -d $__lldb_Dir ]; then
+ mkdir -p $__lldb_Dir
+ echo Downloading LLDB into $__lldb_Dir
+ wget -nv -nc --show-progress https://dl.google.com/android/repository/lldb-2.3.3614996-linux-x86_64.zip -O $__Android_Cross_Dir/lldb-2.3.3614996-linux-x86_64.zip
+ unzip -q $__Android_Cross_Dir/lldb-2.3.3614996-linux-x86_64.zip -d $__lldb_Dir
+fi
+
+# Create the RootFS for both arm64 as well as aarch
+rm -rf $__Android_Cross_Dir/toolchain
+
+echo Generating the $__BuildArch toolchain
+$__NDK_Dir/build/tools/make_standalone_toolchain.py --arch $__BuildArch --api $__ApiLevel --install-dir $__ToolchainDir
+
+# Install the required packages into the toolchain
+# TODO: Add logic to get latest pkg version instead of specific version number
+rm -rf $__Android_Cross_Dir/deb/
+rm -rf $__Android_Cross_Dir/tmp
+
+mkdir -p $__Android_Cross_Dir/deb/
+mkdir -p $__Android_Cross_Dir/tmp/$arch/
+wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/libicu_60.2_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/libicu_60.2_$__AndroidArch.deb
+wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/libicu-dev_60.2_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/libicu-dev_60.2_$__AndroidArch.deb
+
+wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/libandroid-glob-dev_0.4_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/libandroid-glob-dev_0.4_$__AndroidArch.deb
+wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/libandroid-glob_0.4_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/libandroid-glob_0.4_$__AndroidArch.deb
+wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/libandroid-support-dev_22_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/libandroid-support-dev_22_$__AndroidArch.deb
+wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/libandroid-support_22_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/libandroid-support_22_$__AndroidArch.deb
+wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/liblzma-dev_5.2.3_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/liblzma-dev_5.2.3_$__AndroidArch.deb
+wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/liblzma_5.2.3_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/liblzma_5.2.3_$__AndroidArch.deb
+wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/libunwind-dev_1.2.20170304_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/libunwind-dev_1.2.20170304_$__AndroidArch.deb
+wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/libunwind_1.2.20170304_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/libunwind_1.2.20170304_$__AndroidArch.deb
+
+echo Unpacking Termux packages
+dpkg -x $__Android_Cross_Dir/deb/libicu_60.2_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
+dpkg -x $__Android_Cross_Dir/deb/libicu-dev_60.2_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
+dpkg -x $__Android_Cross_Dir/deb/libandroid-glob-dev_0.4_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
+dpkg -x $__Android_Cross_Dir/deb/libandroid-glob_0.4_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
+dpkg -x $__Android_Cross_Dir/deb/libandroid-support-dev_22_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
+dpkg -x $__Android_Cross_Dir/deb/libandroid-support_22_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
+dpkg -x $__Android_Cross_Dir/deb/liblzma-dev_5.2.3_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
+dpkg -x $__Android_Cross_Dir/deb/liblzma_5.2.3_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
+dpkg -x $__Android_Cross_Dir/deb/libunwind-dev_1.2.20170304_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
+dpkg -x $__Android_Cross_Dir/deb/libunwind_1.2.20170304_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
+
+cp -R $__Android_Cross_Dir/tmp/$__AndroidArch/data/data/com.termux/files/usr/* $__ToolchainDir/sysroot/usr/
+
+# Generate platform file for build.sh script to assign to __DistroRid
+echo "Generating platform file..."
+
+echo "RID=android.21-arm64" > $__ToolchainDir/sysroot/android_platform
+echo Now run:
+echo CONFIG_DIR=\`realpath cross/android/$__BuildArch\` ROOTFS_DIR=\`realpath $__ToolchainDir/sysroot\` ./build.sh cross $__BuildArch skipgenerateversion skipnuget cmakeargs -DENABLE_LLDBPLUGIN=0
+
diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh
new file mode 100755
index 0000000000..805948ca83
--- /dev/null
+++ b/eng/common/cross/build-rootfs.sh
@@ -0,0 +1,210 @@
+#!/usr/bin/env bash
+
+usage()
+{
+ echo "Usage: $0 [BuildArch] [LinuxCodeName] [lldbx.y] [--skipunmount]"
+ echo "BuildArch can be: arm(default), armel, arm64, x86"
+ echo "LinuxCodeName - optional, Code name for Linux, can be: trusty(default), vivid, wily, xenial, zesty, bionic, alpine. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen."
+ echo "lldbx.y - optional, LLDB version, can be: lldb3.6(default), lldb3.8, lldb3.9, lldb4.0, no-lldb. Ignored for alpine"
+ echo "--skipunmount - optional, will skip the unmount of rootfs folder."
+ exit 1
+}
+
+__LinuxCodeName=trusty
+__CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+__InitialDir=$PWD
+__BuildArch=arm
+__UbuntuArch=armhf
+__UbuntuRepo="http://ports.ubuntu.com/"
+__LLDB_Package="lldb-3.6-dev"
+__SkipUnmount=0
+
+# base development support
+__UbuntuPackages="build-essential"
+
+__AlpinePackages="alpine-base"
+__AlpinePackages+=" build-base"
+__AlpinePackages+=" linux-headers"
+__AlpinePackages+=" lldb-dev"
+__AlpinePackages+=" llvm-dev"
+
+# symlinks fixer
+__UbuntuPackages+=" symlinks"
+
+# CoreCLR and CoreFX dependencies
+__UbuntuPackages+=" libicu-dev"
+__UbuntuPackages+=" liblttng-ust-dev"
+__UbuntuPackages+=" libunwind8-dev"
+
+__AlpinePackages+=" gettext-dev"
+__AlpinePackages+=" icu-dev"
+__AlpinePackages+=" libunwind-dev"
+__AlpinePackages+=" lttng-ust-dev"
+
+# CoreFX dependencies
+__UbuntuPackages+=" libcurl4-openssl-dev"
+__UbuntuPackages+=" libkrb5-dev"
+__UbuntuPackages+=" libssl-dev"
+__UbuntuPackages+=" zlib1g-dev"
+
+__AlpinePackages+=" curl-dev"
+__AlpinePackages+=" krb5-dev"
+__AlpinePackages+=" openssl-dev"
+__AlpinePackages+=" zlib-dev"
+
+__UnprocessedBuildArgs=
+for i in "$@" ; do
+ lowerI="$(echo $i | awk '{print tolower($0)}')"
+ case $lowerI in
+ -?|-h|--help)
+ usage
+ exit 1
+ ;;
+ arm)
+ __BuildArch=arm
+ __UbuntuArch=armhf
+ __AlpineArch=armhf
+ __QEMUArch=arm
+ ;;
+ arm64)
+ __BuildArch=arm64
+ __UbuntuArch=arm64
+ __AlpineArch=aarch64
+ __QEMUArch=aarch64
+ ;;
+ armel)
+ __BuildArch=armel
+ __UbuntuArch=armel
+ __UbuntuRepo="http://ftp.debian.org/debian/"
+ __LinuxCodeName=jessie
+ ;;
+ x86)
+ __BuildArch=x86
+ __UbuntuArch=i386
+ __UbuntuRepo="http://archive.ubuntu.com/ubuntu/"
+ ;;
+ lldb3.6)
+ __LLDB_Package="lldb-3.6-dev"
+ ;;
+ lldb3.8)
+ __LLDB_Package="lldb-3.8-dev"
+ ;;
+ lldb3.9)
+ __LLDB_Package="liblldb-3.9-dev"
+ ;;
+ lldb4.0)
+ __LLDB_Package="liblldb-4.0-dev"
+ ;;
+ no-lldb)
+ unset __LLDB_Package
+ ;;
+ vivid)
+ if [ "$__LinuxCodeName" != "jessie" ]; then
+ __LinuxCodeName=vivid
+ fi
+ ;;
+ wily)
+ if [ "$__LinuxCodeName" != "jessie" ]; then
+ __LinuxCodeName=wily
+ fi
+ ;;
+ xenial)
+ if [ "$__LinuxCodeName" != "jessie" ]; then
+ __LinuxCodeName=xenial
+ fi
+ ;;
+ zesty)
+ if [ "$__LinuxCodeName" != "jessie" ]; then
+ __LinuxCodeName=zesty
+ fi
+ ;;
+ bionic)
+ if [ "$__LinuxCodeName" != "jessie" ]; then
+ __LinuxCodeName=bionic
+ fi
+ ;;
+ jessie)
+ __LinuxCodeName=jessie
+ __UbuntuRepo="http://ftp.debian.org/debian/"
+ ;;
+ tizen)
+ if [ "$__BuildArch" != "armel" ]; then
+ echo "Tizen is available only for armel."
+ usage;
+ exit 1;
+ fi
+ __LinuxCodeName=
+ __UbuntuRepo=
+ __Tizen=tizen
+ ;;
+ alpine)
+ __LinuxCodeName=alpine
+ __UbuntuRepo=
+ ;;
+ --skipunmount)
+ __SkipUnmount=1
+ ;;
+ *)
+ __UnprocessedBuildArgs="$__UnprocessedBuildArgs $i"
+ ;;
+ esac
+done
+
+if [ "$__BuildArch" == "armel" ]; then
+ __LLDB_Package="lldb-3.5-dev"
+fi
+__UbuntuPackages+=" ${__LLDB_Package:-}"
+
+__RootfsDir="$__CrossDir/rootfs/$__BuildArch"
+
+if [[ -n "$ROOTFS_DIR" ]]; then
+ __RootfsDir=$ROOTFS_DIR
+fi
+
+if [ -d "$__RootfsDir" ]; then
+ if [ $__SkipUnmount == 0 ]; then
+ umount $__RootfsDir/*
+ fi
+ rm -rf $__RootfsDir
+fi
+
+if [[ "$__LinuxCodeName" == "alpine" ]]; then
+ __ApkToolsVersion=2.9.1
+ __AlpineVersion=3.7
+ __ApkToolsDir=$(mktemp -d)
+ wget https://github.com/alpinelinux/apk-tools/releases/download/v$__ApkToolsVersion/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz -P $__ApkToolsDir
+ tar -xf $__ApkToolsDir/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz -C $__ApkToolsDir
+ mkdir -p $__RootfsDir/usr/bin
+ cp -v /usr/bin/qemu-$__QEMUArch-static $__RootfsDir/usr/bin
+ $__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
+ -X http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/main \
+ -X http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/community \
+ -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
+ -U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
+ add $__AlpinePackages
+ rm -r $__ApkToolsDir
+elif [[ -n $__LinuxCodeName ]]; then
+ qemu-debootstrap --arch $__UbuntuArch $__LinuxCodeName $__RootfsDir $__UbuntuRepo
+ cp $__CrossDir/$__BuildArch/sources.list.$__LinuxCodeName $__RootfsDir/etc/apt/sources.list
+ chroot $__RootfsDir apt-get update
+ chroot $__RootfsDir apt-get -f -y install
+ chroot $__RootfsDir apt-get -y install $__UbuntuPackages
+ chroot $__RootfsDir symlinks -cr /usr
+
+ if [ $__SkipUnmount == 0 ]; then
+ umount $__RootfsDir/*
+ fi
+
+ if [[ "$__BuildArch" == "arm" && "$__LinuxCodeName" == "trusty" ]]; then
+ pushd $__RootfsDir
+ patch -p1 < $__CrossDir/$__BuildArch/trusty.patch
+ patch -p1 < $__CrossDir/$__BuildArch/trusty-lttng-2.4.patch
+ popd
+ fi
+elif [ "$__Tizen" == "tizen" ]; then
+ ROOTFS_DIR=$__RootfsDir $__CrossDir/$__BuildArch/tizen-build-rootfs.sh
+else
+ echo "Unsupported target platform."
+ usage;
+ exit 1
+fi
diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake
new file mode 100644
index 0000000000..071d411241
--- /dev/null
+++ b/eng/common/cross/toolchain.cmake
@@ -0,0 +1,138 @@
+set(CROSS_ROOTFS $ENV{ROOTFS_DIR})
+
+set(TARGET_ARCH_NAME $ENV{TARGET_BUILD_ARCH})
+set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_SYSTEM_VERSION 1)
+
+if(TARGET_ARCH_NAME STREQUAL "armel")
+ set(CMAKE_SYSTEM_PROCESSOR armv7l)
+ set(TOOLCHAIN "arm-linux-gnueabi")
+ if("$ENV{__DistroRid}" MATCHES "tizen.*")
+ set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi/6.2.1")
+ endif()
+elseif(TARGET_ARCH_NAME STREQUAL "arm")
+ set(CMAKE_SYSTEM_PROCESSOR armv7l)
+ if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv6-alpine-linux-musleabihf)
+ set(TOOLCHAIN "armv6-alpine-linux-musleabihf")
+ else()
+ set(TOOLCHAIN "arm-linux-gnueabihf")
+ endif()
+elseif(TARGET_ARCH_NAME STREQUAL "arm64")
+ set(CMAKE_SYSTEM_PROCESSOR aarch64)
+ if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/aarch64-alpine-linux-musl)
+ set(TOOLCHAIN "aarch64-alpine-linux-musl")
+ else()
+ set(TOOLCHAIN "aarch64-linux-gnu")
+ endif()
+elseif(TARGET_ARCH_NAME STREQUAL "x86")
+ set(CMAKE_SYSTEM_PROCESSOR i686)
+ set(TOOLCHAIN "i686-linux-gnu")
+else()
+ message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only armel, arm, arm64 and x86 are supported!")
+endif()
+
+# Specify include paths
+if(TARGET_ARCH_NAME STREQUAL "armel")
+ if(DEFINED TIZEN_TOOLCHAIN)
+ include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/)
+ include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7l-tizen-linux-gnueabi)
+ endif()
+endif()
+
+# add_compile_param - adds only new options without duplicates.
+# arg0 - list with result options, arg1 - list with new options.
+# arg2 - optional argument, quick summary string for optional using CACHE FORCE mode.
+macro(add_compile_param)
+ if(NOT ${ARGC} MATCHES "^(2|3)$")
+ message(FATAL_ERROR "Wrong using add_compile_param! Two or three parameters must be given! See add_compile_param description.")
+ endif()
+ foreach(OPTION ${ARGV1})
+ if(NOT ${ARGV0} MATCHES "${OPTION}($| )")
+ set(${ARGV0} "${${ARGV0}} ${OPTION}")
+ if(${ARGC} EQUAL "3") # CACHE FORCE mode
+ set(${ARGV0} "${${ARGV0}}" CACHE STRING "${ARGV2}" FORCE)
+ endif()
+ endif()
+ endforeach()
+endmacro()
+
+# Specify link flags
+add_compile_param(CROSS_LINK_FLAGS "--sysroot=${CROSS_ROOTFS}")
+add_compile_param(CROSS_LINK_FLAGS "--gcc-toolchain=${CROSS_ROOTFS}/usr")
+add_compile_param(CROSS_LINK_FLAGS "--target=${TOOLCHAIN}")
+add_compile_param(CROSS_LINK_FLAGS "-fuse-ld=gold")
+
+if(TARGET_ARCH_NAME STREQUAL "armel")
+ if(DEFINED TIZEN_TOOLCHAIN) # For Tizen only
+ add_compile_param(CROSS_LINK_FLAGS "-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
+ add_compile_param(CROSS_LINK_FLAGS "-L${CROSS_ROOTFS}/lib")
+ add_compile_param(CROSS_LINK_FLAGS "-L${CROSS_ROOTFS}/usr/lib")
+ add_compile_param(CROSS_LINK_FLAGS "-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
+ endif()
+elseif(TARGET_ARCH_NAME STREQUAL "x86")
+ add_compile_param(CROSS_LINK_FLAGS "-m32")
+endif()
+
+add_compile_param(CMAKE_EXE_LINKER_FLAGS "${CROSS_LINK_FLAGS}" "TOOLCHAIN_EXE_LINKER_FLAGS")
+add_compile_param(CMAKE_SHARED_LINKER_FLAGS "${CROSS_LINK_FLAGS}" "TOOLCHAIN_EXE_LINKER_FLAGS")
+add_compile_param(CMAKE_MODULE_LINKER_FLAGS "${CROSS_LINK_FLAGS}" "TOOLCHAIN_EXE_LINKER_FLAGS")
+
+# Specify compile options
+add_compile_options("--sysroot=${CROSS_ROOTFS}")
+add_compile_options("--target=${TOOLCHAIN}")
+add_compile_options("--gcc-toolchain=${CROSS_ROOTFS}/usr")
+
+if(TARGET_ARCH_NAME MATCHES "^(arm|armel|arm64)$")
+ set(CMAKE_C_COMPILER_TARGET ${TOOLCHAIN})
+ set(CMAKE_CXX_COMPILER_TARGET ${TOOLCHAIN})
+ set(CMAKE_ASM_COMPILER_TARGET ${TOOLCHAIN})
+endif()
+
+if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$")
+ add_compile_options(-mthumb)
+ add_compile_options(-mfpu=vfpv3)
+ if(TARGET_ARCH_NAME STREQUAL "armel")
+ add_compile_options(-mfloat-abi=softfp)
+ if(DEFINED TIZEN_TOOLCHAIN)
+ add_compile_options(-Wno-deprecated-declarations) # compile-time option
+ add_compile_options(-D__extern_always_inline=inline) # compile-time option
+ endif()
+ endif()
+elseif(TARGET_ARCH_NAME STREQUAL "x86")
+ add_compile_options(-m32)
+ add_compile_options(-Wno-error=unused-command-line-argument)
+endif()
+
+# Set LLDB include and library paths
+if(TARGET_ARCH_NAME MATCHES "^(arm|armel|x86)$")
+ if(TARGET_ARCH_NAME STREQUAL "x86")
+ set(LLVM_CROSS_DIR "$ENV{LLVM_CROSS_HOME}")
+ else() # arm/armel case
+ set(LLVM_CROSS_DIR "$ENV{LLVM_ARM_HOME}")
+ endif()
+ if(LLVM_CROSS_DIR)
+ set(WITH_LLDB_LIBS "${LLVM_CROSS_DIR}/lib/" CACHE STRING "")
+ set(WITH_LLDB_INCLUDES "${LLVM_CROSS_DIR}/include" CACHE STRING "")
+ set(LLDB_H "${WITH_LLDB_INCLUDES}" CACHE STRING "")
+ set(LLDB "${LLVM_CROSS_DIR}/lib/liblldb.so" CACHE STRING "")
+ else()
+ if(TARGET_ARCH_NAME STREQUAL "x86")
+ set(WITH_LLDB_LIBS "${CROSS_ROOTFS}/usr/lib/i386-linux-gnu" CACHE STRING "")
+ set(CHECK_LLVM_DIR "${CROSS_ROOTFS}/usr/lib/llvm-3.8/include")
+ if(EXISTS "${CHECK_LLVM_DIR}" AND IS_DIRECTORY "${CHECK_LLVM_DIR}")
+ set(WITH_LLDB_INCLUDES "${CHECK_LLVM_DIR}")
+ else()
+ set(WITH_LLDB_INCLUDES "${CROSS_ROOTFS}/usr/lib/llvm-3.6/include")
+ endif()
+ else() # arm/armel case
+ set(WITH_LLDB_LIBS "${CROSS_ROOTFS}/usr/lib/${TOOLCHAIN}" CACHE STRING "")
+ set(WITH_LLDB_INCLUDES "${CROSS_ROOTFS}/usr/lib/llvm-3.6/include" CACHE STRING "")
+ endif()
+ endif()
+endif()
+
+set(CMAKE_FIND_ROOT_PATH "${CROSS_ROOTFS}")
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
diff --git a/eng/common/cross/x86/sources.list.bionic b/eng/common/cross/x86/sources.list.bionic
new file mode 100644
index 0000000000..a71ccadcff
--- /dev/null
+++ b/eng/common/cross/x86/sources.list.bionic
@@ -0,0 +1,11 @@
+deb http://archive.ubuntu.com/ubuntu/ bionic main restricted universe
+deb-src http://archive.ubuntu.com/ubuntu/ bionic main restricted universe
+
+deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe
+deb-src http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe
+
+deb http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted
+deb-src http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted
+
+deb http://archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
+deb-src http://archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
diff --git a/eng/common/cross/x86/sources.list.trusty b/eng/common/cross/x86/sources.list.trusty
new file mode 100644
index 0000000000..9b3085436e
--- /dev/null
+++ b/eng/common/cross/x86/sources.list.trusty
@@ -0,0 +1,11 @@
+deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe
+deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted universe
+
+deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe
+deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe
+
+deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted
+deb-src http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted
+
+deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
+deb-src http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
diff --git a/eng/common/cross/x86/sources.list.vivid b/eng/common/cross/x86/sources.list.vivid
new file mode 100644
index 0000000000..26d37b20fc
--- /dev/null
+++ b/eng/common/cross/x86/sources.list.vivid
@@ -0,0 +1,11 @@
+deb http://archive.ubuntu.com/ubuntu/ vivid main restricted universe
+deb-src http://archive.ubuntu.com/ubuntu/ vivid main restricted universe
+
+deb http://archive.ubuntu.com/ubuntu/ vivid-updates main restricted universe
+deb-src http://archive.ubuntu.com/ubuntu/ vivid-updates main restricted universe
+
+deb http://archive.ubuntu.com/ubuntu/ vivid-backports main restricted
+deb-src http://archive.ubuntu.com/ubuntu/ vivid-backports main restricted
+
+deb http://archive.ubuntu.com/ubuntu/ vivid-security main restricted universe multiverse
+deb-src http://archive.ubuntu.com/ubuntu/ vivid-security main restricted universe multiverse
diff --git a/eng/common/cross/x86/sources.list.wily b/eng/common/cross/x86/sources.list.wily
new file mode 100644
index 0000000000..c4b0b442ab
--- /dev/null
+++ b/eng/common/cross/x86/sources.list.wily
@@ -0,0 +1,11 @@
+deb http://archive.ubuntu.com/ubuntu/ wily main restricted universe
+deb-src http://archive.ubuntu.com/ubuntu/ wily main restricted universe
+
+deb http://archive.ubuntu.com/ubuntu/ wily-updates main restricted universe
+deb-src http://archive.ubuntu.com/ubuntu/ wily-updates main restricted universe
+
+deb http://archive.ubuntu.com/ubuntu/ wily-backports main restricted
+deb-src http://archive.ubuntu.com/ubuntu/ wily-backports main restricted
+
+deb http://archive.ubuntu.com/ubuntu/ wily-security main restricted universe multiverse
+deb-src http://archive.ubuntu.com/ubuntu/ wily-security main restricted universe multiverse
diff --git a/eng/common/cross/x86/sources.list.xenial b/eng/common/cross/x86/sources.list.xenial
new file mode 100644
index 0000000000..ad9c5a0144
--- /dev/null
+++ b/eng/common/cross/x86/sources.list.xenial
@@ -0,0 +1,11 @@
+deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe
+deb-src http://archive.ubuntu.com/ubuntu/ xenial main restricted universe
+
+deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe
+deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe
+
+deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted
+deb-src http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted
+
+deb http://archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
+deb-src http://archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
diff --git a/eng/common/darc-init.ps1 b/eng/common/darc-init.ps1
new file mode 100644
index 0000000000..96cad844ba
--- /dev/null
+++ b/eng/common/darc-init.ps1
@@ -0,0 +1,32 @@
+param (
+ $darcVersion = $null
+)
+
+$verbosity = "m"
+. $PSScriptRoot\tools.ps1
+
+function InstallDarcCli ($darcVersion) {
+ $darcCliPackageName = "microsoft.dotnet.darc"
+
+ $dotnetRoot = InitializeDotNetCli -install:$true
+ $dotnet = "$dotnetRoot\dotnet.exe"
+ $toolList = Invoke-Expression "& `"$dotnet`" tool list -g"
+
+ if ($toolList -like "*$darcCliPackageName*") {
+ Invoke-Expression "& `"$dotnet`" tool uninstall $darcCliPackageName -g"
+ }
+
+ # Until we can anonymously query the BAR API for the latest arcade-services
+ # build applied to the PROD channel, this is hardcoded.
+ if (-not $darcVersion) {
+ $darcVersion = '1.1.0-beta.19057.9'
+ }
+
+ $arcadeServicesSource = 'https://dotnetfeed.blob.core.windows.net/dotnet-arcade/index.json'
+
+ Write-Host "Installing Darc CLI version $darcVersion..."
+ Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed."
+ Invoke-Expression "& `"$dotnet`" tool install $darcCliPackageName --version $darcVersion --add-source '$arcadeServicesSource' -v $verbosity -g"
+}
+
+InstallDarcCli $darcVersion
diff --git a/eng/common/darc-init.sh b/eng/common/darc-init.sh
new file mode 100755
index 0000000000..bad07c3ae6
--- /dev/null
+++ b/eng/common/darc-init.sh
@@ -0,0 +1,38 @@
+#!/usr/bin/env bash
+
+source="${BASH_SOURCE[0]}"
+
+# resolve $source until the file is no longer a symlink
+while [[ -h "$source" ]]; do
+ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+ source="$(readlink "$source")"
+ # if $source was a relative symlink, we need to resolve it relative to the path where the
+ # symlink file was located
+ [[ $source != /* ]] && source="$scriptroot/$source"
+done
+scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+verbosity=m
+
+. "$scriptroot/tools.sh"
+
+function InstallDarcCli {
+ local darc_cli_package_name="microsoft.dotnet.darc"
+
+ InitializeDotNetCli
+ local dotnet_root=$_InitializeDotNetCli
+
+ local uninstall_command=`$dotnet_root/dotnet tool uninstall $darc_cli_package_name -g`
+ local tool_list=$($dotnet_root/dotnet tool list -g)
+ if [[ $tool_list = *$darc_cli_package_name* ]]; then
+ echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name -g)
+ fi
+
+ ReadGlobalVersion "Microsoft.DotNet.Arcade.Sdk"
+ local toolset_version=$_ReadGlobalVersion
+
+ echo "Installing Darc CLI version $toolset_version..."
+ echo "You may need to restart your command shell if this is the first dotnet tool you have installed."
+ echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $toolset_version -v $verbosity -g)
+}
+
+InstallDarcCli
diff --git a/eng/common/helixpublish.proj b/eng/common/helixpublish.proj
new file mode 100644
index 0000000000..d7f185856e
--- /dev/null
+++ b/eng/common/helixpublish.proj
@@ -0,0 +1,26 @@
+
+
+
+ msbuild
+
+
+
+
+ %(Identity)
+
+
+
+
+
+ $(WorkItemDirectory)
+ $(WorkItemCommand)
+ $(WorkItemTimeout)
+
+
+
+
+
+
+
+
+
diff --git a/eng/common/init-tools-native.cmd b/eng/common/init-tools-native.cmd
new file mode 100644
index 0000000000..438cd548c4
--- /dev/null
+++ b/eng/common/init-tools-native.cmd
@@ -0,0 +1,3 @@
+@echo off
+powershell -NoProfile -NoLogo -ExecutionPolicy ByPass -command "& """%~dp0init-tools-native.ps1""" %*"
+exit /b %ErrorLevel%
\ No newline at end of file
diff --git a/eng/common/init-tools-native.ps1 b/eng/common/init-tools-native.ps1
new file mode 100644
index 0000000000..e25c60fed4
--- /dev/null
+++ b/eng/common/init-tools-native.ps1
@@ -0,0 +1,128 @@
+<#
+.SYNOPSIS
+Entry point script for installing native tools
+
+.DESCRIPTION
+Reads $RepoRoot\global.json file to determine native assets to install
+and executes installers for those tools
+
+.PARAMETER BaseUri
+Base file directory or Url from which to acquire tool archives
+
+.PARAMETER InstallDirectory
+Directory to install native toolset. This is a command-line override for the default
+Install directory precedence order:
+- InstallDirectory command-line override
+- NETCOREENG_INSTALL_DIRECTORY environment variable
+- (default) %USERPROFILE%/.netcoreeng/native
+
+.PARAMETER Clean
+Switch specifying to not install anything, but cleanup native asset folders
+
+.PARAMETER Force
+Clean and then install tools
+
+.PARAMETER DownloadRetries
+Total number of retry attempts
+
+.PARAMETER RetryWaitTimeInSeconds
+Wait time between retry attempts in seconds
+
+.PARAMETER GlobalJsonFile
+File path to global.json file
+
+.NOTES
+#>
+[CmdletBinding(PositionalBinding=$false)]
+Param (
+ [string] $BaseUri = "https://netcorenativeassets.blob.core.windows.net/resource-packages/external",
+ [string] $InstallDirectory,
+ [switch] $Clean = $False,
+ [switch] $Force = $False,
+ [int] $DownloadRetries = 5,
+ [int] $RetryWaitTimeInSeconds = 30,
+ [string] $GlobalJsonFile = "$PSScriptRoot\..\..\global.json"
+)
+
+Set-StrictMode -version 2.0
+$ErrorActionPreference="Stop"
+
+Import-Module -Name (Join-Path $PSScriptRoot "native\CommonLibrary.psm1")
+
+try {
+ # Define verbose switch if undefined
+ $Verbose = $VerbosePreference -Eq "Continue"
+
+ $EngCommonBaseDir = Join-Path $PSScriptRoot "native\"
+ $NativeBaseDir = $InstallDirectory
+ if (!$NativeBaseDir) {
+ $NativeBaseDir = CommonLibrary\Get-NativeInstallDirectory
+ }
+ $Env:CommonLibrary_NativeInstallDir = $NativeBaseDir
+ $InstallBin = Join-Path $NativeBaseDir "bin"
+ $InstallerPath = Join-Path $EngCommonBaseDir "install-tool.ps1"
+
+ # Process tools list
+ Write-Host "Processing $GlobalJsonFile"
+ If (-Not (Test-Path $GlobalJsonFile)) {
+ Write-Host "Unable to find '$GlobalJsonFile'"
+ exit 0
+ }
+ $NativeTools = Get-Content($GlobalJsonFile) -Raw |
+ ConvertFrom-Json |
+ Select-Object -Expand "native-tools" -ErrorAction SilentlyContinue
+ if ($NativeTools) {
+ $NativeTools.PSObject.Properties | ForEach-Object {
+ $ToolName = $_.Name
+ $ToolVersion = $_.Value
+ $LocalInstallerCommand = $InstallerPath
+ $LocalInstallerCommand += " -ToolName $ToolName"
+ $LocalInstallerCommand += " -InstallPath $InstallBin"
+ $LocalInstallerCommand += " -BaseUri $BaseUri"
+ $LocalInstallerCommand += " -CommonLibraryDirectory $EngCommonBaseDir"
+ $LocalInstallerCommand += " -Version $ToolVersion"
+
+ if ($Verbose) {
+ $LocalInstallerCommand += " -Verbose"
+ }
+ if (Get-Variable 'Force' -ErrorAction 'SilentlyContinue') {
+ if($Force) {
+ $LocalInstallerCommand += " -Force"
+ }
+ }
+ if ($Clean) {
+ $LocalInstallerCommand += " -Clean"
+ }
+
+ Write-Verbose "Installing $ToolName version $ToolVersion"
+ Write-Verbose "Executing '$LocalInstallerCommand'"
+ Invoke-Expression "$LocalInstallerCommand"
+ if ($LASTEXITCODE -Ne "0") {
+ Write-Error "Execution failed"
+ exit 1
+ }
+ }
+ }
+ else {
+ Write-Host "No native tools defined in global.json"
+ exit 0
+ }
+
+ if ($Clean) {
+ exit 0
+ }
+ if (Test-Path $InstallBin) {
+ Write-Host "Native tools are available from" (Convert-Path -Path $InstallBin)
+ Write-Host "##vso[task.prependpath]$(Convert-Path -Path $InstallBin)"
+ }
+ else {
+ Write-Error "Native tools install directory does not exist, installation failed"
+ exit 1
+ }
+ exit 0
+}
+catch {
+ Write-Host $_
+ Write-Host $_.Exception
+ exit 1
+}
diff --git a/eng/common/init-tools-native.sh b/eng/common/init-tools-native.sh
new file mode 100755
index 0000000000..54b70f678b
--- /dev/null
+++ b/eng/common/init-tools-native.sh
@@ -0,0 +1,145 @@
+#!/usr/bin/env bash
+
+source="${BASH_SOURCE[0]}"
+scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+
+base_uri='https://netcorenativeassets.blob.core.windows.net/resource-packages/external'
+install_directory=''
+clean=false
+force=false
+download_retries=5
+retry_wait_time_seconds=30
+global_json_file="${scriptroot}/../../global.json"
+declare -A native_assets
+
+. $scriptroot/native/common-library.sh
+
+while (($# > 0)); do
+ lowerI="$(echo $1 | awk '{print tolower($0)}')"
+ case $lowerI in
+ --baseuri)
+ base_uri=$2
+ shift 2
+ ;;
+ --installdirectory)
+ install_directory=$2
+ shift 2
+ ;;
+ --clean)
+ clean=true
+ shift 1
+ ;;
+ --force)
+ force=true
+ shift 1
+ ;;
+ --downloadretries)
+ download_retries=$2
+ shift 2
+ ;;
+ --retrywaittimeseconds)
+ retry_wait_time_seconds=$2
+ shift 2
+ ;;
+ --help)
+ echo "Common settings:"
+ echo " --installdirectory Directory to install native toolset."
+ echo " This is a command-line override for the default"
+ echo " Install directory precedence order:"
+ echo " - InstallDirectory command-line override"
+ echo " - NETCOREENG_INSTALL_DIRECTORY environment variable"
+ echo " - (default) %USERPROFILE%/.netcoreeng/native"
+ echo ""
+ echo " --clean Switch specifying not to install anything, but cleanup native asset folders"
+ echo " --force Clean and then install tools"
+ echo " --help Print help and exit"
+ echo ""
+ echo "Advanced settings:"
+ echo " --baseuri Base URI for where to download native tools from"
+ echo " --downloadretries Number of times a download should be attempted"
+ echo " --retrywaittimeseconds Wait time between download attempts"
+ echo ""
+ exit 0
+ ;;
+ esac
+done
+
+function ReadGlobalJsonNativeTools {
+ # Get the native-tools section from the global.json.
+ local native_tools_section=$(cat $global_json_file | awk '/"native-tools"/,/}/')
+ # Only extract the contents of the object.
+ local native_tools_list=$(echo $native_tools_section | awk -F"[{}]" '{print $2}')
+ native_tools_list=${native_tools_list//[\" ]/}
+ native_tools_list=${native_tools_list//,/$'\n'}
+
+ local old_IFS=$IFS
+ while read -r line; do
+ # Lines are of the form: 'tool:version'
+ IFS=:
+ while read -r key value; do
+ native_assets[$key]=$value
+ done <<< "$line"
+ done <<< "$native_tools_list"
+ IFS=$old_IFS
+
+ return 0;
+}
+
+native_base_dir=$install_directory
+if [[ -z $install_directory ]]; then
+ native_base_dir=$(GetNativeInstallDirectory)
+fi
+
+install_bin="${native_base_dir}/bin"
+
+ReadGlobalJsonNativeTools
+
+if [[ ${#native_assets[@]} -eq 0 ]]; then
+ echo "No native tools defined in global.json"
+ exit 0;
+else
+ native_installer_dir="$scriptroot/native"
+ for tool in "${!native_assets[@]}"
+ do
+ tool_version=${native_assets[$tool]}
+ installer_name="install-$tool.sh"
+ installer_command="$native_installer_dir/$installer_name"
+ installer_command+=" --baseuri $base_uri"
+ installer_command+=" --installpath $install_bin"
+ installer_command+=" --version $tool_version"
+
+ if [[ $force = true ]]; then
+ installer_command+=" --force"
+ fi
+
+ if [[ $clean = true ]]; then
+ installer_command+=" --clean"
+ fi
+
+ echo "Installing $tool version $tool_version"
+ echo "Executing '$installer_command'"
+ $installer_command
+
+ if [[ $? != 0 ]]; then
+ echo "Execution Failed" >&2
+ exit 1
+ fi
+ done
+fi
+
+if [[ ! -z $clean ]]; then
+ exit 0
+fi
+
+if [[ -d $install_bin ]]; then
+ echo "Native tools are available from $install_bin"
+ if [[ !-z BUILD_BUILDNUMBER ]]; then
+ echo "##vso[task.prependpath]$install_bin"
+ fi
+else
+ echo "Native tools install directory does not exist, installation failed" >&2
+ exit 1
+fi
+
+exit 0
+
diff --git a/eng/common/msbuild.ps1 b/eng/common/msbuild.ps1
new file mode 100644
index 0000000000..b37fd3d5e9
--- /dev/null
+++ b/eng/common/msbuild.ps1
@@ -0,0 +1,27 @@
+[CmdletBinding(PositionalBinding=$false)]
+Param(
+ [string] $verbosity = "minimal",
+ [bool] $warnAsError = $true,
+ [bool] $nodeReuse = $true,
+ [switch] $ci,
+ [switch] $prepareMachine,
+ [Parameter(ValueFromRemainingArguments=$true)][String[]]$extraArgs
+)
+
+. $PSScriptRoot\tools.ps1
+
+try {
+ if ($ci) {
+ $nodeReuse = $false
+ }
+
+ MSBuild @extraArgs
+}
+catch {
+ Write-Host $_
+ Write-Host $_.Exception
+ Write-Host $_.ScriptStackTrace
+ ExitWithExitCode 1
+}
+
+ExitWithExitCode 0
\ No newline at end of file
diff --git a/eng/common/msbuild.sh b/eng/common/msbuild.sh
new file mode 100755
index 0000000000..8160cd5a59
--- /dev/null
+++ b/eng/common/msbuild.sh
@@ -0,0 +1,58 @@
+#!/usr/bin/env bash
+
+source="${BASH_SOURCE[0]}"
+
+# resolve $source until the file is no longer a symlink
+while [[ -h "$source" ]]; do
+ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+ source="$(readlink "$source")"
+ # if $source was a relative symlink, we need to resolve it relative to the path where the
+ # symlink file was located
+ [[ $source != /* ]] && source="$scriptroot/$source"
+done
+scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+
+verbosity='minimal'
+warn_as_error=true
+node_reuse=true
+prepare_machine=false
+extra_args=''
+
+while (($# > 0)); do
+ lowerI="$(echo $1 | awk '{print tolower($0)}')"
+ case $lowerI in
+ --verbosity)
+ verbosity=$2
+ shift 2
+ ;;
+ --warnaserror)
+ warn_as_error=$2
+ shift 2
+ ;;
+ --nodereuse)
+ node_reuse=$2
+ shift 2
+ ;;
+ --ci)
+ ci=true
+ shift 1
+ ;;
+ --preparemachine)
+ prepare_machine=true
+ shift 1
+ ;;
+ *)
+ extra_args="$extra_args $1"
+ shift 1
+ ;;
+ esac
+done
+
+. "$scriptroot/tools.sh"
+
+if [[ "$ci" == true ]]; then
+ node_reuse=false
+fi
+
+MSBuild $extra_args
+ExitWithExitCode 0
diff --git a/eng/common/native/CommonLibrary.psm1 b/eng/common/native/CommonLibrary.psm1
new file mode 100644
index 0000000000..f286ae0cde
--- /dev/null
+++ b/eng/common/native/CommonLibrary.psm1
@@ -0,0 +1,358 @@
+<#
+.SYNOPSIS
+Helper module to install an archive to a directory
+
+.DESCRIPTION
+Helper module to download and extract an archive to a specified directory
+
+.PARAMETER Uri
+Uri of artifact to download
+
+.PARAMETER InstallDirectory
+Directory to extract artifact contents to
+
+.PARAMETER Force
+Force download / extraction if file or contents already exist. Default = False
+
+.PARAMETER DownloadRetries
+Total number of retry attempts. Default = 5
+
+.PARAMETER RetryWaitTimeInSeconds
+Wait time between retry attempts in seconds. Default = 30
+
+.NOTES
+Returns False if download or extraction fail, True otherwise
+#>
+function DownloadAndExtract {
+ [CmdletBinding(PositionalBinding=$false)]
+ Param (
+ [Parameter(Mandatory=$True)]
+ [string] $Uri,
+ [Parameter(Mandatory=$True)]
+ [string] $InstallDirectory,
+ [switch] $Force = $False,
+ [int] $DownloadRetries = 5,
+ [int] $RetryWaitTimeInSeconds = 30
+ )
+ # Define verbose switch if undefined
+ $Verbose = $VerbosePreference -Eq "Continue"
+
+ $TempToolPath = CommonLibrary\Get-TempPathFilename -Path $Uri
+
+ # Download native tool
+ $DownloadStatus = CommonLibrary\Get-File -Uri $Uri `
+ -Path $TempToolPath `
+ -DownloadRetries $DownloadRetries `
+ -RetryWaitTimeInSeconds $RetryWaitTimeInSeconds `
+ -Force:$Force `
+ -Verbose:$Verbose
+
+ if ($DownloadStatus -Eq $False) {
+ Write-Error "Download failed"
+ return $False
+ }
+
+ # Extract native tool
+ $UnzipStatus = CommonLibrary\Expand-Zip -ZipPath $TempToolPath `
+ -OutputDirectory $InstallDirectory `
+ -Force:$Force `
+ -Verbose:$Verbose
+
+ if ($UnzipStatus -Eq $False) {
+ Write-Error "Unzip failed"
+ return $False
+ }
+ return $True
+}
+
+<#
+.SYNOPSIS
+Download a file, retry on failure
+
+.DESCRIPTION
+Download specified file and retry if attempt fails
+
+.PARAMETER Uri
+Uri of file to download. If Uri is a local path, the file will be copied instead of downloaded
+
+.PARAMETER Path
+Path to download or copy uri file to
+
+.PARAMETER Force
+Overwrite existing file if present. Default = False
+
+.PARAMETER DownloadRetries
+Total number of retry attempts. Default = 5
+
+.PARAMETER RetryWaitTimeInSeconds
+Wait time between retry attempts in seconds Default = 30
+
+#>
+function Get-File {
+ [CmdletBinding(PositionalBinding=$false)]
+ Param (
+ [Parameter(Mandatory=$True)]
+ [string] $Uri,
+ [Parameter(Mandatory=$True)]
+ [string] $Path,
+ [int] $DownloadRetries = 5,
+ [int] $RetryWaitTimeInSeconds = 30,
+ [switch] $Force = $False
+ )
+ $Attempt = 0
+
+ if ($Force) {
+ if (Test-Path $Path) {
+ Remove-Item $Path -Force
+ }
+ }
+ if (Test-Path $Path) {
+ Write-Host "File '$Path' already exists, skipping download"
+ return $True
+ }
+
+ $DownloadDirectory = Split-Path -ErrorAction Ignore -Path "$Path" -Parent
+ if (-Not (Test-Path $DownloadDirectory)) {
+ New-Item -path $DownloadDirectory -force -itemType "Directory" | Out-Null
+ }
+
+ if (Test-Path -IsValid -Path $Uri) {
+ Write-Verbose "'$Uri' is a file path, copying file to '$Path'"
+ Copy-Item -Path $Uri -Destination $Path
+ return $?
+ }
+ else {
+ Write-Verbose "Downloading $Uri"
+ while($Attempt -Lt $DownloadRetries)
+ {
+ try {
+ Invoke-WebRequest -UseBasicParsing -Uri $Uri -OutFile $Path
+ Write-Verbose "Downloaded to '$Path'"
+ return $True
+ }
+ catch {
+ $Attempt++
+ if ($Attempt -Lt $DownloadRetries) {
+ $AttemptsLeft = $DownloadRetries - $Attempt
+ Write-Warning "Download failed, $AttemptsLeft attempts remaining, will retry in $RetryWaitTimeInSeconds seconds"
+ Start-Sleep -Seconds $RetryWaitTimeInSeconds
+ }
+ else {
+ Write-Error $_
+ Write-Error $_.Exception
+ }
+ }
+ }
+ }
+
+ return $False
+}
+
+<#
+.SYNOPSIS
+Generate a shim for a native tool
+
+.DESCRIPTION
+Creates a wrapper script (shim) that passes arguments forward to native tool assembly
+
+.PARAMETER ShimName
+The name of the shim
+
+.PARAMETER ShimDirectory
+The directory where shims are stored
+
+.PARAMETER ToolFilePath
+Path to file that shim forwards to
+
+.PARAMETER Force
+Replace shim if already present. Default = False
+
+.NOTES
+Returns $True if generating shim succeeds, $False otherwise
+#>
+function New-ScriptShim {
+ [CmdletBinding(PositionalBinding=$false)]
+ Param (
+ [Parameter(Mandatory=$True)]
+ [string] $ShimName,
+ [Parameter(Mandatory=$True)]
+ [string] $ShimDirectory,
+ [Parameter(Mandatory=$True)]
+ [string] $ToolFilePath,
+ [Parameter(Mandatory=$True)]
+ [string] $BaseUri,
+ [switch] $Force
+ )
+ try {
+ Write-Verbose "Generating '$ShimName' shim"
+
+ if (-Not (Test-Path $ToolFilePath)){
+ Write-Error "Specified tool file path '$ToolFilePath' does not exist"
+ return $False
+ }
+
+ # WinShimmer is a small .NET Framework program that creates .exe shims to bootstrapped programs
+ # Many of the checks for installed programs expect a .exe extension for Windows tools, rather
+ # than a .bat or .cmd file.
+ # Source: https://github.com/dotnet/arcade/tree/master/src/WinShimmer
+ if (-Not (Test-Path "$ShimDirectory\WinShimmer\winshimmer.exe")) {
+ $InstallStatus = DownloadAndExtract -Uri "$BaseUri/windows/winshimmer/WinShimmer.zip" `
+ -InstallDirectory $ShimDirectory\WinShimmer `
+ -Force:$Force `
+ -DownloadRetries 2 `
+ -RetryWaitTimeInSeconds 5 `
+ -Verbose:$Verbose
+ }
+
+ if ((Test-Path (Join-Path $ShimDirectory "$ShimName.exe"))) {
+ Write-Host "$ShimName.exe already exists; replacing..."
+ Remove-Item (Join-Path $ShimDirectory "$ShimName.exe")
+ }
+
+ Invoke-Expression "$ShimDirectory\WinShimmer\winshimmer.exe $ShimName $ToolFilePath $ShimDirectory"
+ return $True
+ }
+ catch {
+ Write-Host $_
+ Write-Host $_.Exception
+ return $False
+ }
+}
+
+<#
+.SYNOPSIS
+Returns the machine architecture of the host machine
+
+.NOTES
+Returns 'x64' on 64 bit machines
+ Returns 'x86' on 32 bit machines
+#>
+function Get-MachineArchitecture {
+ $ProcessorArchitecture = $Env:PROCESSOR_ARCHITECTURE
+ $ProcessorArchitectureW6432 = $Env:PROCESSOR_ARCHITEW6432
+ if($ProcessorArchitecture -Eq "X86")
+ {
+ if(($ProcessorArchitectureW6432 -Eq "") -Or
+ ($ProcessorArchitectureW6432 -Eq "X86")) {
+ return "x86"
+ }
+ $ProcessorArchitecture = $ProcessorArchitectureW6432
+ }
+ if (($ProcessorArchitecture -Eq "AMD64") -Or
+ ($ProcessorArchitecture -Eq "IA64") -Or
+ ($ProcessorArchitecture -Eq "ARM64")) {
+ return "x64"
+ }
+ return "x86"
+}
+
+<#
+.SYNOPSIS
+Get the name of a temporary folder under the native install directory
+#>
+function Get-TempDirectory {
+ return Join-Path (Get-NativeInstallDirectory) "temp/"
+}
+
+function Get-TempPathFilename {
+ [CmdletBinding(PositionalBinding=$false)]
+ Param (
+ [Parameter(Mandatory=$True)]
+ [string] $Path
+ )
+ $TempDir = CommonLibrary\Get-TempDirectory
+ $TempFilename = Split-Path $Path -leaf
+ $TempPath = Join-Path $TempDir $TempFilename
+ return $TempPath
+}
+
+<#
+.SYNOPSIS
+Returns the base directory to use for native tool installation
+
+.NOTES
+Returns the value of the NETCOREENG_INSTALL_DIRECTORY if that environment variable
+is set, or otherwise returns an install directory under the %USERPROFILE%
+#>
+function Get-NativeInstallDirectory {
+ $InstallDir = $Env:NETCOREENG_INSTALL_DIRECTORY
+ if (!$InstallDir) {
+ $InstallDir = Join-Path $Env:USERPROFILE ".netcoreeng/native/"
+ }
+ return $InstallDir
+}
+
+<#
+.SYNOPSIS
+Unzip an archive
+
+.DESCRIPTION
+Powershell module to unzip an archive to a specified directory
+
+.PARAMETER ZipPath (Required)
+Path to archive to unzip
+
+.PARAMETER OutputDirectory (Required)
+Output directory for archive contents
+
+.PARAMETER Force
+Overwrite output directory contents if they already exist
+
+.NOTES
+- Returns True and does not perform an extraction if output directory already exists but Overwrite is not True.
+- Returns True if unzip operation is successful
+- Returns False if Overwrite is True and it is unable to remove contents of OutputDirectory
+- Returns False if unable to extract zip archive
+#>
+function Expand-Zip {
+ [CmdletBinding(PositionalBinding=$false)]
+ Param (
+ [Parameter(Mandatory=$True)]
+ [string] $ZipPath,
+ [Parameter(Mandatory=$True)]
+ [string] $OutputDirectory,
+ [switch] $Force
+ )
+
+ Write-Verbose "Extracting '$ZipPath' to '$OutputDirectory'"
+ try {
+ if ((Test-Path $OutputDirectory) -And (-Not $Force)) {
+ Write-Host "Directory '$OutputDirectory' already exists, skipping extract"
+ return $True
+ }
+ if (Test-Path $OutputDirectory) {
+ Write-Verbose "'Force' is 'True', but '$OutputDirectory' exists, removing directory"
+ Remove-Item $OutputDirectory -Force -Recurse
+ if ($? -Eq $False) {
+ Write-Error "Unable to remove '$OutputDirectory'"
+ return $False
+ }
+ }
+ if (-Not (Test-Path $OutputDirectory)) {
+ New-Item -path $OutputDirectory -Force -itemType "Directory" | Out-Null
+ }
+
+ Add-Type -assembly "system.io.compression.filesystem"
+ [io.compression.zipfile]::ExtractToDirectory("$ZipPath", "$OutputDirectory")
+ if ($? -Eq $False) {
+ Write-Error "Unable to extract '$ZipPath'"
+ return $False
+ }
+ }
+ catch {
+ Write-Host $_
+ Write-Host $_.Exception
+
+ return $False
+ }
+ return $True
+}
+
+export-modulemember -function DownloadAndExtract
+export-modulemember -function Expand-Zip
+export-modulemember -function Get-File
+export-modulemember -function Get-MachineArchitecture
+export-modulemember -function Get-NativeInstallDirectory
+export-modulemember -function Get-TempDirectory
+export-modulemember -function Get-TempPathFilename
+export-modulemember -function New-ScriptShim
diff --git a/eng/common/native/common-library.sh b/eng/common/native/common-library.sh
new file mode 100755
index 0000000000..271bddfac5
--- /dev/null
+++ b/eng/common/native/common-library.sh
@@ -0,0 +1,168 @@
+#!/usr/bin/env bash
+
+function GetNativeInstallDirectory {
+ local install_dir
+
+ if [[ -z $NETCOREENG_INSTALL_DIRECTORY ]]; then
+ install_dir=$HOME/.netcoreeng/native/
+ else
+ install_dir=$NETCOREENG_INSTALL_DIRECTORY
+ fi
+
+ echo $install_dir
+ return 0
+}
+
+function GetTempDirectory {
+
+ echo $(GetNativeInstallDirectory)temp/
+ return 0
+}
+
+function ExpandZip {
+ local zip_path=$1
+ local output_directory=$2
+ local force=${3:-false}
+
+ echo "Extracting $zip_path to $output_directory"
+ if [[ -d $output_directory ]] && [[ $force = false ]]; then
+ echo "Directory '$output_directory' already exists, skipping extract"
+ return 0
+ fi
+
+ if [[ -d $output_directory ]]; then
+ echo "'Force flag enabled, but '$output_directory' exists. Removing directory"
+ rm -rf $output_directory
+ if [[ $? != 0 ]]; then
+ echo Unable to remove '$output_directory'>&2
+ return 1
+ fi
+ fi
+
+ echo "Creating directory: '$output_directory'"
+ mkdir -p $output_directory
+
+ echo "Extracting archive"
+ tar -xf $zip_path -C $output_directory
+ if [[ $? != 0 ]]; then
+ echo "Unable to extract '$zip_path'" >&2
+ return 1
+ fi
+
+ return 0
+}
+
+function GetCurrentOS {
+ local unameOut="$(uname -s)"
+ case $unameOut in
+ Linux*) echo "Linux";;
+ Darwin*) echo "MacOS";;
+ esac
+ return 0
+}
+
+function GetFile {
+ local uri=$1
+ local path=$2
+ local force=${3:-false}
+ local download_retries=${4:-5}
+ local retry_wait_time_seconds=${5:-30}
+
+ if [[ -f $path ]]; then
+ if [[ $force = false ]]; then
+ echo "File '$path' already exists. Skipping download"
+ return 0
+ else
+ rm -rf $path
+ fi
+ fi
+
+ if [[ -f $uri ]]; then
+ echo "'$uri' is a file path, copying file to '$path'"
+ cp $uri $path
+ return $?
+ fi
+
+ echo "Downloading $uri"
+ # Use curl if available, otherwise use wget
+ if command -v curl > /dev/null; then
+ curl "$uri" -sSL --retry $download_retries --retry-delay $retry_wait_time_seconds --create-dirs -o "$path" --fail
+ else
+ wget -q -O "$path" "$uri" --tries="$download_retries"
+ fi
+
+ return $?
+}
+
+function GetTempPathFileName {
+ local path=$1
+
+ local temp_dir=$(GetTempDirectory)
+ local temp_file_name=$(basename $path)
+ echo $temp_dir$temp_file_name
+ return 0
+}
+
+function DownloadAndExtract {
+ local uri=$1
+ local installDir=$2
+ local force=${3:-false}
+ local download_retries=${4:-5}
+ local retry_wait_time_seconds=${5:-30}
+
+ local temp_tool_path=$(GetTempPathFileName $uri)
+
+ echo "downloading to: $temp_tool_path"
+
+ # Download file
+ GetFile "$uri" "$temp_tool_path" $force $download_retries $retry_wait_time_seconds
+ if [[ $? != 0 ]]; then
+ echo "Failed to download '$uri' to '$temp_tool_path'." >&2
+ return 1
+ fi
+
+ # Extract File
+ echo "extracting from $temp_tool_path to $installDir"
+ ExpandZip "$temp_tool_path" "$installDir" $force $download_retries $retry_wait_time_seconds
+ if [[ $? != 0 ]]; then
+ echo "Failed to extract '$temp_tool_path' to '$installDir'." >&2
+ return 1
+ fi
+
+ return 0
+}
+
+function NewScriptShim {
+ local shimpath=$1
+ local tool_file_path=$2
+ local force=${3:-false}
+
+ echo "Generating '$shimpath' shim"
+ if [[ -f $shimpath ]]; then
+ if [[ $force = false ]]; then
+ echo "File '$shimpath' already exists." >&2
+ return 1
+ else
+ rm -rf $shimpath
+ fi
+ fi
+
+ if [[ ! -f $tool_file_path ]]; then
+ echo "Specified tool file path:'$tool_file_path' does not exist" >&2
+ return 1
+ fi
+
+ local shim_contents=$'#!/usr/bin/env bash\n'
+ shim_contents+="SHIMARGS="$'$1\n'
+ shim_contents+="$tool_file_path"$' $SHIMARGS\n'
+
+ # Write shim file
+ echo "$shim_contents" > $shimpath
+
+ chmod +x $shimpath
+
+ echo "Finished generating shim '$shimpath'"
+
+ return $?
+}
+
diff --git a/eng/common/native/install-cmake.sh b/eng/common/native/install-cmake.sh
new file mode 100755
index 0000000000..293af6017d
--- /dev/null
+++ b/eng/common/native/install-cmake.sh
@@ -0,0 +1,117 @@
+#!/usr/bin/env bash
+
+source="${BASH_SOURCE[0]}"
+scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+
+. $scriptroot/common-library.sh
+
+base_uri=
+install_path=
+version=
+clean=false
+force=false
+download_retries=5
+retry_wait_time_seconds=30
+
+while (($# > 0)); do
+ lowerI="$(echo $1 | awk '{print tolower($0)}')"
+ case $lowerI in
+ --baseuri)
+ base_uri=$2
+ shift 2
+ ;;
+ --installpath)
+ install_path=$2
+ shift 2
+ ;;
+ --version)
+ version=$2
+ shift 2
+ ;;
+ --clean)
+ clean=true
+ shift 1
+ ;;
+ --force)
+ force=true
+ shift 1
+ ;;
+ --downloadretries)
+ download_retries=$2
+ shift 2
+ ;;
+ --retrywaittimeseconds)
+ retry_wait_time_seconds=$2
+ shift 2
+ ;;
+ --help)
+ echo "Common settings:"
+ echo " --baseuri Base file directory or Url wrom which to acquire tool archives"
+ echo " --installpath Base directory to install native tool to"
+ echo " --clean Don't install the tool, just clean up the current install of the tool"
+ echo " --force Force install of tools even if they previously exist"
+ echo " --help Print help and exit"
+ echo ""
+ echo "Advanced settings:"
+ echo " --downloadretries Total number of retry attempts"
+ echo " --retrywaittimeseconds Wait time between retry attempts in seconds"
+ echo ""
+ exit 0
+ ;;
+ esac
+done
+
+tool_name="cmake"
+tool_os=$(GetCurrentOS)
+tool_folder=$(echo $tool_os | awk '{print tolower($0)}')
+tool_arch="x86_64"
+tool_name_moniker="$tool_name-$version-$tool_os-$tool_arch"
+tool_install_directory="$install_path/$tool_name/$version"
+tool_file_path="$tool_install_directory/$tool_name_moniker/bin/$tool_name"
+shim_path="$install_path/$tool_name.sh"
+uri="${base_uri}/$tool_folder/cmake/$tool_name_moniker.tar.gz"
+
+# Clean up tool and installers
+if [[ $clean = true ]]; then
+ echo "Cleaning $tool_install_directory"
+ if [[ -d $tool_install_directory ]]; then
+ rm -rf $tool_install_directory
+ fi
+
+ echo "Cleaning $shim_path"
+ if [[ -f $shim_path ]]; then
+ rm -rf $shim_path
+ fi
+
+ tool_temp_path=$(GetTempPathFileName $uri)
+ echo "Cleaning $tool_temp_path"
+ if [[ -f $tool_temp_path ]]; then
+ rm -rf $tool_temp_path
+ fi
+
+ exit 0
+fi
+
+# Install tool
+if [[ -f $tool_file_path ]] && [[ $force = false ]]; then
+ echo "$tool_name ($version) already exists, skipping install"
+ exit 0
+fi
+
+DownloadAndExtract $uri $tool_install_directory $force $download_retries $retry_wait_time_seconds
+
+if [[ $? != 0 ]]; then
+ echo "Installation failed" >&2
+ exit 1
+fi
+
+# Generate Shim
+# Always rewrite shims so that we are referencing the expected version
+NewScriptShim $shim_path $tool_file_path true
+
+if [[ $? != 0 ]]; then
+ echo "Shim generation failed" >&2
+ exit 1
+fi
+
+exit 0
\ No newline at end of file
diff --git a/eng/common/native/install-tool.ps1 b/eng/common/native/install-tool.ps1
new file mode 100644
index 0000000000..635ab3fd41
--- /dev/null
+++ b/eng/common/native/install-tool.ps1
@@ -0,0 +1,130 @@
+<#
+.SYNOPSIS
+Install native tool
+
+.DESCRIPTION
+Install cmake native tool from Azure blob storage
+
+.PARAMETER InstallPath
+Base directory to install native tool to
+
+.PARAMETER BaseUri
+Base file directory or Url from which to acquire tool archives
+
+.PARAMETER CommonLibraryDirectory
+Path to folder containing common library modules
+
+.PARAMETER Force
+Force install of tools even if they previously exist
+
+.PARAMETER Clean
+Don't install the tool, just clean up the current install of the tool
+
+.PARAMETER DownloadRetries
+Total number of retry attempts
+
+.PARAMETER RetryWaitTimeInSeconds
+Wait time between retry attempts in seconds
+
+.NOTES
+Returns 0 if install succeeds, 1 otherwise
+#>
+[CmdletBinding(PositionalBinding=$false)]
+Param (
+ [Parameter(Mandatory=$True)]
+ [string] $ToolName,
+ [Parameter(Mandatory=$True)]
+ [string] $InstallPath,
+ [Parameter(Mandatory=$True)]
+ [string] $BaseUri,
+ [Parameter(Mandatory=$True)]
+ [string] $Version,
+ [string] $CommonLibraryDirectory = $PSScriptRoot,
+ [switch] $Force = $False,
+ [switch] $Clean = $False,
+ [int] $DownloadRetries = 5,
+ [int] $RetryWaitTimeInSeconds = 30
+)
+
+# Import common library modules
+Import-Module -Name (Join-Path $CommonLibraryDirectory "CommonLibrary.psm1")
+
+try {
+ # Define verbose switch if undefined
+ $Verbose = $VerbosePreference -Eq "Continue"
+
+ $Arch = CommonLibrary\Get-MachineArchitecture
+ $ToolOs = "win64"
+ if($Arch -Eq "x32") {
+ $ToolOs = "win32"
+ }
+ $ToolNameMoniker = "$ToolName-$Version-$ToolOs-$Arch"
+ $ToolInstallDirectory = Join-Path $InstallPath "$ToolName\$Version\"
+ $Uri = "$BaseUri/windows/$ToolName/$ToolNameMoniker.zip"
+ $ShimPath = Join-Path $InstallPath "$ToolName.exe"
+
+ if ($Clean) {
+ Write-Host "Cleaning $ToolInstallDirectory"
+ if (Test-Path $ToolInstallDirectory) {
+ Remove-Item $ToolInstallDirectory -Force -Recurse
+ }
+ Write-Host "Cleaning $ShimPath"
+ if (Test-Path $ShimPath) {
+ Remove-Item $ShimPath -Force
+ }
+ $ToolTempPath = CommonLibrary\Get-TempPathFilename -Path $Uri
+ Write-Host "Cleaning $ToolTempPath"
+ if (Test-Path $ToolTempPath) {
+ Remove-Item $ToolTempPath -Force
+ }
+ exit 0
+ }
+
+ # Install tool
+ if ((Test-Path $ToolInstallDirectory) -And (-Not $Force)) {
+ Write-Verbose "$ToolName ($Version) already exists, skipping install"
+ }
+ else {
+ $InstallStatus = CommonLibrary\DownloadAndExtract -Uri $Uri `
+ -InstallDirectory $ToolInstallDirectory `
+ -Force:$Force `
+ -DownloadRetries $DownloadRetries `
+ -RetryWaitTimeInSeconds $RetryWaitTimeInSeconds `
+ -Verbose:$Verbose
+
+ if ($InstallStatus -Eq $False) {
+ Write-Error "Installation failed"
+ exit 1
+ }
+ }
+
+ $ToolFilePath = Get-ChildItem $ToolInstallDirectory -Recurse -Filter "$ToolName.exe" | % { $_.FullName }
+ if (@($ToolFilePath).Length -Gt 1) {
+ Write-Error "There are multiple copies of $ToolName in $($ToolInstallDirectory): `n$(@($ToolFilePath | out-string))"
+ exit 1
+ } elseif (@($ToolFilePath).Length -Lt 1) {
+ Write-Error "$ToolName was not found in $ToolFilePath."
+ exit 1
+ }
+
+ # Generate shim
+ # Always rewrite shims so that we are referencing the expected version
+ $GenerateShimStatus = CommonLibrary\New-ScriptShim -ShimName $ToolName `
+ -ShimDirectory $InstallPath `
+ -ToolFilePath "$ToolFilePath" `
+ -BaseUri $BaseUri `
+ -Force:$Force `
+ -Verbose:$Verbose
+
+ if ($GenerateShimStatus -Eq $False) {
+ Write-Error "Generate shim failed"
+ return 1
+ }
+
+ exit 0
+}
+catch {
+ Write-Host $_
+ Write-Host $_.Exception
+ exit 1
+}
diff --git a/eng/common/sdk-task.ps1 b/eng/common/sdk-task.ps1
new file mode 100644
index 0000000000..9ba7530122
--- /dev/null
+++ b/eng/common/sdk-task.ps1
@@ -0,0 +1,74 @@
+[CmdletBinding(PositionalBinding=$false)]
+Param(
+ [string] $projects = "",
+ [string][Alias('v')]$verbosity = "minimal",
+ [string] $msbuildEngine = $null,
+ [bool] $warnAsError = $true,
+ [switch][Alias('bl')]$binaryLog,
+ [switch][Alias('r')]$restore,
+ [switch] $ci,
+ [switch] $prepareMachine,
+ [switch] $help,
+ [Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
+)
+
+. $PSScriptRoot\tools.ps1
+
+function Print-Usage() {
+ Write-Host "Common settings:"
+ Write-Host " -v[erbosity] Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]"
+ Write-Host " -[bl|binaryLog] Output binary log (short: -bl)"
+ Write-Host " -help Print help and exit"
+ Write-Host ""
+
+ Write-Host "Advanced settings:"
+ Write-Host " -restore Restore dependencies (short: -r)"
+ Write-Host " -projects Semi-colon delimited list of sln/proj's from the Arcade sdk to build. Globbing is supported (*.sln)"
+ Write-Host " -ci Set when running on CI server"
+ Write-Host " -prepareMachine Prepare machine for CI run"
+ Write-Host " -msbuildEngine Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
+ Write-Host ""
+ Write-Host "Command line arguments not listed above are passed thru to msbuild."
+ Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)."
+}
+
+function Build {
+ $toolsetBuildProj = InitializeToolset
+
+ $toolsetBuildProj = Join-Path (Split-Path $toolsetBuildProj -Parent) "SdkTasks\SdkTask.proj"
+ $bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "SdkTask.binlog") } else { "" }
+ MSBuild $toolsetBuildProj `
+ $bl `
+ /p:Projects=$projects `
+ /p:Restore=$restore `
+ /p:RepoRoot=$RepoRoot `
+ /p:ContinuousIntegrationBuild=$ci `
+ @properties
+}
+
+try {
+ if ($help -or (($null -ne $properties) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
+ Print-Usage
+ exit 0
+ }
+
+ if ($projects -eq "") {
+ Write-Error "Missing required parameter '-projects '"
+ Print-Usage
+ ExitWithExitCode 1
+ }
+
+ if ($ci) {
+ $binaryLog = $true
+ }
+
+ Build
+}
+catch {
+ Write-Host $_
+ Write-Host $_.Exception
+ Write-Host $_.ScriptStackTrace
+ ExitWithExitCode 1
+}
+
+ExitWithExitCode 0
diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml
new file mode 100644
index 0000000000..5e293db35d
--- /dev/null
+++ b/eng/common/templates/job/job.yml
@@ -0,0 +1,205 @@
+parameters:
+# Job schema parameters - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job
+ cancelTimeoutInMinutes: ''
+
+ condition: ''
+
+ continueOnError: false
+
+ container: ''
+
+ dependsOn: ''
+
+ displayName: ''
+
+ steps: []
+
+ pool: ''
+
+ strategy: ''
+
+ timeoutInMinutes: ''
+
+ variables: []
+
+ workspace: ''
+
+# Job base template specific parameters
+ # Optional: Enable installing Microbuild plugin
+ # if 'true', these "variables" must be specified in the variables object or as part of the queue matrix
+ # _TeamName - the name of your team
+ # _SignType - 'test' or 'real'
+ enableMicrobuild: false
+
+ # Optional: Include PublishBuildArtifacts task
+ enablePublishBuildArtifacts: false
+
+ # Optional: Enable publishing to the build asset registry
+ enablePublishBuildAssets: false
+
+ # Optional: Include PublishTestResults task
+ enablePublishTestResults: false
+
+ # Optional: enable sending telemetry
+ # if 'true', these "variables" must be specified in the variables object or as part of the queue matrix
+ # _HelixBuildConfig - differentiate between Debug, Release, other
+ # _HelixType - Example: build/product/
+ # _HelixSource - Example: official/dotnet/arcade/$(Build.SourceBranch)
+ enableTelemetry: false
+
+ # Optional: If specified, then automatically derive "_HelixSource" variable for telemetry
+ helixRepo: ''
+
+ # Optional: Define the type for helix telemetry (must end in '/')
+ helixType: build/product/
+
+ # Required: name of the job
+ name: ''
+
+ # Optional: should run as a public build even in the internal project
+ # if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects.
+ runAsPublic: false
+
+# Internal resources (telemetry, microbuild) can only be accessed from non-public projects,
+# and some (Microbuild) should only be applied to non-PR cases for internal builds.
+
+jobs:
+- job: ${{ parameters.name }}
+
+ ${{ if ne(parameters.cancelTimeoutInMinutes, '') }}:
+ cancelTimeoutInMinutes: ${{ parameters.cancelTimeoutInMinutes }}
+
+ ${{ if ne(parameters.condition, '') }}:
+ condition: ${{ parameters.condition }}
+
+ ${{ if ne(parameters.container, '') }}:
+ container: ${{ parameters.container }}
+
+ ${{ if ne(parameters.continueOnError, '') }}:
+ continueOnError: ${{ parameters.continueOnError }}
+
+ ${{ if ne(parameters.dependsOn, '') }}:
+ dependsOn: ${{ parameters.dependsOn }}
+
+ ${{ if ne(parameters.displayName, '') }}:
+ displayName: ${{ parameters.displayName }}
+
+ ${{ if ne(parameters.pool, '') }}:
+ pool: ${{ parameters.pool }}
+
+ ${{ if ne(parameters.strategy, '') }}:
+ strategy: ${{ parameters.strategy }}
+
+ ${{ if ne(parameters.timeoutInMinutes, '') }}:
+ timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
+
+ variables:
+ - ${{ each variable in parameters.variables }}:
+ # handle name-value variable syntax
+ # example:
+ # - name: [key]
+ # value: [value]
+ - ${{ if ne(variable.name, '') }}:
+ - name: ${{ variable.name }}
+ value: ${{ variable.value }}
+
+ # handle variable groups
+ - ${{ if ne(variable.group, '') }}:
+ - group: ${{ variable.group }}
+
+ # handle key-value variable syntax.
+ # example:
+ # - [key]: [value]
+ - ${{ if and(eq(variable.name, ''), eq(variable.group, '')) }}:
+ - ${{ each pair in variable }}:
+ - name: ${{ pair.key }}
+ value: ${{ pair.value }}
+
+ # Add additional variables
+ - ${{ if and(ne(parameters.helixRepo, ''), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}:
+ - name: _HelixSource
+ value: official/${{ parameters.helixRepo }}/$(Build.SourceBranch)
+ - ${{ if and(ne(parameters.helixRepo, ''), or(ne(parameters.runAsPublic, 'false'), eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest'))) }}:
+ - name: _HelixSource
+ value: pr/${{ parameters.helixRepo }}/$(Build.SourceBranch)
+ - name: _HelixType
+ value: ${{ parameters.helixType }}
+ - name: _HelixBuildConfig
+ value: $(_BuildConfig)
+
+ ${{ if ne(parameters.workspace, '') }}:
+ workspace: ${{ parameters.workspace }}
+
+ steps:
+ - ${{ if eq(parameters.enableTelemetry, 'true') }}:
+ - template: /eng/common/templates/steps/telemetry-start.yml
+ parameters:
+ buildConfig: $(_HelixBuildConfig)
+ helixSource: $(_HelixSource)
+ helixType: $(_HelixType)
+ runAsPublic: ${{ parameters.runAsPublic }}
+
+ - ${{ if eq(parameters.enableMicrobuild, 'true') }}:
+ - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ - task: MicroBuildSigningPlugin@2
+ displayName: Install MicroBuild plugin
+ inputs:
+ signType: $(_SignType)
+ zipSources: false
+ feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
+ env:
+ TeamName: $(_TeamName)
+ continueOnError: ${{ parameters.continueOnError }}
+ condition: and(succeeded(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT'))
+
+ - ${{ each step in parameters.steps }}:
+ - ${{ step }}
+
+ - ${{ if eq(parameters.enableMicrobuild, 'true') }}:
+ - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ - task: MicroBuildCleanup@1
+ displayName: Execute Microbuild cleanup tasks
+ condition: and(always(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT'))
+ continueOnError: ${{ parameters.continueOnError }}
+ env:
+ TeamName: $(_TeamName)
+
+ - ${{ if eq(parameters.enableTelemetry, 'true') }}:
+ - template: /eng/common/templates/steps/telemetry-end.yml
+
+ - ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}:
+ - task: PublishBuildArtifacts@1
+ displayName: Publish Logs to VSTS
+ inputs:
+ PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)'
+ PublishLocation: Container
+ ArtifactName: $(Agent.Os)_$(Agent.JobName)
+ continueOnError: true
+ condition: always()
+
+ - ${{ if eq(parameters.enablePublishTestResults, 'true') }}:
+ - task: PublishTestResults@2
+ displayName: Publish Test Results
+ inputs:
+ testResultsFormat: 'xUnit'
+ testResultsFiles: '*.xml'
+ searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
+ continueOnError: true
+ condition: always()
+
+ - ${{ if and(eq(parameters.enablePublishBuildAssets, true), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ - task: CopyFiles@2
+ displayName: Gather Asset Manifests
+ inputs:
+ SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/AssetManifest'
+ TargetFolder: '$(Build.StagingDirectory)/AssetManifests'
+ continueOnError: ${{ parameters.continueOnError }}
+ condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
+ - task: PublishBuildArtifacts@1
+ displayName: Push Asset Manifests
+ inputs:
+ PathtoPublish: '$(Build.StagingDirectory)/AssetManifests'
+ PublishLocation: Container
+ ArtifactName: AssetManifests
+ continueOnError: ${{ parameters.continueOnError }}
+ condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
\ No newline at end of file
diff --git a/eng/common/templates/job/publish-build-assets.yml b/eng/common/templates/job/publish-build-assets.yml
new file mode 100644
index 0000000000..c094658fef
--- /dev/null
+++ b/eng/common/templates/job/publish-build-assets.yml
@@ -0,0 +1,63 @@
+parameters:
+ configuration: 'Debug'
+
+ # Optional: condition for the job to run
+ condition: ''
+
+ # Optional: 'true' if future jobs should run even if this job fails
+ continueOnError: false
+
+ # Optional: dependencies of the job
+ dependsOn: ''
+
+ # Optional: Include PublishBuildArtifacts task
+ enablePublishBuildArtifacts: false
+
+ # Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool
+ pool: {}
+
+ # Optional: should run as a public build even in the internal project
+ # if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects.
+ runAsPublic: false
+
+jobs:
+- job: Asset_Registry_Publish
+
+ dependsOn: ${{ parameters.dependsOn }}
+
+ displayName: Publish to Build Asset Registry
+
+ pool: ${{ parameters.pool }}
+
+ variables:
+ - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ - name: _BuildConfig
+ value: ${{ parameters.configuration }}
+ - group: Publish-Build-Assets
+
+ steps:
+ - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ - task: DownloadBuildArtifacts@0
+ displayName: Download artifact
+ inputs:
+ artifactName: AssetManifests
+ downloadPath: '$(Build.StagingDirectory)/Download'
+ condition: ${{ parameters.condition }}
+ continueOnError: ${{ parameters.continueOnError }}
+ - script: eng\common\publishbuildassets.cmd
+ /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests'
+ /p:BuildAssetRegistryToken=$(MaestroAccessToken)
+ /p:MaestroApiEndpoint=https://maestro-prod.westus2.cloudapp.azure.com
+ /p:Configuration=$(_BuildConfig)
+ displayName: Publish Build Assets
+ condition: ${{ parameters.condition }}
+ continueOnError: ${{ parameters.continueOnError }}
+ - ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}:
+ - task: PublishBuildArtifacts@1
+ displayName: Publish Logs to VSTS
+ inputs:
+ PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)'
+ PublishLocation: Container
+ ArtifactName: $(Agent.Os)_PublishBuildAssets
+ continueOnError: true
+ condition: always()
diff --git a/eng/common/templates/jobs/jobs.yml b/eng/common/templates/jobs/jobs.yml
new file mode 100644
index 0000000000..c7226b12ed
--- /dev/null
+++ b/eng/common/templates/jobs/jobs.yml
@@ -0,0 +1,77 @@
+parameters:
+ # Optional: 'true' if failures in job.yml job should not fail the job
+ continueOnError: false
+
+ # Optional: Enable installing Microbuild plugin
+ # if 'true', these "variables" must be specified in the variables object or as part of the queue matrix
+ # _TeamName - the name of your team
+ # _SignType - 'test' or 'real'
+ enableMicrobuild: false
+
+ # Optional: Include PublishBuildArtifacts task
+ enablePublishBuildArtifacts: false
+
+ # Optional: Enable publishing to the build asset registry
+ enablePublishBuildAssets: false
+
+ # Optional: Include PublishTestResults task
+ enablePublishTestResults: false
+
+ # Optional: enable sending telemetry
+ # if 'true', these "variables" must be specified in the variables object or as part of the queue matrix
+ # _HelixBuildConfig - differentiate between Debug, Release, other
+ # _HelixType - Example: build/product/
+ # _HelixSource - Example: official/dotnet/arcade/$(Build.SourceBranch)
+ enableTelemetry: false
+
+ # Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job
+ jobs: []
+
+ # Optional: If specified, then automatically derive "_HelixSource" variable for telemetry
+ helixRepo: ''
+
+ # Optional: Define the type for helix telemetry (must end in '/')
+ helixType: build/product/
+
+ # Optional: Override automatically derived dependsOn value for "publish build assets" job
+ publishBuildAssetsDependsOn: ''
+
+ # Optional: should run as a public build even in the internal project
+ # if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects.
+ runAsPublic: false
+
+# Internal resources (telemetry, microbuild) can only be accessed from non-public projects,
+# and some (Microbuild) should only be applied to non-PR cases for internal builds.
+
+jobs:
+- ${{ each job in parameters.jobs }}:
+ - template: ../job/job.yml
+ parameters:
+ # pass along parameters
+ ${{ each parameter in parameters }}:
+ ${{ if ne(parameter.key, 'jobs') }}:
+ ${{ parameter.key }}: ${{ parameter.value }}
+
+ # pass along job properties
+ ${{ each property in job }}:
+ ${{ if ne(property.key, 'job') }}:
+ ${{ property.key }}: ${{ property.value }}
+
+ name: ${{ job.job }}
+
+- ${{ if and(eq(parameters.enablePublishBuildAssets, true), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ - template: ../job/publish-build-assets.yml
+ parameters:
+ continueOnError: ${{ parameters.continueOnError }}
+ dependsOn:
+ - ${{ if ne(parameters.publishBuildAssetsDependsOn, '') }}:
+ - ${{ each job in parameters.publishBuildAssetsDependsOn }}:
+ - ${{ job.job }}
+ - ${{ if eq(parameters.publishBuildAssetsDependsOn, '') }}:
+ - ${{ each job in parameters.jobs }}:
+ - ${{ job.job }}
+ pool:
+ vmImage: vs2017-win2016
+ runAsPublic: ${{ parameters.runAsPublic }}
+ enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }}
+
diff --git a/eng/common/templates/phases/base.yml b/eng/common/templates/phases/base.yml
new file mode 100644
index 0000000000..0123cf43b1
--- /dev/null
+++ b/eng/common/templates/phases/base.yml
@@ -0,0 +1,130 @@
+parameters:
+ # Optional: Clean sources before building
+ clean: true
+
+ # Optional: Git fetch depth
+ fetchDepth: ''
+
+ # Optional: name of the phase (not specifying phase name may cause name collisions)
+ name: ''
+ # Optional: display name of the phase
+ displayName: ''
+
+ # Optional: condition for the job to run
+ condition: ''
+
+ # Optional: dependencies of the phase
+ dependsOn: ''
+
+ # Required: A defined YAML queue
+ queue: {}
+
+ # Required: build steps
+ steps: []
+
+ # Optional: variables
+ variables: {}
+
+ # Optional: should run as a public build even in the internal project
+ # if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects.
+ runAsPublic: false
+
+ ## Telemetry variables
+
+ # Optional: enable sending telemetry
+ # if 'true', these "variables" must be specified in the variables object or as part of the queue matrix
+ # _HelixBuildConfig - differentiate between Debug, Release, other
+ # _HelixSource - Example: build/product
+ # _HelixType - Example: official/dotnet/arcade/$(Build.SourceBranch)
+ enableTelemetry: false
+
+ # Optional: Enable installing Microbuild plugin
+ # if 'true', these "variables" must be specified in the variables object or as part of the queue matrix
+ # _TeamName - the name of your team
+ # _SignType - 'test' or 'real'
+ enableMicrobuild: false
+
+# Internal resources (telemetry, microbuild) can only be accessed from non-public projects,
+# and some (Microbuild) should only be applied to non-PR cases for internal builds.
+
+phases:
+- phase: ${{ parameters.name }}
+
+ ${{ if ne(parameters.displayName, '') }}:
+ displayName: ${{ parameters.displayName }}
+
+ ${{ if ne(parameters.condition, '') }}:
+ condition: ${{ parameters.condition }}
+
+ ${{ if ne(parameters.dependsOn, '') }}:
+ dependsOn: ${{ parameters.dependsOn }}
+
+ queue: ${{ parameters.queue }}
+
+ ${{ if ne(parameters.variables, '') }}:
+ variables:
+ ${{ insert }}: ${{ parameters.variables }}
+
+ steps:
+ - checkout: self
+ clean: ${{ parameters.clean }}
+ ${{ if ne(parameters.fetchDepth, '') }}:
+ fetchDepth: ${{ parameters.fetchDepth }}
+
+ - ${{ if eq(parameters.enableTelemetry, 'true') }}:
+ - template: /eng/common/templates/steps/telemetry-start.yml
+ parameters:
+ buildConfig: $(_HelixBuildConfig)
+ helixSource: $(_HelixSource)
+ helixType: $(_HelixType)
+ runAsPublic: ${{ parameters.runAsPublic }}
+
+ - ${{ if eq(parameters.enableMicrobuild, 'true') }}:
+ # Internal only resource, and Microbuild signing shouldn't be applied to PRs.
+ - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ - task: MicroBuildSigningPlugin@2
+ displayName: Install MicroBuild plugin
+ inputs:
+ signType: $(_SignType)
+ zipSources: false
+ feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
+
+ env:
+ TeamName: $(_TeamName)
+ continueOnError: false
+ condition: and(succeeded(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT'))
+
+ # Run provided build steps
+ - ${{ parameters.steps }}
+
+ - ${{ if eq(parameters.enableMicrobuild, 'true') }}:
+ # Internal only resources
+ - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ - task: MicroBuildCleanup@1
+ displayName: Execute Microbuild cleanup tasks
+ condition: and(always(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT'))
+ env:
+ TeamName: $(_TeamName)
+
+ - ${{ if eq(parameters.enableTelemetry, 'true') }}:
+ - template: /eng/common/templates/steps/telemetry-end.yml
+ parameters:
+ helixSource: $(_HelixSource)
+ helixType: $(_HelixType)
+
+ - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ - task: CopyFiles@2
+ displayName: Gather Asset Manifests
+ inputs:
+ SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/AssetManifest'
+ TargetFolder: '$(Build.StagingDirectory)/AssetManifests'
+ continueOnError: false
+ condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
+ - task: PublishBuildArtifacts@1
+ displayName: Push Asset Manifests
+ inputs:
+ PathtoPublish: '$(Build.StagingDirectory)/AssetManifests'
+ PublishLocation: Container
+ ArtifactName: AssetManifests
+ continueOnError: false
+ condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
diff --git a/eng/common/templates/phases/publish-build-assets.yml b/eng/common/templates/phases/publish-build-assets.yml
new file mode 100644
index 0000000000..0df6203b50
--- /dev/null
+++ b/eng/common/templates/phases/publish-build-assets.yml
@@ -0,0 +1,46 @@
+parameters:
+ dependsOn: ''
+ queue: {}
+ configuration: 'Debug'
+ condition: succeeded()
+ continueOnError: false
+ runAsPublic: false
+phases:
+ - phase: Asset_Registry_Publish
+ displayName: Publish to Build Asset Registry
+ dependsOn: ${{ parameters.dependsOn }}
+ queue: ${{ parameters.queue }}
+ variables:
+ _BuildConfig: ${{ parameters.configuration }}
+ steps:
+ - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ - task: DownloadBuildArtifacts@0
+ displayName: Download artifact
+ inputs:
+ artifactName: AssetManifests
+ downloadPath: '$(Build.StagingDirectory)/Download'
+ condition: ${{ parameters.condition }}
+ continueOnError: ${{ parameters.continueOnError }}
+ - task: AzureKeyVault@1
+ inputs:
+ azureSubscription: 'DotNet-Engineering-Services_KeyVault'
+ KeyVaultName: EngKeyVault
+ SecretsFilter: 'MaestroAccessToken'
+ condition: ${{ parameters.condition }}
+ continueOnError: ${{ parameters.continueOnError }}
+ - script: eng\common\publishbuildassets.cmd
+ -configuration $(_BuildConfig)
+ /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests'
+ /p:BuildAssetRegistryToken=$(MaestroAccessToken)
+ /p:MaestroApiEndpoint=https://maestro-prod.westus2.cloudapp.azure.com
+ displayName: Publish Build Assets
+ condition: ${{ parameters.condition }}
+ continueOnError: ${{ parameters.continueOnError }}
+ - task: PublishBuildArtifacts@1
+ displayName: Publish Logs to VSTS
+ inputs:
+ PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)'
+ PublishLocation: Container
+ ArtifactName: $(Agent.Os)_Asset_Registry_Publish
+ continueOnError: true
+ condition: always()
diff --git a/eng/common/templates/steps/build-reason.yml b/eng/common/templates/steps/build-reason.yml
new file mode 100644
index 0000000000..eba58109b5
--- /dev/null
+++ b/eng/common/templates/steps/build-reason.yml
@@ -0,0 +1,12 @@
+# build-reason.yml
+# Description: runs steps if build.reason condition is valid. conditions is a string of valid build reasons
+# to include steps (',' separated).
+parameters:
+ conditions: ''
+ steps: []
+
+steps:
+ - ${{ if and( not(startsWith(parameters.conditions, 'not')), contains(parameters.conditions, variables['build.reason'])) }}:
+ - ${{ parameters.steps }}
+ - ${{ if and( startsWith(parameters.conditions, 'not'), not(contains(parameters.conditions, variables['build.reason']))) }}:
+ - ${{ parameters.steps }}
diff --git a/eng/common/templates/steps/helix-publish.yml b/eng/common/templates/steps/helix-publish.yml
new file mode 100644
index 0000000000..470ab65da0
--- /dev/null
+++ b/eng/common/templates/steps/helix-publish.yml
@@ -0,0 +1,51 @@
+parameters:
+ HelixSource: 'pr/dotnet-github-anon-kaonashi-bot'
+ HelixType: ̓'tests/default'
+ HelixBuild: $(Build.BuildNumber)
+ HelixTargetQueues: ''
+ HelixAccessToken: ''
+ HelixPreCommands: ''
+ HelixPostCommands: ''
+ WorkItemDirectory: ''
+ WorkItemCommand: ''
+ CorrelationPayloadDirectory: ''
+ XUnitProjects: ''
+ XUnitTargetFramework: ''
+ XUnitRunnerVersion: ''
+ IncludeDotNetCli: false
+ DotNetCliPackageType: ''
+ DotNetCliVersion: ''
+ EnableXUnitReporter: false
+ WaitForWorkItemCompletion: true
+ condition: succeeded()
+ continueOnError: false
+
+steps:
+ - task: DotNetCoreCLI@2
+ inputs:
+ command: custom
+ projects: eng/common/helixpublish.proj
+ custom: msbuild
+ arguments: '/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog'
+ displayName: Send job to Helix
+ env:
+ HelixSource: ${{ parameters.HelixSource }}
+ HelixType: ${{ parameters.HelixType }}
+ HelixBuild: ${{ parameters.HelixBuild }}
+ HelixTargetQueues: ${{ parameters.HelixTargetQueues }}
+ HelixAccessToken: ${{ parameters.HelixAccessToken }}
+ HelixPreCommands: ${{ parameters.HelixPreCommands }}
+ HelixPostCommands: ${{ parameters.HelixPostCommands }}
+ WorkItemDirectory: ${{ parameters.WorkItemDirectory }}
+ WorkItemCommand: ${{ parameters.WorkItemCommand }}
+ CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }}
+ XUnitProjects: ${{ parameters.XUnitProjects }}
+ XUnitRuntimeTargetFramework: ${{ parameters.XUnitTargetFramework }}
+ XUnitRunnerVersion: ${{ parameters.XUnitRunnerVersion }}
+ IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }}
+ DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }}
+ DotNetCliVersion: ${{ parameters.DotNetCliVersion }}
+ EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }}
+ WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }}
+ condition: ${{ parameters.condition }}
+ continueOnError: ${{ parameters.continueOnError }}
diff --git a/eng/common/templates/steps/run-on-unix.yml b/eng/common/templates/steps/run-on-unix.yml
new file mode 100644
index 0000000000..e1733814f6
--- /dev/null
+++ b/eng/common/templates/steps/run-on-unix.yml
@@ -0,0 +1,7 @@
+parameters:
+ agentOs: ''
+ steps: []
+
+steps:
+- ${{ if ne(parameters.agentOs, 'Windows_NT') }}:
+ - ${{ parameters.steps }}
diff --git a/eng/common/templates/steps/run-on-windows.yml b/eng/common/templates/steps/run-on-windows.yml
new file mode 100644
index 0000000000..73e7e9c275
--- /dev/null
+++ b/eng/common/templates/steps/run-on-windows.yml
@@ -0,0 +1,7 @@
+parameters:
+ agentOs: ''
+ steps: []
+
+steps:
+- ${{ if eq(parameters.agentOs, 'Windows_NT') }}:
+ - ${{ parameters.steps }}
diff --git a/eng/common/templates/steps/run-script-ifequalelse.yml b/eng/common/templates/steps/run-script-ifequalelse.yml
new file mode 100644
index 0000000000..3d1242f558
--- /dev/null
+++ b/eng/common/templates/steps/run-script-ifequalelse.yml
@@ -0,0 +1,33 @@
+parameters:
+ # if parameter1 equals parameter 2, run 'ifScript' command, else run 'elsescript' command
+ parameter1: ''
+ parameter2: ''
+ ifScript: ''
+ elseScript: ''
+
+ # name of script step
+ name: Script
+
+ # display name of script step
+ displayName: If-Equal-Else Script
+
+ # environment
+ env: {}
+
+ # conditional expression for step execution
+ condition: ''
+
+steps:
+- ${{ if and(ne(parameters.ifScript, ''), eq(parameters.parameter1, parameters.parameter2)) }}:
+ - script: ${{ parameters.ifScript }}
+ name: ${{ parameters.name }}
+ displayName: ${{ parameters.displayName }}
+ env: ${{ parameters.env }}
+ condition: ${{ parameters.condition }}
+
+- ${{ if and(ne(parameters.elseScript, ''), ne(parameters.parameter1, parameters.parameter2)) }}:
+ - script: ${{ parameters.elseScript }}
+ name: ${{ parameters.name }}
+ displayName: ${{ parameters.displayName }}
+ env: ${{ parameters.env }}
+ condition: ${{ parameters.condition }}
\ No newline at end of file
diff --git a/eng/common/templates/steps/send-to-helix.yml b/eng/common/templates/steps/send-to-helix.yml
new file mode 100644
index 0000000000..a5835c0f47
--- /dev/null
+++ b/eng/common/templates/steps/send-to-helix.yml
@@ -0,0 +1,81 @@
+parameters:
+ HelixSource: 'pr/default' # required -- sources must start with pr/, official/, prodcon/, or agent/
+ HelixType: 'tests/default/' # required -- Helix telemetry which identifies what type of data this is; should include "test" for clarity and must end in '/'
+ HelixBuild: $(Build.BuildNumber) # required -- the build number Helix will use to identify this -- automatically set to the AzDO build number
+ HelixTargetQueues: '' # required -- semicolon delimited list of Helix queues to test on; see https://helix.dot.net/api/2018-03-14/info/queues for a list of queues
+ HelixAccessToken: '' # required -- access token to make Helix API requests; should be provided by the appropriate variable group
+ HelixPreCommands: '' # optional -- commands to run before Helix work item execution
+ HelixPostCommands: '' # optional -- commands to run after Helix work item execution
+ WorkItemDirectory: '' # optional -- a payload directory to zip up and send to Helix; requires WorkItemCommand; incompatible with XUnitProjects
+ WorkItemCommand: '' # optional -- a command to execute on the payload; requires WorkItemDirectory; incompatible with XUnitProjects
+ WorkItemTimeout: '' # optional -- a timeout in seconds for the work item command; requires WorkItemDirectory; incompatible with XUnitProjects
+ CorrelationPayloadDirectory: '' # optional -- a directory to zip up and send to Helix as a correlation payload
+ XUnitProjects: '' # optional -- semicolon delimited list of XUnitProjects to parse and send to Helix; requires XUnitRuntimeTargetFramework, XUnitPublishTargetFramework, XUnitRunnerVersion, and IncludeDotNetCli=true
+ XUnitPublishTargetFramework: '' # optional -- framework to use to publish your xUnit projects
+ XUnitRuntimeTargetFramework: '' # optional -- framework to use for the xUnit console runner
+ XUnitRunnerVersion: '' # optional -- version of the xUnit nuget package you wish to use on Helix; required for XUnitProjects
+ IncludeDotNetCli: false # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion
+ DotNetCliPackageType: '' # optional -- either 'sdk' or 'runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json
+ DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json
+ EnableXUnitReporter: false # optional -- true enables XUnit result reporting to Mission Control
+ WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget."
+ IsExternal: false # [DEPRECATED] -- doesn't do anything, jobs are external if HelixAccessToken is empty and Creator is set
+ Creator: '' # optional -- if the build is external, use this to specify who is sending the job
+ condition: succeeded() # optional -- condition for step to execute; defaults to succeeded()
+ continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false
+
+steps:
+ - powershell: 'powershell "$env:BUILD_SOURCESDIRECTORY\eng\common\msbuild.ps1 $env:BUILD_SOURCESDIRECTORY\eng\common\helixpublish.proj /bl:$env:BUILD_SOURCESDIRECTORY\artifacts\log\$env:BuildConfig\SendToHelix.binlog"'
+ displayName: Send job to Helix (Windows)
+ env:
+ BuildConfig: $(_BuildConfig)
+ HelixSource: ${{ parameters.HelixSource }}
+ HelixType: ${{ parameters.HelixType }}
+ HelixBuild: ${{ parameters.HelixBuild }}
+ HelixTargetQueues: ${{ parameters.HelixTargetQueues }}
+ HelixAccessToken: ${{ parameters.HelixAccessToken }}
+ HelixPreCommands: ${{ parameters.HelixPreCommands }}
+ HelixPostCommands: ${{ parameters.HelixPostCommands }}
+ WorkItemDirectory: ${{ parameters.WorkItemDirectory }}
+ WorkItemCommand: ${{ parameters.WorkItemCommand }}
+ WorkItemTimeout: ${{ parameters.WorkItemTimeout }}
+ CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }}
+ XUnitProjects: ${{ parameters.XUnitProjects }}
+ XUnitPublishTargetFramework: ${{ parameters.XUnitPublishTargetFramework }}
+ XUnitRuntimeTargetFramework: ${{ parameters.XUnitRuntimeTargetFramework }}
+ XUnitRunnerVersion: ${{ parameters.XUnitRunnerVersion }}
+ IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }}
+ DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }}
+ DotNetCliVersion: ${{ parameters.DotNetCliVersion }}
+ EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }}
+ WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }}
+ Creator: ${{ parameters.Creator }}
+ condition: and(${{ parameters.condition }}, eq(variables['Agent.Os'], 'Windows_NT'))
+ continueOnError: ${{ parameters.continueOnError }}
+ - script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/eng/common/helixpublish.proj /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog
+ displayName: Send job to Helix (Unix)
+ env:
+ BuildConfig: $(_BuildConfig)
+ HelixSource: ${{ parameters.HelixSource }}
+ HelixType: ${{ parameters.HelixType }}
+ HelixBuild: ${{ parameters.HelixBuild }}
+ HelixTargetQueues: ${{ parameters.HelixTargetQueues }}
+ HelixAccessToken: ${{ parameters.HelixAccessToken }}
+ HelixPreCommands: ${{ parameters.HelixPreCommands }}
+ HelixPostCommands: ${{ parameters.HelixPostCommands }}
+ WorkItemDirectory: ${{ parameters.WorkItemDirectory }}
+ WorkItemCommand: ${{ parameters.WorkItemCommand }}
+ WorkItemTimeout: ${{ parameters.WorkItemTimeout }}
+ CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }}
+ XUnitProjects: ${{ parameters.XUnitProjects }}
+ XUnitPublishTargetFramework: ${{ parameters.XUnitPublishTargetFramework }}
+ XUnitRuntimeTargetFramework: ${{ parameters.XUnitRuntimeTargetFramework }}
+ XUnitRunnerVersion: ${{ parameters.XUnitRunnerVersion }}
+ IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }}
+ DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }}
+ DotNetCliVersion: ${{ parameters.DotNetCliVersion }}
+ EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }}
+ WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }}
+ Creator: ${{ parameters.Creator }}
+ condition: and(${{ parameters.condition }}, ne(variables['Agent.Os'], 'Windows_NT'))
+ continueOnError: ${{ parameters.continueOnError }}
diff --git a/eng/common/templates/steps/telemetry-end.yml b/eng/common/templates/steps/telemetry-end.yml
new file mode 100644
index 0000000000..9b61481e7e
--- /dev/null
+++ b/eng/common/templates/steps/telemetry-end.yml
@@ -0,0 +1,63 @@
+steps:
+- bash: |
+ if [ "$AGENT_JOBSTATUS" = "Succeeded" ] || [ "$AGENT_JOBSTATUS" = "PartiallySucceeded" ]; then
+ errorCount=0
+ else
+ errorCount=1
+ fi
+ warningCount=0
+
+ # create a temporary file for curl output
+ res=`mktemp`
+
+ curlResult=`
+ curl --verbose --output $res --write-out "%{http_code}"\
+ -H 'Content-Type: application/json' \
+ -H "X-Helix-Job-Token: $Helix_JobToken" \
+ -H 'Content-Length: 0' \
+ -X POST -G "https://helix.dot.net/api/2018-03-14/telemetry/job/build/$Helix_WorkItemId/finish" \
+ --data-urlencode "errorCount=$errorCount" \
+ --data-urlencode "warningCount=$warningCount"`
+ curlStatus=$?
+
+ if [ $curlStatus -eq 0 ]; then
+ if [ $curlResult -gt 299 ] || [ $curlResult -lt 200 ]; then
+ curlStatus=$curlResult
+ fi
+ fi
+
+ if [ $curlStatus -ne 0 ]; then
+ echo "Failed to Send Build Finish information"
+ vstsLogOutput="vso[task.logissue type=error;sourcepath=templates/steps/telemetry-end.yml;code=1;]Failed to Send Build Finish information: $curlStatus"
+ echo "##$vstsLogOutput"
+ exit 1
+ fi
+ displayName: Send Unix Build End Telemetry
+ env:
+ # defined via VSTS variables in start-job.sh
+ Helix_JobToken: $(Helix_JobToken)
+ Helix_WorkItemId: $(Helix_WorkItemId)
+ condition: and(always(), ne(variables['Agent.Os'], 'Windows_NT'))
+- powershell: |
+ if (($env:Agent_JobStatus -eq 'Succeeded') -or ($env:Agent_JobStatus -eq 'PartiallySucceeded')) {
+ $ErrorCount = 0
+ } else {
+ $ErrorCount = 1
+ }
+ $WarningCount = 0
+
+ try {
+ Invoke-RestMethod -Uri "https://helix.dot.net/api/2018-03-14/telemetry/job/build/$env:Helix_WorkItemId/finish?errorCount=$ErrorCount&warningCount=$WarningCount" -Method Post -ContentType "application/json" -Body "" `
+ -Headers @{ 'X-Helix-Job-Token'=$env:Helix_JobToken }
+ }
+ catch {
+ Write-Error $_
+ Write-Error $_.Exception
+ exit 1
+ }
+ displayName: Send Windows Build End Telemetry
+ env:
+ # defined via VSTS variables in start-job.ps1
+ Helix_JobToken: $(Helix_JobToken)
+ Helix_WorkItemId: $(Helix_WorkItemId)
+ condition: and(always(),eq(variables['Agent.Os'], 'Windows_NT'))
diff --git a/eng/common/templates/steps/telemetry-start.yml b/eng/common/templates/steps/telemetry-start.yml
new file mode 100644
index 0000000000..79c128c5de
--- /dev/null
+++ b/eng/common/templates/steps/telemetry-start.yml
@@ -0,0 +1,154 @@
+parameters:
+ helixSource: 'undefined_defaulted_in_telemetry.yml'
+ helixType: 'undefined_defaulted_in_telemetry.yml'
+ buildConfig: ''
+ runAsPublic: false
+
+steps:
+- ${{ if and(eq(parameters.runAsPublic, 'false'), not(eq(variables['System.TeamProject'], 'public'))) }}:
+ - task: AzureKeyVault@1
+ inputs:
+ azureSubscription: 'HelixProd_KeyVault'
+ KeyVaultName: HelixProdKV
+ SecretsFilter: 'HelixApiAccessToken'
+ condition: always()
+- bash: |
+ # create a temporary file
+ jobInfo=`mktemp`
+
+ # write job info content to temporary file
+ cat > $jobInfo <' | Set-Content $proj
+ MSBuild $proj $bl /t:__WriteToolsetLocation /noconsolelogger /p:__ToolsetLocationOutputFile=$toolsetLocationFile
+
+ $path = Get-Content $toolsetLocationFile -TotalCount 1
+ if (!(Test-Path $path)) {
+ throw "Invalid toolset path: $path"
+ }
+
+ return $global:_ToolsetBuildProj = $path
+}
+
+function ExitWithExitCode([int] $exitCode) {
+ if ($ci -and $prepareMachine) {
+ Stop-Processes
+ }
+ exit $exitCode
+}
+
+function Stop-Processes() {
+ Write-Host "Killing running build processes..."
+ foreach ($processName in $processesToStopOnExit) {
+ Get-Process -Name $processName -ErrorAction SilentlyContinue | Stop-Process
+ }
+}
+
+#
+# Executes msbuild (or 'dotnet msbuild') with arguments passed to the function.
+# The arguments are automatically quoted.
+# Terminates the script if the build fails.
+#
+function MSBuild() {
+ if ($ci) {
+ if (!$binaryLog) {
+ throw "Binary log must be enabled in CI build."
+ }
+
+ if ($nodeReuse) {
+ throw "Node reuse must be disabled in CI build."
+ }
+ }
+
+ $buildTool = InitializeBuildTool
+
+ $cmdArgs = "$($buildTool.Command) /m /nologo /clp:Summary /v:$verbosity /nr:$nodeReuse"
+
+ if ($warnAsError) {
+ $cmdArgs += " /warnaserror /p:TreatWarningsAsErrors=true"
+ }
+
+ foreach ($arg in $args) {
+ if ($arg -ne $null -and $arg.Trim() -ne "") {
+ $cmdArgs += " `"$arg`""
+ }
+ }
+
+ $exitCode = Exec-Process $buildTool.Path $cmdArgs
+
+ if ($exitCode -ne 0) {
+ Write-Host "Build failed." -ForegroundColor Red
+
+ $buildLog = GetMSBuildBinaryLogCommandLineArgument $args
+ if ($buildLog -ne $null) {
+ Write-Host "See log: $buildLog" -ForegroundColor DarkGray
+ }
+
+ ExitWithExitCode $exitCode
+ }
+}
+
+function GetMSBuildBinaryLogCommandLineArgument($arguments) {
+ foreach ($argument in $arguments) {
+ if ($argument -ne $null) {
+ $arg = $argument.Trim()
+ if ($arg.StartsWith("/bl:", "OrdinalIgnoreCase")) {
+ return $arg.Substring("/bl:".Length)
+ }
+
+ if ($arg.StartsWith("/binaryLogger:", "OrdinalIgnoreCase")) {
+ return $arg.Substring("/binaryLogger:".Length)
+ }
+ }
+ }
+
+ return $null
+}
+
+$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot "..\..")
+$EngRoot = Resolve-Path (Join-Path $PSScriptRoot "..")
+$ArtifactsDir = Join-Path $RepoRoot "artifacts"
+$ToolsetDir = Join-Path $ArtifactsDir "toolset"
+$ToolsDir = Join-Path $RepoRoot ".tools"
+$LogDir = Join-Path (Join-Path $ArtifactsDir "log") $configuration
+$TempDir = Join-Path (Join-Path $ArtifactsDir "tmp") $configuration
+$GlobalJson = Get-Content -Raw -Path (Join-Path $RepoRoot "global.json") | ConvertFrom-Json
+
+Create-Directory $ToolsetDir
+Create-Directory $TempDir
+Create-Directory $LogDir
+
+if ($ci) {
+ $env:TEMP = $TempDir
+ $env:TMP = $TempDir
+}
diff --git a/eng/common/tools.sh b/eng/common/tools.sh
new file mode 100755
index 0000000000..8a253bef51
--- /dev/null
+++ b/eng/common/tools.sh
@@ -0,0 +1,319 @@
+# Initialize variables if they aren't already defined.
+
+# CI mode - set to true on CI server for PR validation build or official build.
+ci=${ci:-false}
+
+# Build configuration. Common values include 'Debug' and 'Release', but the repository may use other names.
+configuration=${configuration:-'Debug'}
+
+# Set to true to output binary log from msbuild. Note that emitting binary log slows down the build.
+# Binary log must be enabled on CI.
+binary_log=${binary_log:-$ci}
+
+# Turns on machine preparation/clean up code that changes the machine state (e.g. kills build processes).
+prepare_machine=${prepare_machine:-false}
+
+# True to restore toolsets and dependencies.
+restore=${restore:-true}
+
+# Adjusts msbuild verbosity level.
+verbosity=${verbosity:-'minimal'}
+
+# Set to true to reuse msbuild nodes. Recommended to not reuse on CI.
+if [[ "$ci" == true ]]; then
+ node_reuse=${node_reuse:-false}
+else
+ node_reuse=${node_reuse:-true}
+fi
+
+# Configures warning treatment in msbuild.
+warn_as_error=${warn_as_error:-true}
+
+# True to attempt using .NET Core already that meets requirements specified in global.json
+# installed on the machine instead of downloading one.
+use_installed_dotnet_cli=${use_installed_dotnet_cli:-true}
+
+# True to use global NuGet cache instead of restoring packages to repository-local directory.
+if [[ "$ci" == true ]]; then
+ use_global_nuget_cache=${use_global_nuget_cache:-false}
+else
+ use_global_nuget_cache=${use_global_nuget_cache:-true}
+fi
+
+# Resolve any symlinks in the given path.
+function ResolvePath {
+ local path=$1
+
+ while [[ -h $path ]]; do
+ local dir="$( cd -P "$( dirname "$path" )" && pwd )"
+ path="$(readlink "$path")"
+
+ # if $path was a relative symlink, we need to resolve it relative to the path where the
+ # symlink file was located
+ [[ $path != /* ]] && path="$dir/$path"
+ done
+
+ # return value
+ _ResolvePath="$path"
+}
+
+# ReadVersionFromJson [json key]
+function ReadGlobalVersion {
+ local key=$1
+
+ local line=`grep -m 1 "$key" "$global_json_file"`
+ local pattern="\"$key\" *: *\"(.*)\""
+
+ if [[ ! $line =~ $pattern ]]; then
+ echo "Error: Cannot find \"$key\" in $global_json_file" >&2
+ ExitWithExitCode 1
+ fi
+
+ # return value
+ _ReadGlobalVersion=${BASH_REMATCH[1]}
+}
+
+function InitializeDotNetCli {
+ if [[ -n "${_InitializeDotNetCli:-}" ]]; then
+ return
+ fi
+
+ local install=$1
+
+ # Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism
+ export DOTNET_MULTILEVEL_LOOKUP=0
+
+ # Disable first run since we want to control all package sources
+ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
+
+ # Disable telemetry on CI
+ if [[ $ci == true ]]; then
+ export DOTNET_CLI_TELEMETRY_OPTOUT=1
+ fi
+
+ # LTTNG is the logging infrastructure used by Core CLR. Need this variable set
+ # so it doesn't output warnings to the console.
+ export LTTNG_HOME="$HOME"
+
+ # Source Build uses DotNetCoreSdkDir variable
+ if [[ -n "${DotNetCoreSdkDir:-}" ]]; then
+ export DOTNET_INSTALL_DIR="$DotNetCoreSdkDir"
+ fi
+
+ # Find the first path on $PATH that contains the dotnet.exe
+ if [[ "$use_installed_dotnet_cli" == true && -z "${DOTNET_INSTALL_DIR:-}" ]]; then
+ local dotnet_path=`command -v dotnet`
+ if [[ -n "$dotnet_path" ]]; then
+ ResolvePath "$dotnet_path"
+ export DOTNET_INSTALL_DIR=`dirname "$_ResolvePath"`
+ fi
+ fi
+
+ ReadGlobalVersion "dotnet"
+ local dotnet_sdk_version=$_ReadGlobalVersion
+ local dotnet_root=""
+
+ # Use dotnet installation specified in DOTNET_INSTALL_DIR if it contains the required SDK version,
+ # otherwise install the dotnet CLI and SDK to repo local .dotnet directory to avoid potential permission issues.
+ if [[ -n "${DOTNET_INSTALL_DIR:-}" && -d "$DOTNET_INSTALL_DIR/sdk/$dotnet_sdk_version" ]]; then
+ dotnet_root="$DOTNET_INSTALL_DIR"
+ else
+ dotnet_root="$repo_root/.dotnet"
+ export DOTNET_INSTALL_DIR="$dotnet_root"
+
+ if [[ ! -d "$DOTNET_INSTALL_DIR/sdk/$dotnet_sdk_version" ]]; then
+ if [[ "$install" == true ]]; then
+ InstallDotNetSdk "$dotnet_root" "$dotnet_sdk_version"
+ else
+ echo "Unable to find dotnet with SDK version '$dotnet_sdk_version'" >&2
+ ExitWithExitCode 1
+ fi
+ fi
+ fi
+
+ # Add dotnet to PATH. This prevents any bare invocation of dotnet in custom
+ # build steps from using anything other than what we've downloaded.
+ export PATH="$dotnet_root:$PATH"
+
+ if [[ $ci == true ]]; then
+ # Make Sure that our bootstrapped dotnet cli is avaliable in future steps of the Azure Pipelines build
+ echo "##vso[task.prependpath]$dotnet_root"
+ echo "##vso[task.setvariable variable=DOTNET_MULTILEVEL_LOOKUP]0"
+ echo "##vso[task.setvariable variable=DOTNET_SKIP_FIRST_TIME_EXPERIENCE]1"
+ fi
+
+ # return value
+ _InitializeDotNetCli="$dotnet_root"
+}
+
+function InstallDotNetSdk {
+ local root=$1
+ local version=$2
+
+ GetDotNetInstallScript "$root"
+ local install_script=$_GetDotNetInstallScript
+
+ bash "$install_script" --version $version --install-dir "$root" || {
+ local exit_code=$?
+ echo "Failed to install dotnet SDK (exit code '$exit_code')." >&2
+ ExitWithExitCode $exit_code
+ }
+}
+
+function GetDotNetInstallScript {
+ local root=$1
+ local install_script="$root/dotnet-install.sh"
+ local install_script_url="https://dot.net/v1/dotnet-install.sh"
+
+ if [[ ! -a "$install_script" ]]; then
+ mkdir -p "$root"
+
+ echo "Downloading '$install_script_url'"
+
+ # Use curl if available, otherwise use wget
+ if command -v curl > /dev/null; then
+ curl "$install_script_url" -sSL --retry 10 --create-dirs -o "$install_script"
+ else
+ wget -q -O "$install_script" "$install_script_url"
+ fi
+ fi
+
+ # return value
+ _GetDotNetInstallScript="$install_script"
+}
+
+function InitializeBuildTool {
+ if [[ -n "${_InitializeBuildTool:-}" ]]; then
+ return
+ fi
+
+ InitializeDotNetCli $restore
+
+ # return values
+ _InitializeBuildTool="$_InitializeDotNetCli/dotnet"
+ _InitializeBuildToolCommand="msbuild"
+}
+
+function GetNuGetPackageCachePath {
+ if [[ -z ${NUGET_PACKAGES:-} ]]; then
+ if [[ "$use_global_nuget_cache" == true ]]; then
+ export NUGET_PACKAGES="$HOME/.nuget/packages"
+ else
+ export NUGET_PACKAGES="$repo_root/.packages"
+ fi
+ fi
+
+ # return value
+ _GetNuGetPackageCachePath=$NUGET_PACKAGES
+}
+
+function InitializeToolset {
+ if [[ -n "${_InitializeToolset:-}" ]]; then
+ return
+ fi
+
+ GetNuGetPackageCachePath
+
+ ReadGlobalVersion "Microsoft.DotNet.Arcade.Sdk"
+
+ local toolset_version=$_ReadGlobalVersion
+ local toolset_location_file="$toolset_dir/$toolset_version.txt"
+
+ if [[ -a "$toolset_location_file" ]]; then
+ local path=`cat "$toolset_location_file"`
+ if [[ -a "$path" ]]; then
+ # return value
+ _InitializeToolset="$path"
+ return
+ fi
+ fi
+
+ if [[ "$restore" != true ]]; then
+ echo "Toolset version $toolsetVersion has not been restored." >&2
+ ExitWithExitCode 2
+ fi
+
+ local toolset_restore_log="$log_dir/ToolsetRestore.binlog"
+ local proj="$toolset_dir/restore.proj"
+
+ echo '' > "$proj"
+ MSBuild "$proj" /t:__WriteToolsetLocation /noconsolelogger /bl:"$toolset_restore_log" /p:__ToolsetLocationOutputFile="$toolset_location_file"
+
+ local toolset_build_proj=`cat "$toolset_location_file"`
+
+ if [[ ! -a "$toolset_build_proj" ]]; then
+ echo "Invalid toolset path: $toolset_build_proj" >&2
+ ExitWithExitCode 3
+ fi
+
+ # return value
+ _InitializeToolset="$toolset_build_proj"
+}
+
+function ExitWithExitCode {
+ if [[ "$ci" == true && "$prepare_machine" == true ]]; then
+ StopProcesses
+ fi
+ exit $1
+}
+
+function StopProcesses {
+ echo "Killing running build processes..."
+ pkill -9 "dotnet" || true
+ pkill -9 "vbcscompiler" || true
+ return 0
+}
+
+function MSBuild {
+ if [[ "$ci" == true ]]; then
+ if [[ "$binary_log" != true ]]; then
+ echo "Binary log must be enabled in CI build." >&2
+ ExitWithExitCode 1
+ fi
+
+ if [[ "$node_reuse" == true ]]; then
+ echo "Node reuse must be disabled in CI build." >&2
+ ExitWithExitCode 1
+ fi
+ fi
+
+ InitializeBuildTool
+
+ local warnaserror_switch=""
+ if [[ $warn_as_error == true ]]; then
+ warnaserror_switch="/warnaserror"
+ fi
+
+ "$_InitializeBuildTool" "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch /p:TreatWarningsAsErrors=$warn_as_error "$@" || {
+ local exit_code=$?
+ echo "Build failed (exit code '$exit_code')." >&2
+ ExitWithExitCode $exit_code
+ }
+}
+
+ResolvePath "${BASH_SOURCE[0]}"
+_script_dir=`dirname "$_ResolvePath"`
+
+eng_root=`cd -P "$_script_dir/.." && pwd`
+repo_root=`cd -P "$_script_dir/../.." && pwd`
+artifacts_dir="$repo_root/artifacts"
+toolset_dir="$artifacts_dir/toolset"
+log_dir="$artifacts_dir/log/$configuration"
+temp_dir="$artifacts_dir/tmp/$configuration"
+
+global_json_file="$repo_root/global.json"
+
+# HOME may not be defined in some scenarios, but it is required by NuGet
+if [[ -z $HOME ]]; then
+ export HOME="$repo_root/artifacts/.home/"
+ mkdir -p "$HOME"
+fi
+
+mkdir -p "$toolset_dir"
+mkdir -p "$temp_dir"
+mkdir -p "$log_dir"
+
+if [[ $ci == true ]]; then
+ export TEMP="$temp_dir"
+ export TMP="$temp_dir"
+fi
diff --git a/fcs/.paket/Paket.Restore.targets b/fcs/.paket/Paket.Restore.targets
index e7c1bc0c83..52f41c608a 100644
--- a/fcs/.paket/Paket.Restore.targets
+++ b/fcs/.paket/Paket.Restore.targets
@@ -11,23 +11,49 @@
$(MSBuildThisFileDirectory)..\
$(PaketRootPath)paket-files\paket.restore.cached
$(PaketRootPath)paket.lock
+ classic
+ proj
+ assembly
+ native
/Library/Frameworks/Mono.framework/Commands/mono
mono
-
- $(PaketRootPath)paket.exe
- $(PaketToolsPath)paket.exe
- "$(PaketExePath)"
- $(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"
-
+
+ $(PaketRootPath)paket.bootstrapper.exe
+ $(PaketToolsPath)paket.bootstrapper.exe
+ $([System.IO.Path]::GetDirectoryName("$(PaketBootStrapperExePath)"))\
+
+
+
+
+ $(PaketRootPath)paket.exe
+ $(PaketToolsPath)paket.exe
+ $(PaketToolsPath)paket.exe
+ $(_PaketBootStrapperExeDir)paket.exe
+ paket.exe
+
+
+ $(PaketRootPath)paket
+ $(PaketToolsPath)paket
+ $(PaketToolsPath)paket
+
+
+ $(PaketRootPath)paket.exe
+ $(PaketToolsPath)paket.exe
+
+
+ $(PaketBootStrapperExeDir)paket.exe
+
+
+ paket
+
+
<_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)"))
- dotnet "$(PaketExePath)"
+ dotnet "$(PaketExePath)"
+ $(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"
+ "$(PaketExePath)"
-
- "$(PaketExePath)"
- $(PaketRootPath)paket.bootstrapper.exe
- $(PaketToolsPath)paket.bootstrapper.exe
"$(PaketBootStrapperExePath)"
$(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)"
@@ -36,30 +62,40 @@
true
true
+
+
+ True
-
+
+
+
+
+
true
- $(NoWarn);NU1603
+ $(NoWarn);NU1603;NU1604;NU1605;NU1608
- /usr/bin/shasum $(PaketRestoreCacheFile) | /usr/bin/awk '{ print $1 }'
- /usr/bin/shasum $(PaketLockFilePath) | /usr/bin/awk '{ print $1 }'
+ /usr/bin/shasum "$(PaketRestoreCacheFile)" | /usr/bin/awk '{ print $1 }'
+ /usr/bin/shasum "$(PaketLockFilePath)" | /usr/bin/awk '{ print $1 }'
-
+
-
+
+
+
+
$([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)'))
@@ -69,11 +105,26 @@
true
+
+
+ true
+
+
-
+
+
+
+
+
+
+
+
$(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).paket.references.cached
@@ -82,7 +133,9 @@
$(MSBuildProjectDirectory)\$(MSBuildProjectName).paket.references
$(MSBuildProjectDirectory)\paket.references
- $(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).$(TargetFramework).paket.resolved
+
+ false
+ true
true
references-file-or-cache-not-found
@@ -101,32 +154,43 @@
-
+
true
- target-framework '$(TargetFramework)'
+ target-framework '$(TargetFramework)' or '$(TargetFrameworks)' files @(PaketResolvedFilePaths)
-
+
+
-
+
+ false
+ true
+
+
-
+
-
+
+ $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',').Length)
$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0])
$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])
$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4])
+ $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5])
%(PaketReferencesFileLinesInfo.PackageVersion)
- All
+ All
+ runtime
+ runtime
+ true
+ true
@@ -158,19 +222,27 @@
false
+ $(MSBuildVersion)
+ 15.8.0
<_NuspecFilesNewLocation Include="$(BaseIntermediateOutputPath)$(Configuration)\*.nuspec"/>
+
+
$(MSBuildProjectDirectory)/$(MSBuildProjectFile)
true
- false
- true
+ false
+ true
+ false
+ true
+ false
+ true
$(BaseIntermediateOutputPath)$(Configuration)
$(BaseIntermediateOutputPath)
@@ -183,11 +255,54 @@
-
-
+
-
+
+
-
+
+ $(UserProfile)\.nuget\packages\
+ $(HOME)/.nuget/packages/
+ $(NuGetPackageRoot)\
+ $(NuGetPackageRoot)/
+ $(MSBuildThisFileDirectory)..\artifacts
+ $(ArtifactsDir)\bin
+ $(ArtifactsDir)\obj
+ $(ArtifactsBinDir)\fcs
+ $(ArtifactsObjDir)\fcs
+
+
+
+
+ $(ArtifactsBinDir)\FSharp.Build\Proto\net46
+
+
+
+ $(ProtoOutputPath)\Microsoft.FSharp.Targets
+ $(ProtoOutputPath)\Microsoft.FSharp.NetSdk.props
+ $(ProtoOutputPath)\Microsoft.FSharp.NetSdk.targets
+ $(ProtoOutputPath)\Microsoft.FSharp.Overrides.NetSdk.targets
+
+
diff --git a/fcs/Directory.Build.targets b/fcs/Directory.Build.targets
new file mode 100644
index 0000000000..bb5b23d29d
--- /dev/null
+++ b/fcs/Directory.Build.targets
@@ -0,0 +1,3 @@
+
+
+
diff --git a/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj b/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj
index deb3f51b69..9d3e20e80c 100644
--- a/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj
+++ b/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj
@@ -7,7 +7,6 @@
net45
true
- ..\..\$(Configuration.ToLower())\fcs
$(DefineConstants);CROSS_PLATFORM_COMPILER
$(DefineConstants);ENABLE_MONO_SUPPORT
@@ -29,7 +28,7 @@
-
+
$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Framework.dll
@@ -51,18 +50,8 @@
$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Tasks.v12.0.dll
false
-
-
- $(FSharpSourcesRoot)\..\packages\Microsoft.Portable.FSharp.Core.$(FSharpCoreFrozenPortablePackageVersion)\lib\profiles\net40\FSharp.Core.dll
- false
-
-
- FSharp.Compiler.Service
- {2e4d67b4-522d-4cf7-97e4-ba940f0b18f3}
- True
-
\ No newline at end of file
diff --git a/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj b/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj
index ff23a6589c..5b8efa504d 100644
--- a/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj
+++ b/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj
@@ -1,13 +1,9 @@
-
- $(MSBuildProjectDirectory)\..\..\src
-
net45
true
- ..\..\$(Configuration.ToLower())\fcs
Legacy project file cracker for the F# compiler service.
@@ -25,13 +21,13 @@
-
-
+
+
-
+
\ No newline at end of file
diff --git a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj
index f6ff4d1bea..2e5ae3075f 100644
--- a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj
+++ b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj
@@ -14,7 +14,6 @@
$(OtherFlags) --staticlink:FSharp.Core
true
false
- ..\..\$(Configuration.ToLower())\fcs
@@ -25,11 +24,7 @@
-
- $(FSharpSourcesRoot)\..\packages\Microsoft.Portable.FSharp.Core.$(FSharpCoreFrozenPortablePackageVersion)\lib\profiles\net40\FSharp.Core.dll
- false
-
-
+
$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Framework.dll
false
diff --git a/fcs/FSharp.Compiler.Service.Tests/App.config b/fcs/FSharp.Compiler.Service.Tests/App.config
index ddb73d1dd9..380c93a453 100644
--- a/fcs/FSharp.Compiler.Service.Tests/App.config
+++ b/fcs/FSharp.Compiler.Service.Tests/App.config
@@ -3,6 +3,10 @@
+
+
+
+
diff --git a/fcs/FSharp.Compiler.Service.Tests/CSharp_Analysis/CSharp_Analysis.csproj b/fcs/FSharp.Compiler.Service.Tests/CSharp_Analysis/CSharp_Analysis.csproj
index 49585864e4..fc00709da4 100644
--- a/fcs/FSharp.Compiler.Service.Tests/CSharp_Analysis/CSharp_Analysis.csproj
+++ b/fcs/FSharp.Compiler.Service.Tests/CSharp_Analysis/CSharp_Analysis.csproj
@@ -3,6 +3,7 @@
net45;netstandard2.0
false
+ $(NoWarn);0067;1591
diff --git a/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj b/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj
index 7ea85c202a..010e69b95a 100644
--- a/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj
+++ b/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj
@@ -69,17 +69,23 @@
TokenizerTests.fs
+
+ ServiceUntypedParseTests.fs
+
+
+ TreeVisitorTests.fs
+
Program.fs
-
+
-
+
diff --git a/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj b/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj
index a642413653..bfd4295003 100644
--- a/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj
+++ b/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj
@@ -1,23 +1,23 @@
-
+
$(MSBuildProjectDirectory)\..\..\src
-
+
+
net45;netstandard2.0
true
$(DefineConstants);COMPILER_SERVICE_AS_DLL
$(DefineConstants);COMPILER
$(DefineConstants);ENABLE_MONO_SUPPORT
$(DefineConstants);NO_STRONG_NAMES
- ..\..\$(Configuration.ToLower())\fcs
$(TargetFramework)\
$(TargetFramework)\
$(OtherFlags) /warnon:1182
$(OtherFlags) --times
- $(NoWarn);44;62;69;65;54;61;75;62;9;2003;
- true
+ $(NoWarn);44;62;69;65;54;61;75;62;9;2003;NU5125
+ true
true
true
@@ -46,12 +46,12 @@
AssemblyInfo/AssemblyInfo.fs
-
+
FSComp.txt
-
-
+
+
FSIstrings.txt
-
+
FSStrings.resx
FSStrings.resources
@@ -635,11 +635,12 @@
-
+
+
@@ -655,7 +656,5 @@
$(FSharpSourcesRoot)\..\packages\System.ValueTuple.4.4.0\lib\netstandard1.0\System.ValueTuple.dll
-
-
-
+
\ No newline at end of file
diff --git a/fcs/build.cmd b/fcs/build.cmd
index 0289b3c480..16bbb2924b 100644
--- a/fcs/build.cmd
+++ b/fcs/build.cmd
@@ -18,6 +18,9 @@ if errorlevel 1 (
exit /b %errorlevel%
)
+:: don't care if this fails
+dotnet build-server shutdown >NUL 2>&1
+
packages\FAKE\tools\FAKE.exe build.fsx %*
if errorlevel 1 (
endlocal
diff --git a/fcs/build.fsx b/fcs/build.fsx
index a11ed814af..5690fb73b0 100644
--- a/fcs/build.fsx
+++ b/fcs/build.fsx
@@ -13,15 +13,15 @@ open Fake.ReleaseNotesHelper
#if MONO
// prevent incorrect output encoding (e.g. https://github.com/fsharp/FAKE/issues/1196)
System.Console.OutputEncoding <- System.Text.Encoding.UTF8
-CleanDir (__SOURCE_DIRECTORY__ + "/../tests/TestResults")
-File.WriteAllText(__SOURCE_DIRECTORY__ + "/../tests/TestResults/notestsyet.txt","No tests yet")
+CleanDir (__SOURCE_DIRECTORY__ + "/../artifacts/TestResults")
+File.WriteAllText(__SOURCE_DIRECTORY__ + "/../artifacts/TestResults/notestsyet.txt","No tests yet")
let isMono = true
#else
let isMono = false
#endif
-let dotnetExePath = DotNetCli.InstallDotNetSDK "2.1.201"
+let dotnetExePath = DotNetCli.InstallDotNetSDK "2.1.403"
let runDotnet workingDir args =
let result =
@@ -51,13 +51,13 @@ let runCmdIn workDir (exe:string) = Printf.ksprintf (fun (args:string) ->
// The rest of the code is standard F# build script
// --------------------------------------------------------------------------------------
-let releaseDir = Path.Combine(__SOURCE_DIRECTORY__, "../release/fcs")
+let releaseDir = Path.Combine(__SOURCE_DIRECTORY__, "../artifacts/bin/fcs")
// Read release notes & version info from RELEASE_NOTES.md
let release = LoadReleaseNotes (__SOURCE_DIRECTORY__ + "/RELEASE_NOTES.md")
let isAppVeyorBuild = buildServer = BuildServer.AppVeyor
let isJenkinsBuild = buildServer = BuildServer.Jenkins
-let isVersionTag tag = Version.TryParse tag |> fst
+let isVersionTag (tag: string) = Version.TryParse tag |> fst
let hasRepoVersionTag = isAppVeyorBuild && AppVeyorEnvironment.RepoTag && isVersionTag AppVeyorEnvironment.RepoTagName
let assemblyVersion = if hasRepoVersionTag then AppVeyorEnvironment.RepoTagName else release.NugetVersion
@@ -72,15 +72,8 @@ Target "Clean" (fun _ ->
Target "Restore" (fun _ ->
// We assume a paket restore has already been run
+ runDotnet __SOURCE_DIRECTORY__ "restore ../src/buildtools/buildtools.proj -v n"
runDotnet __SOURCE_DIRECTORY__ "restore FSharp.Compiler.Service.sln -v n"
- for p in [ "../packages.config" ] do
- let rec executeProcess count =
- let result = ExecProcess (fun info ->
- info.FileName <- FullName @"./../.nuget/NuGet.exe"
- info.WorkingDirectory <- FullName @"./.."
- info.Arguments <- sprintf "restore %s -PackagesDirectory \"%s\" -ConfigFile \"%s\"" (FullName p) (FullName "./../packages") (FullName "./../NuGet.Config")) TimeSpan.MaxValue
- if result <> 0 && count > 1 then executeProcess (count - 1) else result
- (executeProcess 5) |> assertExitCodeZero
)
Target "BuildVersion" (fun _ ->
@@ -88,7 +81,8 @@ Target "BuildVersion" (fun _ ->
)
Target "Build" (fun _ ->
- runDotnet __SOURCE_DIRECTORY__ "build FSharp.Compiler.Service.sln -v n -c Release"
+ runDotnet __SOURCE_DIRECTORY__ "build ../src/buildtools/buildtools.proj -v n -c Proto"
+ runDotnet __SOURCE_DIRECTORY__ "build FSharp.Compiler.Service.sln -v n -c release"
)
Target "Test" (fun _ ->
@@ -97,11 +91,11 @@ Target "Test" (fun _ ->
runDotnet __SOURCE_DIRECTORY__ "build ../tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj -v n"
// Now run the tests
- runDotnet __SOURCE_DIRECTORY__ "test FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj -v n -c Release"
+ runDotnet __SOURCE_DIRECTORY__ "test FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj --no-restore --no-build -v n -c release"
)
Target "NuGet" (fun _ ->
- runDotnet __SOURCE_DIRECTORY__ "pack FSharp.Compiler.Service.sln -v n -c Release"
+ runDotnet __SOURCE_DIRECTORY__ "pack FSharp.Compiler.Service.sln -v n -c release"
)
Target "GenerateDocsEn" (fun _ ->
diff --git a/fcs/docsrc/content/ja/symbols.fsx b/fcs/docsrc/content/ja/symbols.fsx
index 2e3f53bdba..d6abee1233 100644
--- a/fcs/docsrc/content/ja/symbols.fsx
+++ b/fcs/docsrc/content/ja/symbols.fsx
@@ -175,8 +175,8 @@ argTy1c.TypeDefinition.CompiledName // "Int32"
*)
let projectContext = checkFileResults.ProjectContext
-for ass in projectContext.GetReferencedAssemblies() do
- match ass.FileName with
+for assembly in projectContext.GetReferencedAssemblies() do
+ match assembly.FileName with
| None -> printfn "コンパイル時にファイルの存在しないアセンブリを参照しました"
| Some s -> printfn "コンパイル時にアセンブリ '%s' を参照しました" s
diff --git a/fcs/docsrc/content/ja/tokenizer.fsx b/fcs/docsrc/content/ja/tokenizer.fsx
index 589061e0b0..cf5117bfbd 100644
--- a/fcs/docsrc/content/ja/tokenizer.fsx
+++ b/fcs/docsrc/content/ja/tokenizer.fsx
@@ -73,7 +73,7 @@ let rec tokenizeLine (tokenizer:FSharpLineTokenizer) state =
必要となるような新しい状態を返します。
初期値としては `0L` を指定します:
*)
-tokenizeLine tokenizer 0L
+tokenizeLine tokenizer FSharpTokenizerLexState.Initial
(**
この結果は LET WHITESPACE IDENT EQUALS INT32 という
トークン名のシーケンスになります。
diff --git a/fcs/docsrc/content/symbols.fsx b/fcs/docsrc/content/symbols.fsx
index fb6275fd37..ac38053a1b 100644
--- a/fcs/docsrc/content/symbols.fsx
+++ b/fcs/docsrc/content/symbols.fsx
@@ -168,8 +168,8 @@ used in the compilation, called the `ProjectContext`:
*)
let projectContext = checkFileResults.ProjectContext
-for ass in projectContext.GetReferencedAssemblies() do
- match ass.FileName with
+for assembly in projectContext.GetReferencedAssemblies() do
+ match assembly.FileName with
| None -> printfn "compilation referenced an assembly without a file"
| Some s -> printfn "compilation references assembly '%s'" s
diff --git a/fcs/docsrc/content/tokenizer.fsx b/fcs/docsrc/content/tokenizer.fsx
index 09d842ba8a..9ac3d6f34d 100644
--- a/fcs/docsrc/content/tokenizer.fsx
+++ b/fcs/docsrc/content/tokenizer.fsx
@@ -65,7 +65,7 @@ let rec tokenizeLine (tokenizer:FSharpLineTokenizer) state =
The function returns the new state, which is needed if you need to tokenize multiple lines
and an earlier line ends with a multi-line comment. As an initial state, we can use `0L`:
*)
-tokenizeLine tokenizer 0L
+tokenizeLine tokenizer FSharpTokenizerLexState.Initial
(**
The result is a sequence of tokens with names LET, WHITESPACE, IDENT, EQUALS and INT32.
There is a number of interesting properties on `FSharpTokenInfo` including:
diff --git a/fcs/fcs.props b/fcs/fcs.props
index b698937373..3f6246ff7d 100644
--- a/fcs/fcs.props
+++ b/fcs/fcs.props
@@ -8,7 +8,7 @@
false
- $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools
- fsi.exe
+ $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools
+ fsi.exe
\ No newline at end of file
diff --git a/fcs/samples/EditorService/EditorService.fsproj b/fcs/samples/EditorService/EditorService.fsproj
index 05847e67f9..447906070f 100644
--- a/fcs/samples/EditorService/EditorService.fsproj
+++ b/fcs/samples/EditorService/EditorService.fsproj
@@ -12,7 +12,7 @@
-
+
diff --git a/fcs/samples/FscExe/FscExe.fsproj b/fcs/samples/FscExe/FscExe.fsproj
index c482656827..b2b146913a 100644
--- a/fcs/samples/FscExe/FscExe.fsproj
+++ b/fcs/samples/FscExe/FscExe.fsproj
@@ -14,7 +14,7 @@
-
+
diff --git a/fcs/samples/FsiExe/FsiExe.fsproj b/fcs/samples/FsiExe/FsiExe.fsproj
index 7377f2c291..aae2ba0318 100644
--- a/fcs/samples/FsiExe/FsiExe.fsproj
+++ b/fcs/samples/FsiExe/FsiExe.fsproj
@@ -16,7 +16,7 @@
-
+
diff --git a/fcs/samples/InteractiveService/InteractiveService.fsproj b/fcs/samples/InteractiveService/InteractiveService.fsproj
index 7aa4249726..387439fcfd 100644
--- a/fcs/samples/InteractiveService/InteractiveService.fsproj
+++ b/fcs/samples/InteractiveService/InteractiveService.fsproj
@@ -12,7 +12,7 @@
-
+
diff --git a/fcs/samples/Tokenizer/Program.fs b/fcs/samples/Tokenizer/Program.fs
index 402fcc3029..9cc79e699f 100644
--- a/fcs/samples/Tokenizer/Program.fs
+++ b/fcs/samples/Tokenizer/Program.fs
@@ -3,7 +3,7 @@
let sourceTok = FSharpSourceTokenizer([], Some "C:\\test.fsx")
let tokenizeLines (lines:string[]) =
- [ let state = ref 0L
+ [ let state = ref FSharpTokenizerLexState.Initial
for n, line in lines |> Seq.zip [ 0 .. lines.Length ] do
let tokenizer = sourceTok.CreateLineTokenizer(line)
let rec parseLine() = seq {
diff --git a/fcs/samples/Tokenizer/Tokenizer.fsproj b/fcs/samples/Tokenizer/Tokenizer.fsproj
index 7aa4249726..387439fcfd 100644
--- a/fcs/samples/Tokenizer/Tokenizer.fsproj
+++ b/fcs/samples/Tokenizer/Tokenizer.fsproj
@@ -12,7 +12,7 @@
-
+
diff --git a/fcs/samples/UntypedTree/UntypedTree.fsproj b/fcs/samples/UntypedTree/UntypedTree.fsproj
index 7aa4249726..387439fcfd 100644
--- a/fcs/samples/UntypedTree/UntypedTree.fsproj
+++ b/fcs/samples/UntypedTree/UntypedTree.fsproj
@@ -12,7 +12,7 @@
-
+
diff --git a/fsharp.proj b/fsharp.proj
new file mode 100644
index 0000000000..92b37d547e
--- /dev/null
+++ b/fsharp.proj
@@ -0,0 +1,170 @@
+
+
+
+ Debug
+ AssemblySearchPaths={HintPathFromItem};{TargetFrameworkDirectory};{RawFileName}
+
+
+
+
+ true
+ false
+ false
+ false
+ false
+
+ false
+ false
+ false
+ false
+ false
+
+
+
+
+ true
+ true
+ true
+ true
+ true
+ true
+
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+ TargetFramework=netstandard1.6
+ TargetFramework=net45
+
+
+ TargetFramework=netstandard2.0
+ TargetFramework=net46
+
+
+ TargetFramework=netstandard1.6
+ TargetFramework=net46
+
+
+ TargetFramework=net46
+
+
+ TargetFramework=netstandard1.6
+ TargetFramework=net46
+
+
+ TargetFramework=netcoreapp2.1
+ TargetFramework=net46
+
+
+ TargetFramework=netcoreapp2.1
+ TargetFramework=net46
+
+
+ TargetFramework=net46
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_RunningRestore>true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/global.json b/global.json
new file mode 100644
index 0000000000..ac6900880b
--- /dev/null
+++ b/global.json
@@ -0,0 +1,9 @@
+{
+ "tools": {
+ "dotnet": "2.1.500"
+ },
+ "msbuild-sdks": {
+ "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19069.2",
+ "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2"
+ }
+}
diff --git a/mono/cibuild.sh b/mono/cibuild.sh
index e91b33e783..9a5ea5af57 100755
--- a/mono/cibuild.sh
+++ b/mono/cibuild.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# note: expects to run from top directory
-./mono/latest-mono-stable.sh
+#./mono/latest-mono-stable.sh
make Configuration=$@
#sudo make install Configuration=$@
#./mono/test-mono.sh
\ No newline at end of file
diff --git a/packages.config b/packages.config
index 25a939155f..709d225851 100644
--- a/packages.config
+++ b/packages.config
@@ -1,62 +1,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/proto.proj b/proto.proj
new file mode 100644
index 0000000000..0974580af5
--- /dev/null
+++ b/proto.proj
@@ -0,0 +1,36 @@
+
+
+
+ Proto
+ AssemblySearchPaths={HintPathFromItem};{TargetFrameworkDirectory};{RawFileName}
+
+
+
+
+
+ TargetFramework=net46
+ TargetFramework=netcoreapp2.1
+
+
+ TargetFramework=net46
+ TargetFramework=netcoreapp2.1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
new file mode 100644
index 0000000000..bb8eac309b
--- /dev/null
+++ b/src/Directory.Build.props
@@ -0,0 +1,3 @@
+
+
+
diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets
new file mode 100644
index 0000000000..ccd47cc0a9
--- /dev/null
+++ b/src/Directory.Build.targets
@@ -0,0 +1,3 @@
+
+
+
diff --git a/src/absil/il.fs b/src/absil/il.fs
index c2314418fe..61c5a33a84 100644
--- a/src/absil/il.fs
+++ b/src/absil/il.fs
@@ -154,12 +154,11 @@ let unsplitTypeName (ns, n) =
| [] -> String.concat "." ns + "." + n
| _ -> n
-let splitTypeNameRightAux nm =
- if String.contains nm '.' then
- let idx = String.rindex nm '.'
- let s1, s2 = splitNameAt nm idx
- Some s1, s2
- else None, nm
+let splitTypeNameRightAux (nm:string) =
+ let idx = nm.LastIndexOf '.'
+ if idx = -1 then None, nm else
+ let s1, s2 = splitNameAt nm idx
+ Some s1, s2
let splitTypeNameRight nm =
memoizeNamespaceRightTable.GetOrAdd(nm, splitTypeNameRightAux)
@@ -310,8 +309,12 @@ module SHA1 =
let (_h0, _h1, _h2, h3, h4) = sha1Hash { stream = s; pos = 0; eof = false } // the result of the SHA algorithm is stored in registers 3 and 4
Array.map byte [| b0 h4; b1 h4; b2 h4; b3 h4; b0 h3; b1 h3; b2 h3; b3 h3; |]
+ let sha1HashInt64 s =
+ let (_h0,_h1,_h2,h3,h4) = sha1Hash { stream = s; pos = 0; eof = false } // the result of the SHA algorithm is stored in registers 3 and 4
+ (int64 h3 <<< 32) ||| int64 h4
let sha1HashBytes s = SHA1.sha1HashBytes s
+let sha1HashInt64 s = SHA1.sha1HashInt64 s
// --------------------------------------------------------------------
//
@@ -947,11 +950,25 @@ type ILAttribElem =
type ILAttributeNamedArg = (string * ILType * bool * ILAttribElem)
-[]
-type ILAttribute =
- { Method: ILMethodSpec
- Data: byte[]
- Elements: ILAttribElem list }
+[]
+type ILAttribute =
+ | Encoded of method: ILMethodSpec * data: byte[] * elements: ILAttribElem list
+ | Decoded of method: ILMethodSpec * fixedArgs: ILAttribElem list * namedArgs: ILAttributeNamedArg list
+
+ member x.Method =
+ match x with
+ | Encoded (method, _, _)
+ | Decoded (method, _, _) -> method
+
+ member x.Elements =
+ match x with
+ | Encoded (_, _, elements) -> elements
+ | Decoded (_, fixedArgs, namedArgs) -> fixedArgs @ (namedArgs |> List.map (fun (_, _, _, e) -> e))
+
+ member x.WithMethod(method: ILMethodSpec) =
+ match x with
+ | Encoded (_, data, elements) -> Encoded (method, data, elements)
+ | Decoded (_, fixedArgs, namedArgs) -> Decoded (method, fixedArgs, namedArgs)
/// For debugging
[]
@@ -2313,7 +2330,7 @@ let mkILNonGenericValueTy tref = mkILNamedTy AsValue tref []
let mkILNonGenericBoxedTy tref = mkILNamedTy AsObject tref []
-let mkSimpleAssRef n =
+let mkSimpleAssemblyRef n =
ILAssemblyRef.Create(n, None, None, false, None, None)
let mkSimpleModRef n =
@@ -3174,9 +3191,9 @@ let destTypeDefsWithGlobalFunctionsFirst ilg (tdefs: ILTypeDefs) =
let top2 = if isNil top then [ mkILTypeDefForGlobalFunctions ilg (emptyILMethods, emptyILFields) ] else top
top2@nontop
-let mkILSimpleModule assname modname dll subsystemVersion useHighEntropyVA tdefs hashalg locale flags exportedTypes metadataVersion =
+let mkILSimpleModule assemblyName modname dll subsystemVersion useHighEntropyVA tdefs hashalg locale flags exportedTypes metadataVersion =
let manifest =
- { Name=assname
+ { Name=assemblyName
AuxModuleHashAlgorithm= match hashalg with | Some(alg) -> alg | _ -> 0x8004 // SHA1
SecurityDeclsStored=emptyILSecurityDeclsStored
PublicKey= None
@@ -3572,21 +3589,30 @@ let encodeCustomAttrNamedArg ilg (nm, ty, prop, elem) =
yield! encodeCustomAttrString nm
yield! encodeCustomAttrValue ilg ty elem |]
-let mkILCustomAttribMethRef (ilg: ILGlobals) (mspec:ILMethodSpec, fixedArgs: list<_>, namedArgs: list<_>) =
+let encodeCustomAttrArgs (ilg: ILGlobals) (mspec:ILMethodSpec) (fixedArgs: list<_>) (namedArgs: list<_>) =
let argtys = mspec.MethodRef.ArgTypes
- let args =
- [| yield! [| 0x01uy; 0x00uy; |]
- for (argty, fixedArg) in Seq.zip argtys fixedArgs do
- yield! encodeCustomAttrValue ilg argty fixedArg
- yield! u16AsBytes (uint16 namedArgs.Length)
- for namedArg in namedArgs do
- yield! encodeCustomAttrNamedArg ilg namedArg |]
- { Method = mspec
- Data = args
- Elements = fixedArgs @ (namedArgs |> List.map(fun (_, _, _, e) -> e)) }
-
-let mkILCustomAttribute ilg (tref, argtys, argvs, propvs) =
- mkILCustomAttribMethRef ilg (mkILNonGenericCtorMethSpec (tref, argtys), argvs, propvs)
+ [| yield! [| 0x01uy; 0x00uy; |]
+ for (argty, fixedArg) in Seq.zip argtys fixedArgs do
+ yield! encodeCustomAttrValue ilg argty fixedArg
+ yield! u16AsBytes (uint16 namedArgs.Length)
+ for namedArg in namedArgs do
+ yield! encodeCustomAttrNamedArg ilg namedArg |]
+
+let encodeCustomAttr (ilg: ILGlobals) (mspec:ILMethodSpec, fixedArgs: list<_>, namedArgs: list<_>) =
+ let args = encodeCustomAttrArgs ilg mspec fixedArgs namedArgs
+ ILAttribute.Encoded (mspec, args, fixedArgs @ (namedArgs |> List.map (fun (_, _, _, e) -> e)))
+
+let mkILCustomAttribMethRef (ilg: ILGlobals) (mspec:ILMethodSpec, fixedArgs: list<_>, namedArgs: list<_>) =
+ encodeCustomAttr ilg (mspec, fixedArgs, namedArgs)
+
+let mkILCustomAttribute ilg (tref, argtys, argvs, propvs) =
+ encodeCustomAttr ilg (mkILNonGenericCtorMethSpec (tref, argtys), argvs, propvs)
+
+let getCustomAttrData (ilg: ILGlobals) cattr =
+ match cattr with
+ | ILAttribute.Encoded (_, data, _) -> data
+ | ILAttribute.Decoded (mspec, fixedArgs, namedArgs) ->
+ encodeCustomAttrArgs ilg mspec fixedArgs namedArgs
let MscorlibScopeRef = ILScopeRef.Assembly (ILAssemblyRef.Create("mscorlib", None, Some ecmaPublicKey, true, None, None))
let EcmaMscorlibILGlobals = mkILGlobals MscorlibScopeRef
@@ -3755,7 +3781,10 @@ type ILTypeSigParser(tstring : string) =
ILAttribElem.Type(Some(ilty))
let decodeILAttribData (ilg: ILGlobals) (ca: ILAttribute) =
- let bytes = ca.Data
+ match ca with
+ | ILAttribute.Decoded (_, fixedArgs, namedArgs) -> fixedArgs, namedArgs
+ | ILAttribute.Encoded (_, bytes, _) ->
+
let sigptr = 0
let bb0, sigptr = sigptr_get_byte bytes sigptr
let bb1, sigptr = sigptr_get_byte bytes sigptr
@@ -3892,13 +3921,13 @@ let emptyILRefs =
ModuleReferences = [] }
(* Now find references. *)
-let refs_of_assref (s:ILReferencesAccumulator) x = s.refsA.Add x |> ignore
+let refs_of_assemblyRef (s:ILReferencesAccumulator) x = s.refsA.Add x |> ignore
let refs_of_modref (s:ILReferencesAccumulator) x = s.refsM.Add x |> ignore
let refs_of_scoref s x =
match x with
| ILScopeRef.Local -> ()
- | ILScopeRef.Assembly assref -> refs_of_assref s assref
+ | ILScopeRef.Assembly assemblyRef -> refs_of_assemblyRef s assemblyRef
| ILScopeRef.Module modref -> refs_of_modref s modref
let refs_of_tref s (x:ILTypeRef) = refs_of_scoref s x.Scope
@@ -3944,9 +3973,9 @@ and refs_of_token s x =
| ILToken.ILMethod mr -> refs_of_mspec s mr
| ILToken.ILField fr -> refs_of_fspec s fr
-and refs_of_custom_attr s x = refs_of_mspec s x.Method
+and refs_of_custom_attr s (cattr: ILAttribute) = refs_of_mspec s cattr.Method
-and refs_of_custom_attrs s (cas : ILAttributes) = List.iter (refs_of_custom_attr s) cas.AsList
+and refs_of_custom_attrs s (cas : ILAttributes) = Array.iter (refs_of_custom_attr s) cas.AsArray
and refs_of_varargs s tyso = Option.iter (refs_of_tys s) tyso
and refs_of_instr s x =
match x with
@@ -4070,7 +4099,7 @@ and refs_of_resource_where s x =
| ILResourceLocation.LocalIn _ -> ()
| ILResourceLocation.LocalOut _ -> ()
| ILResourceLocation.File (mref, _) -> refs_of_modref s mref
- | ILResourceLocation.Assembly aref -> refs_of_assref s aref
+ | ILResourceLocation.Assembly aref -> refs_of_assemblyRef s aref
and refs_of_resource s x =
refs_of_resource_where s x.Location
@@ -4189,23 +4218,6 @@ let resolveILMethodRef td mref = resolveILMethodRefWithRescope id td mref
let mkRefToILModule m =
ILModuleRef.Create(m.Name, true, None)
-
-let ungenericizeTypeName n =
- let sym = '`'
- if
- String.contains n sym &&
- (* check what comes after the symbol is a number *)
- (let m = String.rindex n sym
- let res = ref (m < n.Length - 1)
- for i = m + 1 to n.Length - 1 do
- res := !res && n.[i] >= '0' && n.[i] <= '9'
- !res)
- then
- let pos = String.rindex n sym
- String.sub n 0 pos
- else n
-
-
type ILEventRef =
{ erA: ILTypeRef; erB: string }
static member Create(a, b) = {erA=a;erB=b}
diff --git a/src/absil/il.fsi b/src/absil/il.fsi
index 6ed4d42aa3..668459088f 100755
--- a/src/absil/il.fsi
+++ b/src/absil/il.fsi
@@ -752,12 +752,22 @@ type ILAttribElem =
/// Named args: values and flags indicating if they are fields or properties.
type ILAttributeNamedArg = string * ILType * bool * ILAttribElem
-/// Custom attributes. See 'decodeILAttribData' for a helper to parse the byte[]
-/// to ILAttribElem's as best as possible.
+/// Custom attribute.
type ILAttribute =
- { Method: ILMethodSpec
- Data: byte[]
- Elements: ILAttribElem list}
+ /// Attribute with args encoded to a binary blob according to ECMA-335 II.21 and II.23.3.
+ /// 'decodeILAttribData' is used to parse the byte[] blob to ILAttribElem's as best as possible.
+ | Encoded of method: ILMethodSpec * data: byte[] * elements: ILAttribElem list
+
+ /// Attribute with args in decoded form.
+ | Decoded of method: ILMethodSpec * fixedArgs: ILAttribElem list * namedArgs: ILAttributeNamedArg list
+
+ /// Attribute instance constructor.
+ member Method: ILMethodSpec
+
+ /// Decoded arguments. May be empty in encoded attribute form.
+ member Elements: ILAttribElem list
+
+ member WithMethod: method: ILMethodSpec -> ILAttribute
[]
type ILAttributes =
@@ -1540,9 +1550,6 @@ val typeNameForGlobalFunctions: string
val isTypeNameForGlobalFunctions: string -> bool
-val ungenericizeTypeName: string -> string (* e.g. List`1 --> List *)
-
-
// ====================================================================
// PART 2
//
@@ -1598,7 +1605,7 @@ val decodeILAttribData:
ILAttributeNamedArg list (* named args: values and flags indicating if they are fields or properties *)
/// Generate simple references to assemblies and modules.
-val mkSimpleAssRef: string -> ILAssemblyRef
+val mkSimpleAssemblyRef: string -> ILAssemblyRef
val mkSimpleModRef: string -> ILModuleRef
@@ -1682,6 +1689,8 @@ val mkILCustomAttribute:
ILAttributeNamedArg list (* named args: values and flags indicating if they are fields or properties *)
-> ILAttribute
+val getCustomAttrData: ILGlobals -> ILAttribute -> byte[]
+
val mkPermissionSet: ILGlobals -> ILSecurityAction * (ILTypeRef * (string * ILType * ILAttribElem) list) list -> ILSecurityDecl
/// Making code.
@@ -1946,6 +1955,7 @@ val isILTypedReferenceTy: ILType -> bool
val isILDoubleTy: ILType -> bool
val isILSingleTy: ILType -> bool
+val sha1HashInt64 : byte[] -> int64
/// Get a public key token from a public key.
val sha1HashBytes: byte[] -> byte[] (* SHA1 hash *)
diff --git a/src/absil/illib.fs b/src/absil/illib.fs
index b2fd979a55..4426160638 100755
--- a/src/absil/illib.fs
+++ b/src/absil/illib.fs
@@ -41,6 +41,10 @@ let inline isNonNull x = not (isNull x)
let inline nonNull msg x = if isNull x then failwith ("null: " + msg) else x
let inline (===) x y = LanguagePrimitives.PhysicalEquality x y
+/// Per the docs the threshold for the Large Object Heap is 85000 bytes: https://docs.microsoft.com/en-us/dotnet/standard/garbage-collection/large-object-heap#how-an-object-ends-up-on-the-large-object-heap-and-how-gc-handles-them
+/// We set the limit to slightly under that to allow for some 'slop'
+let LOH_SIZE_THRESHOLD_BYTES = 84_900
+
//---------------------------------------------------------------------
// Library: ReportTime
//---------------------------------------------------------------------
@@ -91,7 +95,7 @@ module Order =
let toFunction (pxOrder: IComparer<'U>) x y = pxOrder.Compare(x,y)
//-------------------------------------------------------------------------
-// Library: arrays,lists,options
+// Library: arrays,lists,options,resizearrays
//-------------------------------------------------------------------------
module Array =
@@ -432,18 +436,57 @@ module List =
let existsSquared f xss = xss |> List.exists (fun xs -> xs |> List.exists (fun x -> f x))
let mapiFoldSquared f z xss = mapFoldSquared f z (xss |> mapiSquared (fun i j x -> (i,j,x)))
-[]
-type ValueOption<'T> =
- | ValueSome of 'T
- | ValueNone
- member x.IsSome = match x with ValueSome _ -> true | ValueNone -> false
- member x.IsNone = match x with ValueSome _ -> false | ValueNone -> true
- member x.Value = match x with ValueSome r -> r | ValueNone -> failwith "ValueOption.Value: value is None"
+module ResizeArray =
-[]
-module ValueOption =
+ /// Split a ResizeArray into an array of smaller chunks.
+ /// This requires `items/chunkSize` Array copies of length `chunkSize` if `items/chunkSize % 0 = 0`,
+ /// otherwise `items/chunkSize + 1` Array copies.
+ let chunkBySize chunkSize f (items: ResizeArray<'t>) =
+ // we could use Seq.chunkBySize here, but that would involve many enumerator.MoveNext() calls that we can sidestep with a bit of math
+ let itemCount = items.Count
+ if itemCount = 0
+ then [||]
+ else
+ let chunksCount =
+ match itemCount / chunkSize with
+ | n when itemCount % chunkSize = 0 -> n
+ | n -> n + 1 // any remainder means we need an additional chunk to store it
+
+ [| for index in 0..chunksCount-1 do
+ let startIndex = index * chunkSize
+ let takeCount = min (itemCount - startIndex) chunkSize
+
+ let holder = Array.zeroCreate takeCount
+ // we take a bounds-check hit here on each access.
+ // other alternatives here include
+ // * iterating across an IEnumerator (incurs MoveNext penalty)
+ // * doing a block copy using `List.CopyTo(index, array, index, count)` (requires more copies to do the mapping)
+ // none are significantly better.
+ for i in 0 .. takeCount - 1 do
+ holder.[i] <- f items.[i]
+ yield holder |]
+
+ /// Split a large ResizeArray into a series of array chunks that are each under the Large Object Heap limit.
+ /// This is done to help prevent a stop-the-world collection of the single large array, instead allowing for a greater
+ /// probability of smaller collections. Stop-the-world is still possible, just less likely.
+ let mapToSmallArrayChunks f (inp: ResizeArray<'t>) =
+ let itemSizeBytes = sizeof<'t>
+ // rounding down here is good because it ensures we don't go over
+ let maxArrayItemCount = LOH_SIZE_THRESHOLD_BYTES / itemSizeBytes
+
+ /// chunk the provided input into arrays that are smaller than the LOH limit
+ /// in order to prevent long-term storage of those values
+ chunkBySize maxArrayItemCount f inp
+
+
+/// Because FSharp.Compiler.Service is a library that will target FSharp.Core 4.5.2 for the forseeable future,
+/// we need to stick these functions in this module rather than using the module functions for ValueOption
+/// that come after FSharp.Core 4.5.2.
+module ValueOptionInternal =
let inline ofOption x = match x with Some x -> ValueSome x | None -> ValueNone
let inline bind f x = match x with ValueSome x -> f x | ValueNone -> ValueNone
+ let inline isSome x = match x with ValueSome _ -> true | ValueNone -> false
+ let inline isNone x = match x with ValueSome _ -> false | ValueNone -> true
type String with
member inline x.StartsWithOrdinal(value) =
@@ -452,25 +495,14 @@ type String with
member inline x.EndsWithOrdinal(value) =
x.EndsWith(value, StringComparison.Ordinal)
-module String =
- let indexNotFound() = raise (new KeyNotFoundException("An index for the character was not found in the string"))
-
+module String =
let make (n: int) (c: char) : string = new String(c, n)
let get (str:string) i = str.[i]
let sub (s:string) (start:int) (len:int) = s.Substring(start,len)
- let index (s:string) (c:char) =
- let r = s.IndexOf(c)
- if r = -1 then indexNotFound() else r
-
- let rindex (s:string) (c:char) =
- let r = s.LastIndexOf(c)
- if r = -1 then indexNotFound() else r
-
- let contains (s:string) (c:char) =
- s.IndexOf(c,0,String.length s) <> -1
+ let contains (s:string) (c:char) = s.IndexOf(c) <> -1
let order = LanguagePrimitives.FastGenericComparer
@@ -1134,7 +1166,7 @@ module NameMap =
[]
module NameMultiMap =
let existsInRange f (m: NameMultiMap<'T>) = NameMap.exists (fun _ l -> List.exists f l) m
- let find v (m: NameMultiMap<'T>) = match Map.tryFind v m with None -> [] | Some r -> r
+ let find v (m: NameMultiMap<'T>) = match m.TryGetValue v with true, r -> r | _ -> []
let add v x (m: NameMultiMap<'T>) = NameMap.add v (x :: find v m) m
let range (m: NameMultiMap<'T>) = Map.foldBack (fun _ x sofar -> x @ sofar) m []
let rangeReversingEachBucket (m: NameMultiMap<'T>) = Map.foldBack (fun _ x sofar -> List.rev x @ sofar) m []
@@ -1148,7 +1180,7 @@ module NameMultiMap =
[]
module MultiMap =
let existsInRange f (m: MultiMap<_,_>) = Map.exists (fun _ l -> List.exists f l) m
- let find v (m: MultiMap<_,_>) = match Map.tryFind v m with None -> [] | Some r -> r
+ let find v (m: MultiMap<_,_>) = match m.TryGetValue v with true, r -> r | _ -> []
let add v x (m: MultiMap<_,_>) = Map.add v (x :: find v m) m
let range (m: MultiMap<_,_>) = Map.foldBack (fun _ x sofar -> x @ sofar) m []
let empty : MultiMap<_,_> = Map.empty
@@ -1159,11 +1191,6 @@ type LayeredMap<'Key,'Value when 'Key : comparison> = Map<'Key,'Value>
type Map<'Key,'Value when 'Key : comparison> with
static member Empty : Map<'Key,'Value> = Map.empty
- member m.TryGetValue (key,res:byref<'Value>) =
- match m.TryFind key with
- | None -> false
- | Some r -> res <- r; true
-
member x.Values = [ for (KeyValue(_,v)) in x -> v ]
member x.AddAndMarkAsCollapsible (kvs: _[]) = (x,kvs) ||> Array.fold (fun x (KeyValue(k,v)) -> x.Add(k,v))
member x.LinearTryModifyThenLaterFlatten (key, f: 'Value option -> 'Value) = x.Add (key, f (x.TryFind key))
@@ -1173,12 +1200,13 @@ type Map<'Key,'Value when 'Key : comparison> with
[]
type LayeredMultiMap<'Key,'Value when 'Key : equality and 'Key : comparison>(contents : LayeredMap<'Key,'Value list>) =
member x.Add (k,v) = LayeredMultiMap(contents.Add(k,v :: x.[k]))
- member x.Item with get k = match contents.TryFind k with None -> [] | Some l -> l
+ member x.Item with get k = match contents.TryGetValue k with true, l -> l | _ -> []
member x.AddAndMarkAsCollapsible (kvs: _[]) =
let x = (x,kvs) ||> Array.fold (fun x (KeyValue(k,v)) -> x.Add(k,v))
x.MarkAsCollapsible()
member x.MarkAsCollapsible() = LayeredMultiMap(contents.MarkAsCollapsible())
member x.TryFind k = contents.TryFind k
+ member x.TryGetValue k = contents.TryGetValue k
member x.Values = contents.Values |> List.concat
static member Empty : LayeredMultiMap<'Key,'Value> = LayeredMultiMap LayeredMap.Empty
diff --git a/src/absil/ilmorph.fs b/src/absil/ilmorph.fs
index c6d009cd4d..d5398099e0 100755
--- a/src/absil/ilmorph.fs
+++ b/src/absil/ilmorph.fs
@@ -136,7 +136,7 @@ let rec celem_ty2ty f celem =
let cnamedarg_ty2ty f ((nm, ty, isProp, elem) : ILAttributeNamedArg) =
(nm, f ty, isProp, celem_ty2ty f elem)
-let cattr_ty2ty ilg f c =
+let cattr_ty2ty ilg f (c: ILAttribute) =
let meth = mspec_ty2ty (f, (fun _ -> f)) c.Method
// dev11 M3 defensive coding: if anything goes wrong with attribute decoding or encoding, then back out.
if morphCustomAttributeData then
@@ -144,11 +144,11 @@ let cattr_ty2ty ilg f c =
let elems,namedArgs = IL.decodeILAttribData ilg c
let elems = elems |> List.map (celem_ty2ty f)
let namedArgs = namedArgs |> List.map (cnamedarg_ty2ty f)
- IL.mkILCustomAttribMethRef ilg (meth, elems, namedArgs)
- with _ ->
- { c with Method = meth }
+ mkILCustomAttribMethRef ilg (meth, elems, namedArgs)
+ with _ ->
+ c.WithMethod(meth)
else
- { c with Method = meth }
+ c.WithMethod(meth)
let cattrs_ty2ty ilg f (cs: ILAttributes) =
diff --git a/src/absil/ilprint.fs b/src/absil/ilprint.fs
index f11524bc8d..58c13ba148 100755
--- a/src/absil/ilprint.fs
+++ b/src/absil/ilprint.fs
@@ -30,13 +30,14 @@ let tyvar_generator =
// Carry an environment because the way we print method variables
// depends on the gparams of the current scope.
type ppenv =
- { ppenvClassFormals: int;
+ { ilGlobals: ILGlobals
+ ppenvClassFormals: int;
ppenvMethodFormals: int }
let ppenv_enter_method mgparams env =
{env with ppenvMethodFormals=mgparams}
let ppenv_enter_tdef gparams env =
{env with ppenvClassFormals=List.length gparams; ppenvMethodFormals=0}
-let mk_ppenv = { ppenvClassFormals=0; ppenvMethodFormals=0 }
+let mk_ppenv ilg = { ilGlobals = ilg; ppenvClassFormals = 0; ppenvMethodFormals = 0 }
let debug_ppenv = mk_ppenv
let ppenv_enter_modul env = { env with ppenvClassFormals=0; ppenvMethodFormals=0 }
@@ -97,6 +98,13 @@ let output_seq sep f os (a:seq<_>) =
output_string os sep;
f os e.Current
+let output_array sep f os (a:_ []) =
+ if not (Array.isEmpty a) then
+ for i in 0..a.Length-2 do
+ f os a.[i]
+ output_string os sep
+ f os (a.[a.Length - 1])
+
let output_parens f os a = output_string os "("; f os a; output_string os ")"
let output_angled f os a = output_string os "<"; f os a; output_string os ">"
let output_bracks f os a = output_string os "["; f os a; output_string os "]"
@@ -436,12 +444,12 @@ let output_option f os = function None -> () | Some x -> f os x
let goutput_alternative_ref env os (alt: IlxUnionAlternative) =
output_id os alt.Name;
- alt.FieldDefs |> Array.toList |> output_parens (output_seq "," (fun os fdef -> goutput_typ env os fdef.Type)) os
+ alt.FieldDefs |> output_parens (output_array "," (fun os fdef -> goutput_typ env os fdef.Type)) os
let goutput_curef env os (IlxUnionRef(_,tref,alts,_,_)) =
output_string os " .classunion import ";
goutput_tref env os tref;
- output_parens (output_seq "," (goutput_alternative_ref env)) os (Array.toList alts)
+ output_parens (output_array "," (goutput_alternative_ref env)) os alts
let goutput_cuspec env os (IlxUnionSpec(IlxUnionRef(_,tref,_,_,_),i)) =
output_string os "class /* classunion */ ";
@@ -469,13 +477,14 @@ let output_basic_type os x =
let output_custom_attr_data os data =
output_string os " = "; output_parens output_bytes os data
-let goutput_custom_attr env os attr =
+let goutput_custom_attr env os (attr: ILAttribute) =
output_string os " .custom "
goutput_mspec env os attr.Method
- output_custom_attr_data os attr.Data
+ let data = getCustomAttrData env.ilGlobals attr
+ output_custom_attr_data os data
let goutput_custom_attrs env os (attrs : ILAttributes) =
- List.iter (fun attr -> goutput_custom_attr env os attr; output_string os "\n" ) attrs.AsList
+ Array.iter (fun attr -> goutput_custom_attr env os attr; output_string os "\n" ) attrs.AsArray
let goutput_fdef _tref env os (fd: ILFieldDef) =
output_string os " .field "
@@ -702,7 +711,7 @@ let rec goutput_instr env os inst =
goutput_dlocref env os (mkILArrTy(typ,shape));
output_string os ".ctor";
let rank = shape.Rank
- output_parens (output_seq "," (goutput_typ env)) os (Array.toList (Array.create ( rank) EcmaMscorlibILGlobals.typ_Int32))
+ output_parens (output_array "," (goutput_typ env)) os (Array.create ( rank) EcmaMscorlibILGlobals.typ_Int32)
| I_stelem_any (shape,dt) ->
if shape = ILArrayShape.SingleDimensional then
output_string os "stelem.any "; goutput_typ env os dt
@@ -711,7 +720,9 @@ let rec goutput_instr env os inst =
goutput_dlocref env os (mkILArrTy(dt,shape));
output_string os "Set";
let rank = shape.Rank
- output_parens (output_seq "," (goutput_typ env)) os (Array.toList (Array.create ( rank) EcmaMscorlibILGlobals.typ_Int32) @ [dt])
+ let arr = Array.create (rank + 1) EcmaMscorlibILGlobals.typ_Int32
+ arr.[rank] <- dt
+ output_parens (output_array "," (goutput_typ env)) os arr
| I_ldelem_any (shape,tok) ->
if shape = ILArrayShape.SingleDimensional then
output_string os "ldelem.any "; goutput_typ env os tok
@@ -722,7 +733,7 @@ let rec goutput_instr env os inst =
goutput_dlocref env os (mkILArrTy(tok,shape));
output_string os "Get";
let rank = shape.Rank
- output_parens (output_seq "," (goutput_typ env)) os (Array.toList (Array.create ( rank) EcmaMscorlibILGlobals.typ_Int32))
+ output_parens (output_array "," (goutput_typ env)) os (Array.create ( rank) EcmaMscorlibILGlobals.typ_Int32)
| I_ldelema (ro,_,shape,tok) ->
if ro = ReadonlyAddress then output_string os "readonly. ";
if shape = ILArrayShape.SingleDimensional then
@@ -734,7 +745,7 @@ let rec goutput_instr env os inst =
goutput_dlocref env os (mkILArrTy(tok,shape));
output_string os "Address";
let rank = shape.Rank
- output_parens (output_seq "," (goutput_typ env)) os (Array.toList (Array.create ( rank) EcmaMscorlibILGlobals.typ_Int32))
+ output_parens (output_array "," (goutput_typ env)) os (Array.create ( rank) EcmaMscorlibILGlobals.typ_Int32)
| I_box tok -> output_string os "box "; goutput_typ env os tok
| I_unbox tok -> output_string os "unbox "; goutput_typ env os tok
@@ -888,7 +899,7 @@ let splitTypeLayout = function
let goutput_fdefs tref env os (fdefs: ILFieldDefs) =
List.iter (fun f -> (goutput_fdef tref env) os f; output_string os "\n" ) fdefs.AsList
let goutput_mdefs env os (mdefs: ILMethodDefs) =
- List.iter (fun f -> (goutput_mdef env) os f; output_string os "\n" ) mdefs.AsList
+ Array.iter (fun f -> (goutput_mdef env) os f; output_string os "\n" ) mdefs.AsArray
let goutput_pdefs env os (pdefs: ILPropertyDefs) =
List.iter (fun f -> (goutput_pdef env) os f; output_string os "\n" ) pdefs.AsList
@@ -975,7 +986,7 @@ let output_publickeyinfo os = function
| PublicKey k -> output_publickey os k
| PublicKeyToken k -> output_publickeytoken os k
-let output_assref os (aref:ILAssemblyRef) =
+let output_assemblyRef os (aref:ILAssemblyRef) =
output_string os " .assembly extern ";
output_sqstring os aref.Name;
if aref.Retargetable then output_string os " retargetable ";
@@ -1029,9 +1040,9 @@ let goutput_manifest env os m =
output_string os " } \n"
-let output_module_fragment_aux _refs os modul =
+let output_module_fragment_aux _refs os (ilg: ILGlobals) modul =
try
- let env = mk_ppenv
+ let env = mk_ppenv ilg
let env = ppenv_enter_modul env
goutput_tdefs false ([]) env os modul.TypeDefs;
goutput_tdefs true ([]) env os modul.TypeDefs;
@@ -1039,13 +1050,13 @@ let output_module_fragment_aux _refs os modul =
output_string os "*** Error during printing : "; output_string os (e.ToString()); os.Flush();
reraise()
-let output_module_fragment os modul =
+let output_module_fragment os (ilg: ILGlobals) modul =
let refs = computeILRefs modul
- output_module_fragment_aux refs os modul;
+ output_module_fragment_aux refs os ilg modul
refs
let output_module_refs os refs =
- List.iter (fun x -> output_assref os x; output_string os "\n") refs.AssemblyReferences;
+ List.iter (fun x -> output_assemblyRef os x; output_string os "\n") refs.AssemblyReferences;
List.iter (fun x -> output_modref os x; output_string os "\n") refs.ModuleReferences
let goutput_module_manifest env os modul =
@@ -1059,14 +1070,14 @@ let goutput_module_manifest env os modul =
output_string os "\n";
(output_option (goutput_manifest env)) os modul.Manifest
-let output_module os modul =
+let output_module os (ilg: ILGlobals) modul =
try
let refs = computeILRefs modul
- let env = mk_ppenv
+ let env = mk_ppenv ilg
let env = ppenv_enter_modul env
output_module_refs os refs;
goutput_module_manifest env os modul;
- output_module_fragment_aux refs os modul;
+ output_module_fragment_aux refs os ilg modul;
with e ->
output_string os "*** Error during printing : "; output_string os (e.ToString()); os.Flush();
raise e
diff --git a/src/absil/ilprint.fsi b/src/absil/ilprint.fsi
index 55e768ab68..5f7ebe4f11 100755
--- a/src/absil/ilprint.fsi
+++ b/src/absil/ilprint.fsi
@@ -9,6 +9,6 @@ open Microsoft.FSharp.Compiler.AbstractIL.Internal
open System.IO
#if DEBUG
-val public output_module : TextWriter -> ILModuleDef -> unit
+val public output_module: TextWriter -> ilg: ILGlobals -> ILModuleDef -> unit
#endif
diff --git a/src/absil/ilread.fs b/src/absil/ilread.fs
index 5d94041dae..c2c10e9479 100755
--- a/src/absil/ilread.fs
+++ b/src/absil/ilread.fs
@@ -2101,7 +2101,7 @@ and sigptrGetTy (ctxt: ILMetadataReader) numtypars bytes sigptr =
let dim i =
(if i < numLoBounded then Some (List.item i lobounds) else None),
(if i < numSized then Some (List.item i sizes) else None)
- ILArrayShape (Array.toList (Array.init rank dim))
+ ILArrayShape (List.init rank dim)
mkILArrTy (ty, shape), sigptr
elif b0 = et_VOID then ILType.Void, sigptr
@@ -2567,12 +2567,13 @@ and seekReadCustomAttr ctxt (TaggedIndex(cat, idx), b) =
and seekReadCustomAttrUncached ctxtH (CustomAttrIdx (cat, idx, valIdx)) =
let ctxt = getHole ctxtH
- { Method=seekReadCustomAttrType ctxt (TaggedIndex(cat, idx))
- Data=
+ let method = seekReadCustomAttrType ctxt (TaggedIndex(cat, idx))
+ let data =
match readBlobHeapOption ctxt valIdx with
| Some bytes -> bytes
- | None -> Bytes.ofInt32Array [| |]
- Elements = [] }
+ | None -> Bytes.ofInt32Array [| |]
+ let elements = []
+ ILAttribute.Encoded (method, data, elements)
and securityDeclsReader ctxtH tag =
mkILSecurityDeclsReader
diff --git a/src/absil/ilreflect.fs b/src/absil/ilreflect.fs
index c07408e8ab..5e15cbbd37 100755
--- a/src/absil/ilreflect.fs
+++ b/src/absil/ilreflect.fs
@@ -289,6 +289,7 @@ module Zmap =
let equalTypes (s:Type) (t:Type) = s.Equals(t)
let equalTypeLists ss tt = List.lengthsEqAndForall2 equalTypes ss tt
+let equalTypeArrays ss tt = Array.lengthsEqAndForall2 equalTypes ss tt
let getGenericArgumentsOfType (typT : Type) =
if typT.IsGenericType then typT.GetGenericArguments() else [| |]
@@ -763,7 +764,9 @@ let queryableTypeGetMethodBySearch cenv emEnv parentT (mref:ILMethodRef) =
res
match List.tryFind select methInfos with
- | None -> failwith "convMethodRef: could not bind to method"
+ | None ->
+ let methNames = methInfos |> List.map (fun m -> m.Name) |> List.distinct
+ failwithf "convMethodRef: could not bind to method '%A' of type '%s'" (System.String.Join(", ", methNames)) parentT.AssemblyQualifiedName
| Some methInfo -> methInfo (* return MethodInfo for (generic) type's (generic) method *)
let queryableTypeGetMethod cenv emEnv parentT (mref:ILMethodRef) =
@@ -1412,16 +1415,16 @@ let emitMethodBody cenv modB emEnv ilG _name (mbody: ILLazyMethodBody) =
| MethodBody.Native -> failwith "emitMethodBody: native"
| MethodBody.NotAvailable -> failwith "emitMethodBody: metadata only"
-let convCustomAttr cenv emEnv cattr =
+let convCustomAttr cenv emEnv (cattr: ILAttribute) =
let methInfo =
match convConstructorSpec cenv emEnv cattr.Method with
| null -> failwithf "convCustomAttr: %+A" cattr.Method
| res -> res
- let data = cattr.Data
+ let data = getCustomAttrData cenv.ilg cattr
(methInfo, data)
let emitCustomAttr cenv emEnv add cattr = add (convCustomAttr cenv emEnv cattr)
-let emitCustomAttrs cenv emEnv add (cattrs : ILAttributes) = List.iter (emitCustomAttr cenv emEnv add) cattrs.AsList
+let emitCustomAttrs cenv emEnv add (cattrs : ILAttributes) = Array.iter (emitCustomAttr cenv emEnv add) cattrs.AsArray
//----------------------------------------------------------------------------
// buildGenParams
@@ -1595,9 +1598,7 @@ let rec buildMethodPass3 cenv tref modB (typB:TypeBuilder) emEnv (mdef : ILMetho
(getGenericArgumentsOfType (typB.AsType()))
(getGenericArgumentsOfMethod methB))
- match mdef.Return.CustomAttrs.AsList with
- | [] -> ()
- | _ ->
+ if not (Array.isEmpty mdef.Return.CustomAttrs.AsArray) then
let retB = methB.DefineParameterAndLog(0, System.Reflection.ParameterAttributes.Retval, null)
emitCustomAttrs cenv emEnv (wrapCustomAttr retB.SetCustomAttribute) mdef.Return.CustomAttrs
@@ -1823,7 +1824,7 @@ let rec buildTypeDefPass2 cenv nesting emEnv (tdef : ILTypeDef) =
// add interface impls
tdef.Implements |> convTypes cenv emEnv |> List.iter (fun implT -> typB.AddInterfaceImplementationAndLog(implT));
// add methods, properties
- let emEnv = List.fold (buildMethodPass2 cenv tref typB) emEnv tdef.Methods.AsList
+ let emEnv = Array.fold (buildMethodPass2 cenv tref typB) emEnv tdef.Methods.AsArray
let emEnv = List.fold (buildFieldPass2 cenv tref typB) emEnv tdef.Fields.AsList
let emEnv = List.fold (buildPropertyPass2 cenv tref typB) emEnv tdef.Properties.AsList
let emEnv = envPopTyvars emEnv
@@ -1940,7 +1941,7 @@ let createTypeRef (visited : Dictionary<_, _>, created : Dictionary<_, _>) emEnv
traverseType CollectTypes.All cx
if verbose2 then dprintf "buildTypeDefPass4: Doing method constraints of %s\n" tdef.Name
- for md in tdef.Methods.AsList do
+ for md in tdef.Methods.AsArray do
for gp in md.GenericParams do
for cx in gp.Constraints do
traverseType CollectTypes.All cx
diff --git a/src/absil/ilwrite.fs b/src/absil/ilwrite.fs
index d28348bf86..12541d5089 100755
--- a/src/absil/ilwrite.fs
+++ b/src/absil/ilwrite.fs
@@ -1382,8 +1382,9 @@ and GetMethodRefAsCustomAttribType cenv (mref:ILMethodRef) =
let rec GetCustomAttrDataAsBlobIdx cenv (data:byte[]) =
if data.Length = 0 then 0 else GetBytesAsBlobIdx cenv data
-and GetCustomAttrRow cenv hca attr =
+and GetCustomAttrRow cenv hca (attr: ILAttribute) =
let cat = GetMethodRefAsCustomAttribType cenv attr.Method.MethodRef
+ let data = getCustomAttrData cenv.ilg attr
for element in attr.Elements do
match element with
| ILAttribElem.Type (Some ty) when ty.IsNominal -> GetTypeRefAsTypeRefIdx cenv ty.TypeRef |> ignore
@@ -1393,14 +1394,14 @@ and GetCustomAttrRow cenv hca attr =
UnsharedRow
[| HasCustomAttribute (fst hca, snd hca);
CustomAttributeType (fst cat, snd cat);
- Blob (GetCustomAttrDataAsBlobIdx cenv attr.Data)
+ Blob (GetCustomAttrDataAsBlobIdx cenv data)
|]
and GenCustomAttrPass3Or4 cenv hca attr =
AddUnsharedRow cenv TableNames.CustomAttribute (GetCustomAttrRow cenv hca attr) |> ignore
and GenCustomAttrsPass3Or4 cenv hca (attrs: ILAttributes) =
- attrs.AsList |> List.iter (GenCustomAttrPass3Or4 cenv hca)
+ attrs.AsArray |> Array.iter (GenCustomAttrPass3Or4 cenv hca)
// --------------------------------------------------------------------
// ILSecurityDecl --> DeclSecurity rows
@@ -2462,7 +2463,7 @@ let GenReturnAsParamRow (returnv : ILReturn) =
StringE 0 |]
let GenReturnPass3 cenv (returnv: ILReturn) =
- if Option.isSome returnv.Marshal || not (isNil returnv.CustomAttrs.AsList) then
+ if Option.isSome returnv.Marshal || not (Array.isEmpty returnv.CustomAttrs.AsArray) then
let pidx = AddUnsharedRow cenv TableNames.Param (GenReturnAsParamRow returnv)
GenCustomAttrsPass3Or4 cenv (hca_ParamDef, pidx) returnv.CustomAttrs
match returnv.Marshal with
diff --git a/src/buildtools/buildtools.proj b/src/buildtools/buildtools.proj
new file mode 100644
index 0000000000..593f086dd0
--- /dev/null
+++ b/src/buildtools/buildtools.proj
@@ -0,0 +1,32 @@
+
+
+
+ Debug
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/buildtools/buildtools.targets b/src/buildtools/buildtools.targets
new file mode 100644
index 0000000000..9b00e18cf7
--- /dev/null
+++ b/src/buildtools/buildtools.targets
@@ -0,0 +1,56 @@
+
+
+
+ dotnet
+ dotnet.exe
+
+ $(DotNetExe)
+
+
+
+
+
+
+ $(ArtifactsBinDir)\fslex\Proto\netcoreapp2.0\fslex.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ArtifactsBinDir)\fsyacc\Proto\netcoreapp2.0\fsyacc.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/buildtools/fslex/App.config b/src/buildtools/fslex/App.config
new file mode 100644
index 0000000000..e1b09eda9f
--- /dev/null
+++ b/src/buildtools/fslex/App.config
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/buildtools/fslex/Arg.fs b/src/buildtools/fslex/Arg.fs
new file mode 100644
index 0000000000..a1f63bd963
--- /dev/null
+++ b/src/buildtools/fslex/Arg.fs
@@ -0,0 +1,133 @@
+// (c) Microsoft Corporation 2005-2009.
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+namespace Internal.Utilities
+#else
+namespace Microsoft.FSharp.Text
+#endif
+
+
+type ArgType =
+ | ClearArg of bool ref
+ | FloatArg of (float -> unit)
+ | IntArg of (int -> unit)
+ | RestArg of (string -> unit)
+ | SetArg of bool ref
+ | StringArg of (string -> unit)
+ | UnitArg of (unit -> unit)
+ static member Clear r = ClearArg r
+ static member Float r = FloatArg r
+ static member Int r = IntArg r
+ static member Rest r = RestArg r
+ static member Set r = SetArg r
+ static member String r = StringArg r
+ static member Unit r = UnitArg r
+
+
+type ArgInfo (name,action,help) =
+ member x.Name = name
+ member x.ArgType = action
+ member x.HelpText = help
+
+exception Bad of string
+exception HelpText of string
+
+[]
+type ArgParser() =
+ static let getUsage specs u =
+ let sbuf = new System.Text.StringBuilder 100
+ let pstring (s:string) = sbuf.Append s |> ignore
+ let pendline s = pstring s; pstring "\n"
+ pendline u;
+ List.iter (fun (arg:ArgInfo) ->
+ match arg.Name, arg.ArgType, arg.HelpText with
+ | (s, (UnitArg _ | SetArg _ | ClearArg _), helpText) -> pstring "\t"; pstring s; pstring ": "; pendline helpText
+ | (s, StringArg _, helpText) -> pstring "\t"; pstring s; pstring " : "; pendline helpText
+ | (s, IntArg _, helpText) -> pstring "\t"; pstring s; pstring " : "; pendline helpText
+ | (s, FloatArg _, helpText) -> pstring "\t"; pstring s; pstring " : "; pendline helpText
+ | (s, RestArg _, helpText) -> pstring "\t"; pstring s; pstring " ...: "; pendline helpText)
+ specs;
+ pstring "\t"; pstring "--help"; pstring ": "; pendline "display this list of options";
+ pstring "\t"; pstring "-help"; pstring ": "; pendline "display this list of options";
+ sbuf.ToString()
+
+
+ static member ParsePartial(cursor,argv,argSpecs:seq,?other,?usageText) =
+ let other = defaultArg other (fun _ -> ())
+ let usageText = defaultArg usageText ""
+ let nargs = Array.length argv
+ incr cursor;
+ let argSpecs = argSpecs |> Seq.toList
+ let specs = argSpecs |> List.map (fun (arg:ArgInfo) -> arg.Name, arg.ArgType)
+ while !cursor < nargs do
+ let arg = argv.[!cursor]
+ let rec findMatchingArg args =
+ match args with
+ | ((s, action) :: _) when s = arg ->
+ let getSecondArg () =
+ if !cursor + 1 >= nargs then
+ raise(Bad("option "+s+" needs an argument.\n"+getUsage argSpecs usageText));
+ argv.[!cursor+1]
+
+ match action with
+ | UnitArg f ->
+ f ();
+ incr cursor
+ | SetArg f ->
+ f := true;
+ incr cursor
+ | ClearArg f ->
+ f := false;
+ incr cursor
+ | StringArg f->
+ let arg2 = getSecondArg()
+ f arg2;
+ cursor := !cursor + 2
+ | IntArg f ->
+ let arg2 = getSecondArg ()
+ let arg2 = try int32 arg2 with _ -> raise(Bad(getUsage argSpecs usageText)) in
+ f arg2;
+ cursor := !cursor + 2;
+ | FloatArg f ->
+ let arg2 = getSecondArg()
+ let arg2 = try float arg2 with _ -> raise(Bad(getUsage argSpecs usageText)) in
+ f arg2;
+ cursor := !cursor + 2;
+ | RestArg f ->
+ incr cursor;
+ while !cursor < nargs do
+ f (argv.[!cursor]);
+ incr cursor;
+
+ | (_ :: more) -> findMatchingArg more
+ | [] ->
+ if arg = "-help" || arg = "--help" || arg = "/help" || arg = "/help" || arg = "/?" then
+ raise (HelpText (getUsage argSpecs usageText))
+ // Note: for '/abc/def' does not count as an argument
+ // Note: '/abc' does
+ elif arg.Length>0 && (arg.[0] = '-' || (arg.[0] = '/' && not (arg.Length > 1 && arg.[1..].Contains ("/")))) then
+ raise (Bad ("unrecognized argument: "+ arg + "\n" + getUsage argSpecs usageText))
+ else
+ other arg;
+ incr cursor
+ findMatchingArg specs
+
+ static member Usage (specs,?usage) =
+ let usage = defaultArg usage ""
+ System.Console.Error.WriteLine (getUsage (Seq.toList specs) usage)
+
+ #if FX_NO_COMMAND_LINE_ARGS
+ #else
+ static member Parse (specs,?other,?usageText) =
+ let current = ref 0
+ let argv = System.Environment.GetCommandLineArgs()
+ try ArgParser.ParsePartial (current, argv, specs, ?other=other, ?usageText=usageText)
+ with
+ | Bad h
+ | HelpText h ->
+ System.Console.Error.WriteLine h;
+ System.Console.Error.Flush();
+ System.Environment.Exit(1);
+ | e ->
+ reraise()
+ #endif
diff --git a/src/buildtools/fslex/Arg.fsi b/src/buildtools/fslex/Arg.fsi
new file mode 100644
index 0000000000..367f69f959
--- /dev/null
+++ b/src/buildtools/fslex/Arg.fsi
@@ -0,0 +1,50 @@
+// (c) Microsoft Corporation 2005-2009.
+
+/// A simple command-line argument processor.
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+namespace Internal.Utilities
+#else
+namespace Microsoft.FSharp.Text
+#endif
+
+/// The spec value describes the action of the argument,
+/// and whether it expects a following parameter.
+[]
+type ArgType =
+ static member Clear : bool ref -> ArgType
+ static member Float : (float -> unit) -> ArgType
+ static member Int : (int -> unit) -> ArgType
+ static member Rest : (string -> unit) -> ArgType
+ static member Set : bool ref -> ArgType
+ static member String : (string -> unit) -> ArgType
+ static member Unit : (unit -> unit) -> ArgType
+
+type ArgInfo =
+ new : name:string * action:ArgType * help:string -> ArgInfo
+ /// Return the name of the argument
+ member Name : string
+ /// Return the argument type and action of the argument
+ member ArgType : ArgType
+ /// Return the usage help associated with the argument
+ member HelpText : string
+
+[]
+type ArgParser =
+ #if FX_NO_COMMAND_LINE_ARGS
+ #else
+
+ /// Parse some of the arguments given by 'argv', starting at the given position
+ []
+ static member ParsePartial: cursor: int ref * argv: string[] * arguments:seq * ?otherArgs: (string -> unit) * ?usageText:string -> unit
+
+ /// Parse the arguments given by System.Environment.GetEnvironmentVariables()
+ /// according to the argument processing specifications "specs".
+ /// Args begin with "-". Non-arguments are passed to "f" in
+ /// order. "use" is printed as part of the usage line if an error occurs.
+
+ static member Parse: arguments:seq * ?otherArgs: (string -> unit) * ?usageText:string -> unit
+ #endif
+
+ /// Prints the help for each argument.
+ static member Usage : arguments:seq * ?usage:string -> unit
+
diff --git a/src/buildtools/fslex/Lexing.fs b/src/buildtools/fslex/Lexing.fs
new file mode 100644
index 0000000000..8337717d6f
--- /dev/null
+++ b/src/buildtools/fslex/Lexing.fs
@@ -0,0 +1,423 @@
+// (c) Microsoft Corporation 2005-2009.
+
+#nowarn "47" // recursive initialization of LexBuffer
+
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+namespace Internal.Utilities.Text.Lexing
+
+#else
+namespace Microsoft.FSharp.Text.Lexing
+#endif
+
+ open System.Collections.Generic
+
+ // REVIEW: This type showed up on a parsing-intensive performance measurement. Consider whether it can be a struct-record later when we have this feature. -jomo
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ type internal Position =
+#else
+ type Position =
+#endif
+ { pos_fname : string;
+ pos_lnum : int;
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ pos_orig_lnum : int;
+#endif
+ pos_bol : int;
+ pos_cnum : int; }
+ member x.FileName = x.pos_fname
+ member x.Line = x.pos_lnum
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ member x.OriginalLine = x.pos_orig_lnum
+#endif
+ member x.Char = x.pos_cnum
+ member x.AbsoluteOffset = x.pos_cnum
+ member x.StartOfLine = x.pos_bol
+ member x.StartOfLineAbsoluteOffset = x.pos_bol
+ member x.Column = x.pos_cnum - x.pos_bol
+ member pos.NextLine =
+ { pos with
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ pos_orig_lnum = pos.OriginalLine + 1;
+#endif
+ pos_lnum = pos.Line+1;
+ pos_bol = pos.AbsoluteOffset }
+ member pos.EndOfToken(n) = {pos with pos_cnum=pos.pos_cnum + n }
+ member pos.AsNewLinePos() = pos.NextLine
+ member pos.ShiftColumnBy(by) = {pos with pos_cnum = pos.pos_cnum + by}
+ static member Empty =
+ { pos_fname="";
+ pos_lnum= 0;
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ pos_orig_lnum = 0;
+#endif
+ pos_bol= 0;
+ pos_cnum=0 }
+ static member FirstLine(filename) =
+ { pos_fname=filename;
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ pos_orig_lnum = 1;
+#endif
+ pos_lnum= 1;
+ pos_bol= 0;
+ pos_cnum=0 }
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ type internal LexBufferFiller<'char> =
+#else
+ type LexBufferFiller<'char> =
+#endif
+ { fillSync : (LexBuffer<'char> -> unit) option
+ fillAsync : (LexBuffer<'char> -> Async) option }
+
+ and []
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ internal LexBuffer<'char>(filler: LexBufferFiller<'char>) as this =
+#else
+ LexBuffer<'char>(filler: LexBufferFiller<'char>) as this =
+#endif
+ let context = new Dictionary(1) in
+ let extendBufferSync = (fun () -> match filler.fillSync with Some refill -> refill this | None -> invalidOp "attempt to read synchronously from an asynchronous lex buffer")
+ let extendBufferAsync = (fun () -> match filler.fillAsync with Some refill -> refill this | None -> invalidOp "attempt to read asynchronously from a synchronous lex buffer")
+ let mutable buffer=[||];
+ /// number of valid charactes beyond bufferScanStart
+ let mutable bufferMaxScanLength=0;
+ /// count into the buffer when scanning
+ let mutable bufferScanStart=0;
+ /// number of characters scanned so far
+ let mutable bufferScanLength=0;
+ /// length of the scan at the last accepting state
+ let mutable lexemeLength=0;
+ /// action related to the last accepting state
+ let mutable bufferAcceptAction=0;
+ let mutable eof = false;
+ let mutable startPos = Position.Empty ;
+ let mutable endPos = Position.Empty
+
+ // Throw away all the input besides the lexeme
+
+ let discardInput () =
+ let keep = Array.sub buffer bufferScanStart bufferScanLength
+ let nkeep = keep.Length
+ Array.blit keep 0 buffer 0 nkeep;
+ bufferScanStart <- 0;
+ bufferMaxScanLength <- nkeep
+
+
+ member lexbuf.EndOfScan () : int =
+ // Printf.eprintf "endOfScan, lexBuffer.lexemeLength = %d\n" lexBuffer.lexemeLength;
+ if bufferAcceptAction < 0 then
+ failwith "unrecognized input"
+
+ // Printf.printf "endOfScan %d state %d on unconsumed input '%c' (%d)\n" a s (Char.chr inp) inp;
+ // Printf.eprintf "accept, lexeme = %s\n" (lexeme lexBuffer);
+ lexbuf.StartPos <- endPos;
+ lexbuf.EndPos <- endPos.EndOfToken(lexbuf.LexemeLength);
+ bufferAcceptAction
+
+ member lexbuf.StartPos
+ with get() = startPos
+ and set(b) = startPos <- b
+
+ member lexbuf.EndPos
+ with get() = endPos
+ and set(b) = endPos <- b
+
+ member lexbuf.Lexeme = Array.sub buffer bufferScanStart lexemeLength
+ member lexbuf.LexemeChar(n) = buffer.[n+bufferScanStart]
+
+ member lexbuf.BufferLocalStore = (context :> IDictionary<_,_>)
+ member lexbuf.LexemeLength with get() : int = lexemeLength and set v = lexemeLength <- v
+ member internal lexbuf.Buffer with get() : 'char[] = buffer and set v = buffer <- v
+ member internal lexbuf.BufferMaxScanLength with get() = bufferMaxScanLength and set v = bufferMaxScanLength <- v
+ member internal lexbuf.BufferScanLength with get() = bufferScanLength and set v = bufferScanLength <- v
+ member internal lexbuf.BufferScanStart with get() : int = bufferScanStart and set v = bufferScanStart <- v
+ member internal lexbuf.BufferAcceptAction with get() = bufferAcceptAction and set v = bufferAcceptAction <- v
+ member internal lexbuf.RefillBuffer = extendBufferSync
+ member internal lexbuf.AsyncRefillBuffer = extendBufferAsync
+
+ static member LexemeString(lexbuf:LexBuffer) =
+ new System.String(lexbuf.Buffer,lexbuf.BufferScanStart,lexbuf.LexemeLength)
+
+ member lexbuf.IsPastEndOfStream
+ with get() = eof
+ and set(b) = eof <- b
+
+ member lexbuf.DiscardInput() = discardInput ()
+
+ member x.BufferScanPos = bufferScanStart + bufferScanLength
+
+ member lexbuf.EnsureBufferSize n =
+ if lexbuf.BufferScanPos + n >= buffer.Length then
+ let repl = Array.zeroCreate (lexbuf.BufferScanPos + n)
+ Array.blit buffer bufferScanStart repl bufferScanStart bufferScanLength;
+ buffer <- repl
+
+ static member FromReadFunctions (syncRead : ('char[] * int * int -> int) option, asyncRead : ('char[] * int * int -> Async) option) : LexBuffer<'char> =
+ let extension= Array.zeroCreate 4096
+ let fillers =
+ { fillSync =
+ match syncRead with
+ | None -> None
+ | Some read ->
+ Some (fun lexBuffer ->
+ let n = read(extension,0,extension.Length)
+ lexBuffer.EnsureBufferSize n;
+ Array.blit extension 0 lexBuffer.Buffer lexBuffer.BufferScanPos n;
+ lexBuffer.BufferMaxScanLength <- lexBuffer.BufferScanLength + n);
+ fillAsync =
+ match asyncRead with
+ | None -> None
+ | Some read ->
+ Some (fun lexBuffer ->
+ async {
+ let! n = read(extension,0,extension.Length)
+ lexBuffer.EnsureBufferSize n;
+ Array.blit extension 0 lexBuffer.Buffer lexBuffer.BufferScanPos n;
+ lexBuffer.BufferMaxScanLength <- lexBuffer.BufferScanLength + n }) }
+ new LexBuffer<_>(fillers)
+
+ // A full type signature is required on this method because it is used at more specific types within its own scope
+ static member FromFunction (f : 'char[] * int * int -> int) : LexBuffer<'char> = LexBuffer<_>.FromReadFunctions(Some(f),None)
+ static member FromAsyncFunction (f : 'char[] * int * int -> Async) : LexBuffer<'char> = LexBuffer<_>.FromReadFunctions(None,Some(f))
+
+ static member FromCharFunction f : LexBuffer =
+ LexBuffer.FromFunction(fun (buff,start,len) ->
+ let buff2 = Array.zeroCreate len
+ let n = f buff2 len
+ Array.blit buff2 0 buff start len
+ n)
+ static member FromByteFunction f : LexBuffer =
+ LexBuffer.FromFunction(fun (buff,start,len) ->
+ let buff2 = Array.zeroCreate len
+ let n = f buff2 len
+ Array.blit buff2 0 buff start len
+ n)
+
+ // A full type signature is required on this method because it is used at more specific types within its own scope
+ static member FromArray (s: 'char[]) : LexBuffer<'char> =
+ let lexBuffer =
+ new LexBuffer<_>
+ { fillSync = Some (fun _ -> ());
+ fillAsync = Some (fun _ -> async { return () }) }
+ let buffer = Array.copy s
+ lexBuffer.Buffer <- buffer;
+ lexBuffer.BufferMaxScanLength <- buffer.Length;
+ lexBuffer
+
+ static member FromBytes (arr) = LexBuffer.FromArray(arr)
+ static member FromChars (arr) = LexBuffer.FromArray(arr)
+ static member FromString (s:string) = LexBuffer.FromChars (s.ToCharArray())
+
+ static member FromTextReader (tr:System.IO.TextReader) : LexBuffer =
+ LexBuffer.FromFunction(tr.Read)
+
+ static member FromBinaryReader (br:System.IO.BinaryReader) : LexBuffer =
+ LexBuffer.FromFunction(br.Read)
+
+ static member FromStream (stream:System.IO.Stream) : LexBuffer =
+ LexBuffer.FromReadFunctions(Some(stream.Read),Some(fun (buf,offset,len) -> stream.AsyncRead(buf,offset=offset,count=len)))
+
+ module GenericImplFragments =
+ let startInterpret(lexBuffer:LexBuffer<_>)=
+ lexBuffer.BufferScanStart <- lexBuffer.BufferScanStart + lexBuffer.LexemeLength;
+ lexBuffer.BufferMaxScanLength <- lexBuffer.BufferMaxScanLength - lexBuffer.LexemeLength;
+ lexBuffer.BufferScanLength <- 0;
+ lexBuffer.LexemeLength <- 0;
+ lexBuffer.BufferAcceptAction <- -1;
+
+ let afterRefill (trans: uint16[] array,sentinel,lexBuffer:LexBuffer<_>,scanUntilSentinel,endOfScan,state,eofPos) =
+ // end of file occurs if we couldn't extend the buffer
+ if lexBuffer.BufferScanLength = lexBuffer.BufferMaxScanLength then
+ let snew = int trans.[state].[eofPos] // == EOF
+ if snew = sentinel then
+ endOfScan()
+ else
+ if lexBuffer.IsPastEndOfStream then failwith "End of file on lexing stream";
+ lexBuffer.IsPastEndOfStream <- true;
+ // Printf.printf "state %d --> %d on eof\n" state snew;
+ scanUntilSentinel(lexBuffer,snew)
+ else
+ scanUntilSentinel(lexBuffer, state)
+
+ let onAccept (lexBuffer:LexBuffer<_>,a) =
+ lexBuffer.LexemeLength <- lexBuffer.BufferScanLength;
+ lexBuffer.BufferAcceptAction <- a;
+
+ open GenericImplFragments
+
+ []
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ type internal AsciiTables(trans: uint16[] array, accept: uint16[]) =
+#else
+ type AsciiTables(trans: uint16[] array, accept: uint16[]) =
+#endif
+ let rec scanUntilSentinel(lexBuffer, state) =
+ let sentinel = 255 * 256 + 255
+ // Return an endOfScan after consuming the input
+ let a = int accept.[state]
+ if a <> sentinel then
+ onAccept (lexBuffer,a)
+
+ if lexBuffer.BufferScanLength = lexBuffer.BufferMaxScanLength then
+ lexBuffer.DiscardInput();
+ lexBuffer.RefillBuffer ();
+ // end of file occurs if we couldn't extend the buffer
+ afterRefill (trans,sentinel,lexBuffer,scanUntilSentinel,lexBuffer.EndOfScan,state,256 (* == EOF *) )
+ else
+ // read a character - end the scan if there are no further transitions
+ let inp = int(lexBuffer.Buffer.[lexBuffer.BufferScanPos])
+ let snew = int trans.[state].[inp]
+ if snew = sentinel then
+ lexBuffer.EndOfScan()
+ else
+ lexBuffer.BufferScanLength <- lexBuffer.BufferScanLength + 1;
+ // Printf.printf "state %d --> %d on '%c' (%d)\n" state snew (Char.chr inp) inp;
+ scanUntilSentinel(lexBuffer, snew)
+
+ /// Interpret tables for an ascii lexer generated by fslex.
+ member tables.Interpret(initialState,lexBuffer : LexBuffer) =
+ startInterpret(lexBuffer)
+ scanUntilSentinel(lexBuffer, initialState)
+
+ /// Interpret tables for an ascii lexer generated by fslex.
+ member tables.AsyncInterpret(initialState,lexBuffer : LexBuffer) =
+
+ let rec scanUntilSentinel(lexBuffer,state) : Async =
+ async {
+ let sentinel = 255 * 256 + 255
+ // Return an endOfScan after consuming the input
+ let a = int accept.[state]
+ if a <> sentinel then
+ onAccept (lexBuffer,a)
+
+ if lexBuffer.BufferScanLength = lexBuffer.BufferMaxScanLength then
+ lexBuffer.DiscardInput();
+ do! lexBuffer.AsyncRefillBuffer ();
+ // end of file occurs if we couldn't extend the buffer
+ return! afterRefill (trans,sentinel,lexBuffer,scanUntilSentinel,endOfScan,state,256 (* == EOF *) )
+ else
+ // read a character - end the scan if there are no further transitions
+ let inp = int(lexBuffer.Buffer.[lexBuffer.BufferScanPos])
+ let snew = int trans.[state].[inp]
+ if snew = sentinel then
+ return! endOfScan()
+ else
+ lexBuffer.BufferScanLength <- lexBuffer.BufferScanLength + 1;
+ return! scanUntilSentinel(lexBuffer,snew)
+ }
+ and endOfScan() =
+ async { return lexBuffer.EndOfScan() }
+ startInterpret(lexBuffer)
+ scanUntilSentinel(lexBuffer, initialState)
+
+
+ static member Create(trans,accept) = new AsciiTables(trans,accept)
+
+ []
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ type internal UnicodeTables(trans: uint16[] array, accept: uint16[]) =
+#else
+ type UnicodeTables(trans: uint16[] array, accept: uint16[]) =
+#endif
+ let sentinel = 255 * 256 + 255
+ let numUnicodeCategories = 30
+ let numLowUnicodeChars = 128
+ let numSpecificUnicodeChars = (trans.[0].Length - 1 - numLowUnicodeChars - numUnicodeCategories)/2
+ let lookupUnicodeCharacters (state,inp) =
+ let inpAsInt = int inp
+ // Is it a fast ASCII character?
+ if inpAsInt < numLowUnicodeChars then
+ int trans.[state].[inpAsInt]
+ else
+ // Search for a specific unicode character
+ let baseForSpecificUnicodeChars = numLowUnicodeChars
+ let rec loop i =
+ if i >= numSpecificUnicodeChars then
+ // OK, if we failed then read the 'others' entry in the alphabet,
+ // which covers all Unicode characters not covered in other
+ // ways
+ let baseForUnicodeCategories = numLowUnicodeChars+numSpecificUnicodeChars*2
+ let unicodeCategory = System.Globalization.CharUnicodeInfo.GetUnicodeCategory(inp)
+ //System.Console.WriteLine("inp = {0}, unicodeCategory = {1}", [| box inp; box unicodeCategory |]);
+ int trans.[state].[baseForUnicodeCategories + int32 unicodeCategory]
+ else
+ // This is the specific unicode character
+ let c = char (int trans.[state].[baseForSpecificUnicodeChars+i*2])
+ //System.Console.WriteLine("c = {0}, inp = {1}, i = {2}", [| box c; box inp; box i |]);
+ // OK, have we found the entry for a specific unicode character?
+ if c = inp
+ then int trans.[state].[baseForSpecificUnicodeChars+i*2+1]
+ else loop(i+1)
+
+ loop 0
+ let eofPos = numLowUnicodeChars + 2*numSpecificUnicodeChars + numUnicodeCategories
+
+ let rec scanUntilSentinel(lexBuffer,state) =
+ // Return an endOfScan after consuming the input
+ let a = int accept.[state]
+ if a <> sentinel then
+ onAccept(lexBuffer,a)
+
+ if lexBuffer.BufferScanLength = lexBuffer.BufferMaxScanLength then
+ lexBuffer.DiscardInput();
+ lexBuffer.RefillBuffer ();
+ // end of file occurs if we couldn't extend the buffer
+ afterRefill (trans,sentinel,lexBuffer,scanUntilSentinel,lexBuffer.EndOfScan,state,eofPos)
+ else
+ // read a character - end the scan if there are no further transitions
+ let inp = lexBuffer.Buffer.[lexBuffer.BufferScanPos]
+
+ // Find the new state
+ let snew = lookupUnicodeCharacters (state,inp)
+
+ if snew = sentinel then
+ lexBuffer.EndOfScan()
+ else
+ lexBuffer.BufferScanLength <- lexBuffer.BufferScanLength + 1;
+ // Printf.printf "state %d --> %d on '%c' (%d)\n" s snew (char inp) inp;
+ scanUntilSentinel(lexBuffer,snew)
+
+ // Each row for the Unicode table has format
+ // 128 entries for ASCII characters
+ // A variable number of 2*UInt16 entries for SpecificUnicodeChars
+ // 30 entries, one for each UnicodeCategory
+ // 1 entry for EOF
+
+ member tables.Interpret(initialState,lexBuffer : LexBuffer) =
+ startInterpret(lexBuffer)
+ scanUntilSentinel(lexBuffer, initialState)
+
+ member tables.AsyncInterpret(initialState,lexBuffer : LexBuffer) =
+
+ let rec scanUntilSentinel(lexBuffer, state) =
+ async {
+ // Return an endOfScan after consuming the input
+ let a = int accept.[state]
+ if a <> sentinel then
+ onAccept(lexBuffer,a)
+
+ if lexBuffer.BufferScanLength = lexBuffer.BufferMaxScanLength then
+ lexBuffer.DiscardInput();
+ lexBuffer.RefillBuffer ();
+ // end of file occurs if we couldn't extend the buffer
+ return! afterRefill (trans,sentinel,lexBuffer,scanUntilSentinel,endOfScan,state,eofPos)
+ else
+ // read a character - end the scan if there are no further transitions
+ let inp = lexBuffer.Buffer.[lexBuffer.BufferScanPos]
+
+ // Find the new state
+ let snew = lookupUnicodeCharacters (state,inp)
+
+ if snew = sentinel then
+ return! endOfScan()
+ else
+ lexBuffer.BufferScanLength <- lexBuffer.BufferScanLength + 1;
+ return! scanUntilSentinel(lexBuffer, snew)
+ }
+ and endOfScan() =
+ async { return lexBuffer.EndOfScan() }
+ startInterpret(lexBuffer)
+ scanUntilSentinel(lexBuffer, initialState)
+
+ static member Create(trans,accept) = new UnicodeTables(trans,accept)
diff --git a/src/buildtools/fslex/Lexing.fsi b/src/buildtools/fslex/Lexing.fsi
new file mode 100644
index 0000000000..e31ad411aa
--- /dev/null
+++ b/src/buildtools/fslex/Lexing.fsi
@@ -0,0 +1,151 @@
+//==========================================================================
+// LexBuffers are for use with automatically generated lexical analyzers,
+// in particular those produced by 'fslex'.
+//
+// (c) Microsoft Corporation 2005-2008.
+//===========================================================================
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+namespace Internal.Utilities.Text.Lexing
+#else
+namespace Microsoft.FSharp.Text.Lexing
+#endif
+
+open System.Collections.Generic
+
+/// Position information stored for lexing tokens
+//
+// Note: this is an OCaml compat record type.
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal Position =
+#else
+type Position =
+#endif
+ { /// The file name for the position
+ pos_fname: string;
+ /// The line number for the position
+ pos_lnum: int;
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ /// The line number for the position in the original source file
+ pos_orig_lnum : int;
+#endif
+ /// The absolute offset of the beginning of the line
+ pos_bol: int;
+ /// The absolute offset of the column for the position
+ pos_cnum: int; }
+ /// The file name associated with the input stream.
+ member FileName : string
+ /// The line number in the input stream, assuming fresh positions have been updated
+ /// using AsNewLinePos() and by modifying the EndPos property of the LexBuffer.
+ member Line : int
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ /// The line number for the position in the input stream, assuming fresh positions have been updated
+ /// using AsNewLinePos()
+ member OriginalLine : int
+#endif
+ []
+ member Char : int
+ /// The character number in the input stream
+ member AbsoluteOffset : int
+ /// Return absolute offset of the start of the line marked by the position
+ member StartOfLineAbsoluteOffset : int
+ /// Return the column number marked by the position, i.e. the difference between the AbsoluteOffset and the StartOfLineAbsoluteOffset
+ member Column : int
+ // Given a position just beyond the end of a line, return a position at the start of the next line
+ member NextLine : Position
+
+ /// Given a position at the start of a token of length n, return a position just beyond the end of the token
+ member EndOfToken: n:int -> Position
+ /// Gives a position shifted by specified number of characters
+ member ShiftColumnBy: by:int -> Position
+
+ []
+ member AsNewLinePos : unit -> Position
+
+ /// Get an arbitrary position, with the empty string as filename, and
+ static member Empty : Position
+
+ /// Get a position corresponding to the first line (line number 1) in a given file
+ static member FirstLine : filename:string -> Position
+
+[]
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal LexBuffer<'char> =
+#else
+/// Input buffers consumed by lexers generated by fslex.exe
+type LexBuffer<'char> =
+#endif
+ /// The start position for the lexeme
+ member StartPos: Position with get,set
+ /// The end position for the lexeme
+ member EndPos: Position with get,set
+ /// The matched string
+ member Lexeme: 'char array
+
+ /// Fast helper to turn the matched characters into a string, avoiding an intermediate array
+ static member LexemeString : LexBuffer -> string
+
+ /// The length of the matched string
+ member LexemeLength: int
+ /// Fetch a particular character in the matched string
+ member LexemeChar: int -> 'char
+
+ /// Dynamically typed, non-lexically scoped parameter table
+ member BufferLocalStore : IDictionary
+
+ /// True if the refill of the buffer ever failed , or if explicitly set to true.
+ member IsPastEndOfStream: bool with get,set
+ /// Remove all input, though don't discard the current lexeme
+ member DiscardInput: unit -> unit
+
+ /// Create a lex buffer suitable for byte lexing that reads characters from the given array
+ static member FromBytes: byte[] -> LexBuffer
+ /// Create a lex buffer suitable for Unicode lexing that reads characters from the given array
+ static member FromChars: char[] -> LexBuffer
+ /// Create a lex buffer suitable for Unicode lexing that reads characters from the given string
+ static member FromString: string -> LexBuffer
+ /// Create a lex buffer that reads character or byte inputs by using the given function
+ static member FromFunction: ('char[] * int * int -> int) -> LexBuffer<'char>
+ /// Create a lex buffer that asynchronously reads character or byte inputs by using the given function
+ static member FromAsyncFunction: ('char[] * int * int -> Async) -> LexBuffer<'char>
+
+
+ [.FromFunction instead")>]
+ static member FromCharFunction: (char[] -> int -> int) -> LexBuffer
+ [.FromFunction instead")>]
+ static member FromByteFunction: (byte[] -> int -> int) -> LexBuffer
+
+ /// Create a lex buffer suitable for use with a Unicode lexer that reads character inputs from the given text reader
+ static member FromTextReader: System.IO.TextReader -> LexBuffer
+ /// Create a lex buffer suitable for use with ASCII byte lexing that reads byte inputs from the given binary reader
+ static member FromBinaryReader: System.IO.BinaryReader -> LexBuffer
+
+
+/// The type of tables for an ascii lexer generated by fslex.
+[]
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal AsciiTables =
+#else
+type AsciiTables =
+#endif
+ static member Create : uint16[] array * uint16[] -> AsciiTables
+ /// Interpret tables for an ascii lexer generated by fslex.
+ member Interpret: initialState:int * LexBuffer -> int
+ /// Interpret tables for an ascii lexer generated by fslex, processing input asynchronously
+ member AsyncInterpret: initialState:int * LexBuffer -> Async
+
+
+/// The type of tables for an unicode lexer generated by fslex.
+[]
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal UnicodeTables =
+#else
+type UnicodeTables =
+#endif
+ static member Create : uint16[] array * uint16[] -> UnicodeTables
+ /// Interpret tables for a unicode lexer generated by fslex.
+ member Interpret: initialState:int * LexBuffer -> int
+
+ /// Interpret tables for a unicode lexer generated by fslex, processing input asynchronously
+ member AsyncInterpret: initialState:int * LexBuffer -> Async
+
diff --git a/src/buildtools/fslex/Parsing.fs b/src/buildtools/fslex/Parsing.fs
new file mode 100644
index 0000000000..01dccfb610
--- /dev/null
+++ b/src/buildtools/fslex/Parsing.fs
@@ -0,0 +1,514 @@
+// (c) Microsoft Corporation 2005-2009.
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+
+namespace Internal.Utilities.Text.Parsing
+open Internal.Utilities
+open Internal.Utilities.Text.Lexing
+
+#else
+namespace Microsoft.FSharp.Text.Parsing
+open Microsoft.FSharp.Text.Lexing
+#endif
+
+
+
+open System
+open System.Collections.Generic
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal IParseState =
+#else
+type IParseState =
+#endif
+ abstract InputRange: int -> Position * Position
+ abstract InputEndPosition: int -> Position
+ abstract InputStartPosition: int -> Position
+ abstract ResultRange: Position * Position
+ abstract GetInput: int -> obj
+ abstract ParserLocalStore : IDictionary
+ abstract RaiseError<'b> : unit -> 'b
+
+//-------------------------------------------------------------------------
+// This context is passed to the error reporter when a syntax error occurs
+
+[]
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal ParseErrorContext<'tok>
+#else
+type ParseErrorContext<'tok>
+#endif
+ (//lexbuf: LexBuffer<_>,
+ stateStack:int list,
+ parseState: IParseState,
+ reduceTokens: int list,
+ currentToken: 'tok option,
+ reducibleProductions: int list list,
+ shiftableTokens: int list ,
+ message : string) =
+ //member x.LexBuffer = lexbuf
+ member x.StateStack = stateStack
+ member x.ReduceTokens = reduceTokens
+ member x.CurrentToken = currentToken
+ member x.ParseState = parseState
+ member x.ReducibleProductions = reducibleProductions
+ member x.ShiftTokens = shiftableTokens
+ member x.Message = message
+
+
+//-------------------------------------------------------------------------
+// This is the data structure emitted as code by FSYACC.
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal Tables<'tok> =
+#else
+type Tables<'tok> =
+#endif
+ { reductions: (IParseState -> obj) array;
+ endOfInputTag: int;
+ tagOfToken: 'tok -> int;
+ dataOfToken: 'tok -> obj;
+ actionTableElements: uint16[];
+ actionTableRowOffsets: uint16[];
+ reductionSymbolCounts: uint16[];
+ immediateActions: uint16[];
+ gotos: uint16[];
+ sparseGotoTableRowOffsets: uint16[];
+ stateToProdIdxsTableElements: uint16[];
+ stateToProdIdxsTableRowOffsets: uint16[];
+ productionToNonTerminalTable: uint16[];
+ /// For fsyacc.exe, this entry is filled in by context from the generated parser file. If no 'parse_error' function
+ /// is defined by the user then ParseHelpers.parse_error is used by default (ParseHelpers is opened
+ /// at the top of the generated parser file)
+ parseError: ParseErrorContext<'tok> -> unit;
+ numTerminals: int;
+ tagOfErrorTerminal: int }
+
+//-------------------------------------------------------------------------
+// An implementation of stacks.
+
+// This type is in System.dll so for the moment we can't use it in FSharp.Core.dll
+//type Stack<'a> = System.Collections.Generic.Stack<'a>
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type Stack<'a>(n) =
+#else
+type internal Stack<'a>(n) =
+#endif
+ let mutable contents = Array.zeroCreate<'a>(n)
+ let mutable count = 0
+
+ member buf.Ensure newSize =
+ let oldSize = Array.length contents
+ if newSize > oldSize then
+ let old = contents
+ contents <- Array.zeroCreate (max newSize (oldSize * 2));
+ Array.blit old 0 contents 0 count;
+
+ member buf.Count = count
+ member buf.Pop() = count <- count - 1
+ member buf.Peep() = contents.[count - 1]
+ member buf.Top(n) = [ for x in contents.[max 0 (count-n)..count - 1] -> x ] |> List.rev
+ member buf.Push(x) =
+ buf.Ensure(count + 1);
+ contents.[count] <- x;
+ count <- count + 1
+
+ member buf.IsEmpty = (count = 0)
+#if __DEBUG
+ member buf.PrintStack() =
+ for i = 0 to (count - 1) do
+#if FX_NO_CONSOLE
+ ()
+#else
+ System.Console.Write("{0}{1}",(contents.[i]),if i=count-1 then ":" else "-")
+#endif
+#endif
+exception RecoverableParseError
+exception Accept of obj
+
+#if __DEBUG
+module Flags =
+ let mutable debug = false
+#endif
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+module internal Implementation =
+#else
+module Implementation =
+#endif
+
+ // Definitions shared with fsyacc
+ let anyMarker = 0xffff
+ let shiftFlag = 0x0000
+ let reduceFlag = 0x4000
+ let errorFlag = 0x8000
+ let acceptFlag = 0xc000
+ let actionMask = 0xc000
+
+ let actionValue action = action &&& (~~~ actionMask)
+ let actionKind action = action &&& actionMask
+
+ //-------------------------------------------------------------------------
+ // Read the tables written by FSYACC.
+
+ type AssocTable(elemTab:uint16[], offsetTab:uint16[]) =
+ let cache = new Dictionary<_,_>(2000)
+
+ member t.readAssoc (minElemNum,maxElemNum,defaultValueOfAssoc,keyToFind) =
+ // do a binary chop on the table
+ let elemNumber : int = (minElemNum+maxElemNum)/2
+ if elemNumber = maxElemNum
+ then defaultValueOfAssoc
+ else
+ let x = int elemTab.[elemNumber*2]
+ if keyToFind = x then
+ int elemTab.[elemNumber*2+1]
+ elif keyToFind < x then t.readAssoc (minElemNum ,elemNumber,defaultValueOfAssoc,keyToFind)
+ else t.readAssoc (elemNumber+1,maxElemNum,defaultValueOfAssoc,keyToFind)
+
+ member t.Read(rowNumber ,keyToFind) =
+
+ // First check the sparse lookaside table
+ // Performance note: without this lookaside table the binary chop in readAssoc
+ // takes up around 10% of of parsing time
+ // for parsing intensive samples such as the bootstrapped F# compiler.
+ //
+ // Note: using a .NET Dictionary for this int -> int table looks like it could be sub-optimal.
+ // Some other better sparse lookup table may be better.
+ let mutable res = 0
+ let cacheKey = (rowNumber <<< 16) ||| keyToFind
+ let ok = cache.TryGetValue(cacheKey, &res)
+ if ok then res
+ else
+ let headOfTable = int offsetTab.[rowNumber]
+ let firstElemNumber = headOfTable + 1
+ let numberOfElementsInAssoc = int elemTab.[headOfTable*2]
+ let defaultValueOfAssoc = int elemTab.[headOfTable*2+1]
+ let res = t.readAssoc (firstElemNumber,(firstElemNumber+numberOfElementsInAssoc),defaultValueOfAssoc,keyToFind)
+ cache.[cacheKey] <- res
+ res
+
+ // Read all entries in the association table
+ // Used during error recovery to find all valid entries in the table
+ member x.ReadAll(n) =
+ let headOfTable = int offsetTab.[n]
+ let firstElemNumber = headOfTable + 1
+ let numberOfElementsInAssoc = int32 elemTab.[headOfTable*2]
+ let defaultValueOfAssoc = int elemTab.[headOfTable*2+1]
+ [ for i in firstElemNumber .. (firstElemNumber+numberOfElementsInAssoc-1) ->
+ (int elemTab.[i*2], int elemTab.[i*2+1]) ], defaultValueOfAssoc
+
+ type IdxToIdxListTable(elemTab:uint16[], offsetTab:uint16[]) =
+
+ // Read all entries in a row of the table
+ member x.ReadAll(n) =
+ let headOfTable = int offsetTab.[n]
+ let firstElemNumber = headOfTable + 1
+ let numberOfElements = int32 elemTab.[headOfTable]
+ [ for i in firstElemNumber .. (firstElemNumber+numberOfElements-1) -> int elemTab.[i] ]
+
+ //-------------------------------------------------------------------------
+ // interpret the tables emitted by FSYACC.
+
+ []
+ []
+ type ValueInfo =
+ val value: obj
+ val startPos: Position
+ val endPos: Position
+ new(value,startPos,endPos) = { value=value; startPos=startPos;endPos=endPos }
+
+ let interpret (tables: Tables<'tok>) lexer (lexbuf : LexBuffer<_>) initialState =
+ let localStore = new Dictionary() in
+ localStore.["LexBuffer"] <- lexbuf;
+#if __DEBUG
+ if Flags.debug then System.Console.WriteLine("\nParser: interpret tables");
+#endif
+ let stateStack : Stack = new Stack<_>(100)
+ stateStack.Push(initialState);
+ let valueStack = new Stack(100)
+ let mutable haveLookahead = false
+ let mutable lookaheadToken = Unchecked.defaultof<'tok>
+ let mutable lookaheadEndPos = Unchecked.defaultof
+ let mutable lookaheadStartPos = Unchecked.defaultof
+ let mutable finished = false
+ // After an error occurs, we suppress errors until we've shifted three tokens in a row.
+ let mutable errorSuppressionCountDown = 0
+
+ // When we hit the end-of-file we don't fail straight away but rather keep permitting shift
+ // and reduce against the last token in the token stream 20 times or until we've accepted
+ // or exhausted the stack. This allows error recovery rules of the form
+ // input : realInput EOF | realInput error EOF | error EOF
+ // where consuming one EOF to trigger an error doesn't result in overall parse failure
+ // catastrophe and the loss of intermediate results.
+ //
+ let mutable inEofCountDown = false
+ let mutable eofCountDown = 20 // Number of EOFs to supply at the end for error recovery
+ // The 100 here means a maximum of 100 elements for each rule
+ let ruleStartPoss = (Array.zeroCreate 100 : Position array)
+ let ruleEndPoss = (Array.zeroCreate 100 : Position array)
+ let ruleValues = (Array.zeroCreate 100 : obj array)
+ let lhsPos = (Array.zeroCreate 2 : Position array)
+ let reductions = tables.reductions
+ let actionTable = new AssocTable(tables.actionTableElements, tables.actionTableRowOffsets)
+ let gotoTable = new AssocTable(tables.gotos, tables.sparseGotoTableRowOffsets)
+ let stateToProdIdxsTable = new IdxToIdxListTable(tables.stateToProdIdxsTableElements, tables.stateToProdIdxsTableRowOffsets)
+
+ let parseState =
+ { new IParseState with
+ member p.InputRange(n) = ruleStartPoss.[n-1], ruleEndPoss.[n-1];
+ member p.InputStartPosition(n) = ruleStartPoss.[n-1]
+ member p.InputEndPosition(n) = ruleEndPoss.[n-1];
+ member p.GetInput(n) = ruleValues.[n-1];
+ member p.ResultRange = (lhsPos.[0], lhsPos.[1]);
+ member p.ParserLocalStore = (localStore :> IDictionary<_,_>);
+ member p.RaiseError() = raise RecoverableParseError (* NOTE: this binding tests the fairly complex logic associated with an object expression implementing a generic abstract method *)
+ }
+
+#if __DEBUG
+ let report haveLookahead lookaheadToken =
+ if haveLookahead then sprintf "%A" lookaheadToken
+ else "[TBC]"
+#endif
+
+ // Pop the stack until we can shift the 'error' token. If 'tokenOpt' is given
+ // then keep popping until we can shift both the 'error' token and the token in 'tokenOpt'.
+ // This is used at end-of-file to make sure we can shift both the 'error' token and the 'EOF' token.
+ let rec popStackUntilErrorShifted(tokenOpt) =
+ // Keep popping the stack until the "error" terminal is shifted
+#if __DEBUG
+ if Flags.debug then System.Console.WriteLine("popStackUntilErrorShifted");
+#endif
+ if stateStack.IsEmpty then
+#if __DEBUG
+ if Flags.debug then
+ System.Console.WriteLine("state stack empty during error recovery - generating parse error");
+#endif
+ failwith "parse error";
+
+ let currState = stateStack.Peep()
+#if __DEBUG
+ if Flags.debug then
+ System.Console.WriteLine("In state {0} during error recovery", currState);
+#endif
+
+ let action = actionTable.Read(currState, tables.tagOfErrorTerminal)
+
+ if actionKind action = shiftFlag &&
+ (match tokenOpt with
+ | None -> true
+ | Some(token) ->
+ let nextState = actionValue action
+ actionKind (actionTable.Read(nextState, tables.tagOfToken(token))) = shiftFlag) then
+
+#if __DEBUG
+ if Flags.debug then System.Console.WriteLine("shifting error, continuing with error recovery");
+#endif
+ let nextState = actionValue action
+ // The "error" non terminal needs position information, though it tends to be unreliable.
+ // Use the StartPos/EndPos from the lex buffer
+ valueStack.Push(ValueInfo(box (), lexbuf.StartPos, lexbuf.EndPos));
+ stateStack.Push(nextState)
+ else
+ if valueStack.IsEmpty then
+ failwith "parse error";
+#if __DEBUG
+ if Flags.debug then
+ System.Console.WriteLine("popping stack during error recovery");
+#endif
+ valueStack.Pop();
+ stateStack.Pop();
+ popStackUntilErrorShifted(tokenOpt)
+
+ while not finished do
+ if stateStack.IsEmpty then
+ finished <- true
+ else
+ let state = stateStack.Peep()
+#if __DEBUG
+ if Flags.debug then (Console.Write("{0} value(state), state ",valueStack.Count); stateStack.PrintStack())
+#endif
+ let action =
+ let immediateAction = int tables.immediateActions.[state]
+ if not (immediateAction = anyMarker) then
+ // Action has been pre-determined, no need to lookahead
+ // Expecting it to be a Reduce action on a non-fakeStartNonTerminal ?
+ immediateAction
+ else
+ // Lookahead required to determine action
+ if not haveLookahead then
+ if lexbuf.IsPastEndOfStream then
+ // When the input runs out, keep supplying the last token for eofCountDown times
+ if eofCountDown>0 then
+ haveLookahead <- true
+ eofCountDown <- eofCountDown - 1
+ inEofCountDown <- true
+ else
+ haveLookahead <- false
+ else
+ lookaheadToken <- lexer lexbuf
+ lookaheadStartPos <- lexbuf.StartPos
+ lookaheadEndPos <- lexbuf.EndPos
+ haveLookahead <- true;
+
+ let tag =
+ if haveLookahead then tables.tagOfToken lookaheadToken
+ else tables.endOfInputTag
+
+ // Printf.printf "state %d\n" state
+ actionTable.Read(state,tag)
+
+ let kind = actionKind action
+ if kind = shiftFlag then (
+ if errorSuppressionCountDown > 0 then
+ errorSuppressionCountDown <- errorSuppressionCountDown - 1;
+#if __DEBUG
+ if Flags.debug then Console.WriteLine("shifting, reduced errorRecoverylevel to {0}\n", errorSuppressionCountDown);
+#endif
+ let nextState = actionValue action
+ if not haveLookahead then failwith "shift on end of input!";
+ let data = tables.dataOfToken lookaheadToken
+ valueStack.Push(ValueInfo(data, lookaheadStartPos, lookaheadEndPos));
+ stateStack.Push(nextState);
+#if __DEBUG
+ if Flags.debug then Console.WriteLine("shift/consume input {0}, shift to state {1}", report haveLookahead lookaheadToken, nextState);
+#endif
+ haveLookahead <- false
+
+ ) elif kind = reduceFlag then
+ let prod = actionValue action
+ let reduction = reductions.[prod]
+ let n = int tables.reductionSymbolCounts.[prod]
+ // pop the symbols, populate the values and populate the locations
+#if __DEBUG
+ if Flags.debug then Console.Write("reduce popping {0} values/states, lookahead {1}", n, report haveLookahead lookaheadToken);
+#endif
+
+ lhsPos.[0] <- Position.Empty;
+ lhsPos.[1] <- Position.Empty;
+ for i = 0 to n - 1 do
+ if valueStack.IsEmpty then failwith "empty symbol stack";
+ let topVal = valueStack.Peep()
+ valueStack.Pop();
+ stateStack.Pop();
+ ruleValues.[(n-i)-1] <- topVal.value;
+ ruleStartPoss.[(n-i)-1] <- topVal.startPos;
+ ruleEndPoss.[(n-i)-1] <- topVal.endPos;
+ if lhsPos.[1] = Position.Empty then lhsPos.[1] <- topVal.endPos;
+ if not (topVal.startPos = Position.Empty) then lhsPos.[0] <- topVal.startPos
+ done;
+
+ try
+ // Printf.printf "reduce %d\n" prod;
+ let redResult = reduction parseState
+ valueStack.Push(ValueInfo(redResult, lhsPos.[0], lhsPos.[1]));
+ let currState = stateStack.Peep()
+ let newGotoState = gotoTable.Read(int tables.productionToNonTerminalTable.[prod], currState)
+ stateStack.Push(newGotoState)
+#if __DEBUG
+ if Flags.debug then Console.WriteLine(" goto state {0}", newGotoState)
+#endif
+ with
+ | Accept res ->
+ finished <- true;
+ valueStack.Push(ValueInfo(res, lhsPos.[0], lhsPos.[1]))
+ | RecoverableParseError ->
+#if __DEBUG
+ if Flags.debug then Console.WriteLine("RecoverableParseErrorException...\n");
+#endif
+ popStackUntilErrorShifted(None);
+ // User code raised a Parse_error. Don't report errors again until three tokens have been shifted
+ errorSuppressionCountDown <- 3
+ elif kind = errorFlag then (
+#if __DEBUG
+ if Flags.debug then Console.Write("ErrorFlag... ");
+#endif
+ // Silently discard inputs and don't report errors
+ // until three tokens in a row have been shifted
+#if __DEBUG
+ if Flags.debug then printfn "error on token '%A' " (if haveLookahead then Some(lookaheadToken) else None);
+#endif
+ if errorSuppressionCountDown > 0 then
+ // If we're in the end-of-file count down then we're very keen to 'Accept'.
+ // We can only do this by repeatedly popping the stack until we can shift both an 'error' token
+ // and an EOF token.
+ if inEofCountDown && eofCountDown < 10 then
+#if __DEBUG
+ if Flags.debug then printfn "poppin stack, lokking to shift both 'error' and that token, during end-of-file error recovery" ;
+#endif
+ popStackUntilErrorShifted(if haveLookahead then Some(lookaheadToken) else None);
+
+ // If we don't haveLookahead then the end-of-file count down is over and we have no further options.
+ if not haveLookahead then
+ failwith "parse error: unexpected end of file"
+
+#if __DEBUG
+ if Flags.debug then printfn "discarding token '%A' during error suppression" (if haveLookahead then Some(lookaheadToken) else None);
+#endif
+ // Discard the token
+ haveLookahead <- false
+ // Try again to shift three tokens
+ errorSuppressionCountDown <- 3
+ else (
+
+ let currentToken = if haveLookahead then Some(lookaheadToken) else None
+ let actions,defaultAction = actionTable.ReadAll(state)
+ let explicit = Set.ofList [ for (tag,_action) in actions -> tag ]
+
+ let shiftableTokens =
+ [ for (tag,action) in actions do
+ if (actionKind action) = shiftFlag then
+ yield tag
+ if actionKind defaultAction = shiftFlag then
+ for tag in 0 .. tables.numTerminals-1 do
+ if not (explicit.Contains(tag)) then
+ yield tag ] in
+
+ let stateStack = stateStack.Top(12) in
+ let reducibleProductions =
+ [ for state in stateStack do
+ yield stateToProdIdxsTable.ReadAll(state) ]
+
+ let reduceTokens =
+ [ for (tag,action) in actions do
+ if actionKind(action) = reduceFlag then
+ yield tag
+ if actionKind(defaultAction) = reduceFlag then
+ for tag in 0 .. tables.numTerminals-1 do
+ if not (explicit.Contains(tag)) then
+ yield tag ] in
+ //let activeRules = stateStack |> List.iter (fun state ->
+ let errorContext = new ParseErrorContext<'tok>(stateStack,parseState, reduceTokens,currentToken,reducibleProductions, shiftableTokens, "syntax error")
+ tables.parseError(errorContext);
+ popStackUntilErrorShifted(None);
+ errorSuppressionCountDown <- 3;
+#if __DEBUG
+ if Flags.debug then System.Console.WriteLine("generated syntax error and shifted error token, haveLookahead = {0}\n", haveLookahead);
+#endif
+ )
+ ) elif kind = acceptFlag then
+ finished <- true
+#if __DEBUG
+ else
+ if Flags.debug then System.Console.WriteLine("ALARM!!! drop through case in parser");
+#endif
+ done;
+ // OK, we're done - read off the overall generated value
+ valueStack.Peep().value
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal Tables<'tok> with
+#else
+type Tables<'tok> with
+#endif
+ member tables.Interpret (lexer,lexbuf,initialState) =
+ Implementation.interpret tables lexer lexbuf initialState
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+module internal ParseHelpers =
+#else
+module ParseHelpers =
+#endif
+ let parse_error (_s:string) = ()
+ let parse_error_rich = (None : (ParseErrorContext<_> -> unit) option)
diff --git a/src/buildtools/fslex/Parsing.fsi b/src/buildtools/fslex/Parsing.fsi
new file mode 100644
index 0000000000..2fef45975a
--- /dev/null
+++ b/src/buildtools/fslex/Parsing.fsi
@@ -0,0 +1,130 @@
+//==========================================================================
+// (c) Microsoft Corporation 2005-2009.
+//=========================================================================
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+namespace Internal.Utilities.Text.Parsing
+open Internal.Utilities
+open Internal.Utilities.Text.Lexing
+#else
+namespace Microsoft.FSharp.Text.Parsing
+open Microsoft.FSharp.Text.Lexing
+#endif
+
+open System.Collections.Generic
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal IParseState =
+#else
+/// The information accessible via the parseState value within parser actions.
+type IParseState =
+#endif
+ /// Get the start and end position for the terminal or non-terminal at a given index matched by the production
+ abstract InputRange: index:int -> Position * Position
+ /// Get the end position for the terminal or non-terminal at a given index matched by the production
+ abstract InputEndPosition: int -> Position
+ /// Get the start position for the terminal or non-terminal at a given index matched by the production
+ abstract InputStartPosition: int -> Position
+ /// Get the full range of positions matched by the production
+ abstract ResultRange: Position * Position
+ /// Get the value produced by the terminal or non-terminal at the given position
+ abstract GetInput : int -> obj
+ /// Get the store of local values associated with this parser
+ // Dynamically typed, non-lexically scoped local store
+ abstract ParserLocalStore : IDictionary
+ /// Raise an error in this parse context
+ abstract RaiseError<'b> : unit -> 'b
+
+
+[]
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal ParseErrorContext<'tok> =
+#else
+/// The context provided when a parse error occurs
+type ParseErrorContext<'tok> =
+#endif
+ /// The stack of state indexes active at the parse error
+ member StateStack : int list
+ /// The state active at the parse error
+ member ParseState : IParseState
+ /// The tokens that would cause a reduction at the parse error
+ member ReduceTokens: int list
+ /// The stack of productions that would be reduced at the parse error
+ member ReducibleProductions : int list list
+ /// The token that caused the parse error
+ member CurrentToken : 'tok option
+ /// The token that would cause a shift at the parse error
+ member ShiftTokens : int list
+ /// The message associated with the parse error
+ member Message : string
+
+/// Tables generated by fsyacc
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal Tables<'tok> =
+#else
+/// The type of the tables contained in a file produced by the fsyacc.exe parser generator.
+type Tables<'tok> =
+#endif
+ { /// The reduction table
+ reductions: (IParseState -> obj) array ;
+ /// The token number indicating the end of input
+ endOfInputTag: int;
+ /// A function to compute the tag of a token
+ tagOfToken: 'tok -> int;
+ /// A function to compute the data carried by a token
+ dataOfToken: 'tok -> obj;
+ /// The sparse action table elements
+ actionTableElements: uint16[];
+ /// The sparse action table row offsets
+ actionTableRowOffsets: uint16[];
+ /// The number of symbols for each reduction
+ reductionSymbolCounts: uint16[];
+ /// The immediate action table
+ immediateActions: uint16[];
+ /// The sparse goto table
+ gotos: uint16[];
+ /// The sparse goto table row offsets
+ sparseGotoTableRowOffsets: uint16[];
+ /// The sparse table for the productions active for each state
+ stateToProdIdxsTableElements: uint16[];
+ /// The sparse table offsets for the productions active for each state
+ stateToProdIdxsTableRowOffsets: uint16[];
+ /// This table is logically part of the Goto table
+ productionToNonTerminalTable: uint16[];
+ /// This function is used to hold the user specified "parse_error" or "parse_error_rich" functions
+ parseError: ParseErrorContext<'tok> -> unit;
+ /// The total number of terminals
+ numTerminals: int;
+ /// The tag of the error terminal
+ tagOfErrorTerminal: int }
+
+ /// Interpret the parser table taking input from the given lexer, using the given lex buffer, and the given start state.
+ /// Returns an object indicating the final synthesized value for the parse.
+ member Interpret : lexer:(LexBuffer<'char> -> 'tok) * lexbuf:LexBuffer<'char> * startState:int -> obj
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+exception internal Accept of obj
+exception internal RecoverableParseError
+#else
+/// Indicates an accept action has occured
+exception Accept of obj
+/// Indicates a parse error has occured and parse recovery is in progress
+exception RecoverableParseError
+#endif
+
+#if __DEBUG
+module internal Flags =
+ val mutable debug : bool
+#endif
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+module internal ParseHelpers =
+#else
+/// Helpers used by generated parsers.
+module ParseHelpers =
+#endif
+ /// The default implementation of the parse_error_rich function
+ val parse_error_rich: (ParseErrorContext<'tok> -> unit) option
+ /// The default implementation of the parse_error function
+ val parse_error: string -> unit
+
diff --git a/src/buildtools/fslex/fslex.fs b/src/buildtools/fslex/fslex.fs
new file mode 100644
index 0000000000..d2f1af826b
--- /dev/null
+++ b/src/buildtools/fslex/fslex.fs
@@ -0,0 +1,224 @@
+// (c) Microsoft Corporation 2005-2009.
+
+module internal FsLexYacc.FsLex.Driver
+
+open FsLexYacc.FsLex
+open FsLexYacc.FsLex.AST
+open FsLexYacc.FsLex.Parser
+open Printf
+open Internal.Utilities
+open Internal.Utilities.Text.Lexing
+open System
+open System.Collections.Generic
+open System.IO
+
+//------------------------------------------------------------------
+// This code is duplicated from Microsoft.FSharp.Compiler.UnicodeLexing
+
+type Lexbuf = LexBuffer
+
+/// Standard utility to create a Unicode LexBuffer
+///
+/// One small annoyance is that LexBuffers and not IDisposable. This means
+/// we can't just return the LexBuffer object, since the file it wraps wouldn't
+/// get closed when we're finished with the LexBuffer. Hence we return the stream,
+/// the reader and the LexBuffer. The caller should dispose the first two when done.
+let UnicodeFileAsLexbuf (filename,codePage : int option) : FileStream * StreamReader * Lexbuf =
+ // Use the .NET functionality to auto-detect the unicode encoding
+ // It also presents the bytes read to the lexer in UTF8 decoded form
+ let stream = new FileStream(filename,FileMode.Open,FileAccess.Read,FileShare.Read)
+ let reader =
+ match codePage with
+ | None -> new StreamReader(stream,true)
+ | Some n -> new StreamReader(stream,System.Text.Encoding.GetEncoding(n))
+ let lexbuf = LexBuffer.FromFunction(reader.Read)
+ lexbuf.EndPos <- Position.FirstLine(filename);
+ stream, reader, lexbuf
+
+//------------------------------------------------------------------
+// This is the program proper
+
+let input = ref None
+let out = ref None
+let inputCodePage = ref None
+let light = ref None
+
+let mutable lexlib = "Microsoft.FSharp.Text.Lexing"
+
+let usage =
+ [ ArgInfo ("-o", ArgType.String (fun s -> out := Some s), "Name the output file.");
+ ArgInfo ("--codepage", ArgType.Int (fun i -> inputCodePage := Some i), "Assume input lexer specification file is encoded with the given codepage.");
+ ArgInfo ("--light", ArgType.Unit (fun () -> light := Some true), "(ignored)");
+ ArgInfo ("--light-off", ArgType.Unit (fun () -> light := Some false), "Add #light \"off\" to the top of the generated file");
+ ArgInfo ("--lexlib", ArgType.String (fun s -> lexlib <- s), "Specify the namespace for the implementation of the lexer table interpreter (default Microsoft.FSharp.Text.Lexing)");
+ ArgInfo ("--unicode", ArgType.Set unicode, "Produce a lexer for use with 16-bit unicode characters.");
+ ]
+
+let _ = ArgParser.Parse(usage, (fun x -> match !input with Some _ -> failwith "more than one input given" | None -> input := Some x), "fslex ")
+
+let outputInt (os: TextWriter) (n:int) = os.Write(string n)
+
+let outputCodedUInt16 (os: #TextWriter) (n:int) =
+ os.Write n;
+ os.Write "us; ";
+
+let sentinel = 255 * 256 + 255
+
+let lineCount = ref 0
+let cfprintfn (os: #TextWriter) fmt = Printf.kfprintf (fun () -> incr lineCount; os.WriteLine()) os fmt
+
+[]
+let main(args: string[]) =
+ try
+ let filename = (match !input with Some x -> x | None -> failwith "no input given")
+ let domain = if !unicode then "Unicode" else "Ascii"
+ let spec =
+ let stream,reader,lexbuf = UnicodeFileAsLexbuf(filename, !inputCodePage)
+ use stream = stream
+ use reader = reader
+ try
+ Parser.spec Lexer.token lexbuf
+ with e ->
+ eprintf "%s(%d,%d): error: %s" filename lexbuf.StartPos.Line lexbuf.StartPos.Column
+ (match e with
+ | Failure s -> s
+ | _ -> e.Message);
+ exit 1
+ printfn "compiling to dfas (can take a while...)";
+ let perRuleData, dfaNodes = AST.Compile spec
+ let dfaNodes = dfaNodes |> List.sortBy (fun n -> n.Id)
+
+ printfn "%d states" dfaNodes.Length;
+ printfn "writing output";
+
+ let output =
+ match !out with
+ | Some x -> x
+ | _ ->
+ Path.Combine (Path.GetDirectoryName filename,Path.GetFileNameWithoutExtension(filename)) + ".fs"
+ use os = System.IO.File.CreateText output
+
+ if (!light = Some(false)) || (!light = None && (Path.HasExtension(output) && Path.GetExtension(output) = ".ml")) then
+ cfprintfn os "#light \"off\"";
+
+ let printLinesIfCodeDefined (code,pos:Position) =
+ if pos <> Position.Empty // If bottom code is unspecified, then position is empty.
+ then
+ cfprintfn os "# %d \"%s\"" pos.Line pos.FileName;
+ cfprintfn os "%s" code;
+
+ printLinesIfCodeDefined spec.TopCode
+ let code = fst spec.TopCode
+ lineCount := !lineCount + code.Replace("\r","").Split([| '\n' |]).Length;
+ cfprintfn os "# %d \"%s\"" !lineCount output;
+
+ cfprintfn os "let trans : uint16[] array = ";
+ cfprintfn os " [| ";
+ if !unicode then
+ let specificUnicodeChars = GetSpecificUnicodeChars()
+ // This emits a (numLowUnicodeChars+NumUnicodeCategories+(2*#specificUnicodeChars)+1) * #states array of encoded UInt16 values
+
+ // Each row for the Unicode table has format
+ // 128 entries for ASCII characters
+ // A variable number of 2*UInt16 entries for SpecificUnicodeChars
+ // 30 entries, one for each UnicodeCategory
+ // 1 entry for EOF
+ //
+ // Each entry is an encoded UInt16 value indicating the next state to transition to for this input.
+ //
+ // For the SpecificUnicodeChars the entries are char/next-state pairs.
+ for state in dfaNodes do
+ cfprintfn os " (* State %d *)" state.Id;
+ fprintf os " [| ";
+ let trans =
+ let dict = new Dictionary<_,_>()
+ state.Transitions |> List.iter dict.Add
+ dict
+ let emit n =
+ if trans.ContainsKey(n) then
+ outputCodedUInt16 os trans.[n].Id
+ else
+ outputCodedUInt16 os sentinel
+ for i = 0 to numLowUnicodeChars-1 do
+ let c = char i
+ emit (EncodeChar c);
+ for c in specificUnicodeChars do
+ outputCodedUInt16 os (int c);
+ emit (EncodeChar c);
+ for i = 0 to NumUnicodeCategories-1 do
+ emit (EncodeUnicodeCategoryIndex i);
+ emit Eof;
+ cfprintfn os "|];"
+ done;
+
+ else
+ // Each row for the ASCII table has format
+ // 256 entries for ASCII characters
+ // 1 entry for EOF
+ //
+ // Each entry is an encoded UInt16 value indicating the next state to transition to for this input.
+
+ // This emits a (256+1) * #states array of encoded UInt16 values
+ for state in dfaNodes do
+ cfprintfn os " (* State %d *)" state.Id;
+ fprintf os " [|";
+ let trans =
+ let dict = new Dictionary<_,_>()
+ state.Transitions |> List.iter dict.Add
+ dict
+ let emit n =
+ if trans.ContainsKey(n) then
+ outputCodedUInt16 os trans.[n].Id
+ else
+ outputCodedUInt16 os sentinel
+ for i = 0 to 255 do
+ let c = char i
+ emit (EncodeChar c);
+ emit Eof;
+ cfprintfn os "|];"
+ done;
+
+ cfprintfn os " |] ";
+
+ fprintf os "let actions : uint16[] = [|";
+ for state in dfaNodes do
+ if state.Accepted.Length > 0 then
+ outputCodedUInt16 os (snd state.Accepted.Head)
+ else
+ outputCodedUInt16 os sentinel
+ done;
+ cfprintfn os "|]";
+ cfprintfn os "let _fslex_tables = %s.%sTables.Create(trans,actions)" lexlib domain;
+
+ cfprintfn os "let rec _fslex_dummy () = _fslex_dummy() ";
+
+ // These actions push the additional start state and come first, because they are then typically inlined into later
+ // rules. This means more tailcalls are taken as direct branches, increasing efficiency and
+ // improving stack usage on platforms that do not take tailcalls.
+ for ((startNode, actions),(ident,args,_)) in List.zip perRuleData spec.Rules do
+ cfprintfn os "(* Rule %s *)" ident;
+ cfprintfn os "and %s %s (lexbuf : %s.LexBuffer<_>) = _fslex_%s %s %d lexbuf" ident (String.Join(" ",Array.ofList args)) lexlib ident (String.Join(" ",Array.ofList args)) startNode.Id;
+ for ((startNode, actions),(ident,args,_)) in List.zip perRuleData spec.Rules do
+ cfprintfn os "(* Rule %s *)" ident;
+ cfprintfn os "and _fslex_%s %s _fslex_state lexbuf =" ident (String.Join(" ",Array.ofList args));
+ cfprintfn os " match _fslex_tables.Interpret(_fslex_state,lexbuf) with" ;
+ actions |> Seq.iteri (fun i (code,pos) ->
+ cfprintfn os " | %d -> ( " i;
+ cfprintfn os "# %d \"%s\"" pos.Line pos.FileName;
+ let lines = code.Split([| '\r'; '\n' |], StringSplitOptions.RemoveEmptyEntries)
+ for line in lines do
+ cfprintfn os " %s" line;
+ cfprintfn os "# %d \"%s\"" !lineCount output;
+ cfprintfn os " )")
+ cfprintfn os " | _ -> failwith \"%s\"" ident
+
+
+ cfprintfn os "";
+
+ printLinesIfCodeDefined spec.BottomCode
+ cfprintfn os "# 3000000 \"%s\"" output;
+ 0
+
+ with e ->
+ eprintf "FSLEX: error FSL000: %s" (match e with Failure s -> s | e -> e.ToString());
+ exit 1
diff --git a/src/buildtools/fslex/fslex.fsproj b/src/buildtools/fslex/fslex.fsproj
new file mode 100644
index 0000000000..9e21a860d8
--- /dev/null
+++ b/src/buildtools/fslex/fslex.fsproj
@@ -0,0 +1,22 @@
+
+
+
+ Exe
+ netcoreapp2.0
+ INTERNALIZED_FSLEXYACC_RUNTIME;$(DefineConstant)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/buildtools/fslex/fslexast.fs b/src/buildtools/fslex/fslexast.fs
new file mode 100644
index 0000000000..db9727cb97
--- /dev/null
+++ b/src/buildtools/fslex/fslexast.fs
@@ -0,0 +1,409 @@
+(* (c) Microsoft Corporation 2005-2008. *)
+
+module internal FsLexYacc.FsLex.AST
+
+open System.Collections.Generic
+open Microsoft.FSharp.Text
+open Microsoft.FSharp.Collections
+open Internal.Utilities
+open Internal.Utilities.Text.Lexing
+
+let (|KeyValue|) (kvp:KeyValuePair<_,_>) = kvp.Key,kvp.Value
+
+type Ident = string
+type Code = string * Position
+
+type Alphabet = uint32
+
+let Eof : Alphabet = 0xFFFFFFFEu
+let Epsilon : Alphabet = 0xFFFFFFFFu
+
+
+let unicode = ref false
+
+let unicodeCategories =
+ dict
+ [| "Pe", System.Globalization.UnicodeCategory.ClosePunctuation; // (Pe)
+ "Pc", System.Globalization.UnicodeCategory.ConnectorPunctuation; // (Pc)
+ "Cc", System.Globalization.UnicodeCategory.Control; // (Cc)
+ "Sc", System.Globalization.UnicodeCategory.CurrencySymbol; // (Sc)
+ "Pd", System.Globalization.UnicodeCategory.DashPunctuation; // (Pd)
+ "Nd", System.Globalization.UnicodeCategory.DecimalDigitNumber; // (Nd)
+ "Me", System.Globalization.UnicodeCategory.EnclosingMark; // (Me)
+ "Pf", System.Globalization.UnicodeCategory.FinalQuotePunctuation; // (Pf)
+ "Cf", enum 15; //System.Globalization.UnicodeCategory.Format; // (Cf)
+ "Pi", System.Globalization.UnicodeCategory.InitialQuotePunctuation; // (Pi)
+ "Nl", System.Globalization.UnicodeCategory.LetterNumber; // (Nl)
+ "Zl", System.Globalization.UnicodeCategory.LineSeparator; // (Zl)
+ "Ll", System.Globalization.UnicodeCategory.LowercaseLetter; // (Ll)
+ "Sm", System.Globalization.UnicodeCategory.MathSymbol; // (Sm)
+ "Lm", System.Globalization.UnicodeCategory.ModifierLetter; // (Lm)
+ "Sk", System.Globalization.UnicodeCategory.ModifierSymbol; // (Sk)
+ "Mn", System.Globalization.UnicodeCategory.NonSpacingMark; // (Mn)
+ "Ps", System.Globalization.UnicodeCategory.OpenPunctuation; // (Ps)
+ "Lo", System.Globalization.UnicodeCategory.OtherLetter; // (Lo)
+ "Cn", System.Globalization.UnicodeCategory.OtherNotAssigned; // (Cn)
+ "No", System.Globalization.UnicodeCategory.OtherNumber; // (No)
+ "Po", System.Globalization.UnicodeCategory.OtherPunctuation; // (Po)
+ "So", System.Globalization.UnicodeCategory.OtherSymbol; // (So)
+ "Zp", System.Globalization.UnicodeCategory.ParagraphSeparator; // (Zp)
+ "Co", System.Globalization.UnicodeCategory.PrivateUse; // (Co)
+ "Zs", System.Globalization.UnicodeCategory.SpaceSeparator; // (Zs)
+ "Mc", System.Globalization.UnicodeCategory.SpacingCombiningMark; // (Mc)
+ "Cs", System.Globalization.UnicodeCategory.Surrogate; // (Cs)
+ "Lt", System.Globalization.UnicodeCategory.TitlecaseLetter; // (Lt)
+ "Lu", System.Globalization.UnicodeCategory.UppercaseLetter; // (Lu)
+ |]
+
+let NumUnicodeCategories = unicodeCategories.Count
+let _ = assert (NumUnicodeCategories = 30) // see table interpreter
+let encodedUnicodeCategoryBase = 0xFFFFFF00u
+let EncodeUnicodeCategoryIndex(idx:int) = encodedUnicodeCategoryBase + uint32 idx
+let EncodeUnicodeCategory(s:string) =
+ if not (!unicode) then
+ failwith "unicode category classes may only be used if --unicode is specified";
+ if unicodeCategories.ContainsKey(s) then
+ EncodeUnicodeCategoryIndex (int32 unicodeCategories.[s])
+ else
+ failwithf "invalid Unicode category: '%s'" s
+
+let IsUnicodeCategory(x:Alphabet) = (encodedUnicodeCategoryBase <= x) && (x < encodedUnicodeCategoryBase + uint32 NumUnicodeCategories)
+let UnicodeCategoryIndex(x:Alphabet) = (x - encodedUnicodeCategoryBase)
+
+let numLowUnicodeChars = 128
+let _ = assert (numLowUnicodeChars = 128) // see table interpreter
+let specificUnicodeChars = new Dictionary<_,_>()
+let specificUnicodeCharsDecode = new Dictionary<_,_>()
+let EncodeChar(c:char) =
+ let x = System.Convert.ToUInt32 c
+ if !unicode then
+ if x < uint32 numLowUnicodeChars then x
+ else
+ if not(specificUnicodeChars.ContainsKey(c)) then
+ let idx = uint32 numLowUnicodeChars + uint32 specificUnicodeChars.Count
+ specificUnicodeChars.[c] <- idx
+ specificUnicodeCharsDecode.[idx] <- c
+ specificUnicodeChars.[c]
+ else
+ if x >= 256u then failwithf "the Unicode character '%c' may not be used unless --unicode is specified" c;
+ x
+let DecodeChar(x:Alphabet) =
+ if !unicode then
+ if x < uint32 numLowUnicodeChars then System.Convert.ToChar x
+ else specificUnicodeCharsDecode.[x]
+ else
+ if x >= 256u then failwithf "the Unicode character '%x' may not be used unless --unicode is specified" x;
+ System.Convert.ToChar x
+
+
+
+let NumSpecificUnicodeChars() = specificUnicodeChars.Count
+let GetSpecificUnicodeChars() =
+ specificUnicodeChars
+ |> Seq.sortBy (fun (KeyValue(k,v)) -> v)
+ |> Seq.map (fun (KeyValue(k,v)) -> k)
+
+let GetSingleCharAlphabet() =
+ if !unicode
+ then Set.ofList [ for c in 0..numLowUnicodeChars-1 do yield (char c)
+ for c in GetSpecificUnicodeChars() do yield c ]
+ else Set.ofList [ for x in 0..255 -> (char x) ]
+
+let GetAlphabet() =
+ if !unicode
+ then Set.ofList [ for c in GetSingleCharAlphabet() do yield EncodeChar c
+ for uc in 0 .. NumUnicodeCategories-1 do yield EncodeUnicodeCategoryIndex uc ]
+ else Set.ofList [ for c in GetSingleCharAlphabet() do yield EncodeChar c ]
+
+
+//let DecodeAlphabet (x:Alphabet) = System.Convert.ToChar(x)
+
+(*
+for i in 0 .. 65535 do
+ let c = char i
+ if System.Char.GetUnicodeCategory c = System.Globalization.UnicodeCategory.PrivateUse then
+ printfn "i = %x" i
+*)
+
+type Spec =
+ { TopCode: Code;
+ Macros: (Ident * Regexp) list;
+ Rules: (Ident * Ident list * Clause list) list;
+ BottomCode: Code }
+and Clause = Regexp * Code
+and Regexp =
+ | Alt of Regexp list
+ | Seq of Regexp list
+ | Inp of Input
+ | Star of Regexp
+ | Macro of Ident
+and Input =
+ | Alphabet of Alphabet
+ | UnicodeCategory of string
+ | Any
+ | NotCharSet of Set
+
+type NodeId = int
+
+type NfaNode =
+ { Id: NodeId;
+ Name: string;
+ Transitions: Dictionary;
+ Accepted: (int * int) list }
+
+type DfaNode =
+ { Id: int;
+ Name: string;
+ mutable Transitions: (Alphabet * DfaNode) list;
+ Accepted: (int * int) list }
+
+type MultiMap<'a,'b> = Dictionary<'a,'b list>
+let LookupMultiMap (trDict:MultiMap<_,_>) a =
+ if trDict.ContainsKey(a) then trDict.[a] else []
+
+let AddToMultiMap (trDict:MultiMap<_,_>) a b =
+ let prev = LookupMultiMap trDict a
+ trDict.[a] <- b::prev
+
+type NfaNodeMap() =
+ let map = new Dictionary(100)
+ member x.Item with get(nid) = map.[nid]
+ member x.Count = map.Count
+
+ member x.NewNfaNode(trs,ac) =
+ let nodeId = map.Count+1 // ID zero is reserved
+ let trDict = new Dictionary<_,_>(List.length trs)
+ for (a,b) in trs do
+ AddToMultiMap trDict a b
+
+ let node : NfaNode = {Id=nodeId; Name=string nodeId; Transitions=trDict; Accepted=ac}
+ map.[nodeId] <-node;
+ node
+
+let LexerStateToNfa (macros: Map) (clauses: Clause list) =
+
+ /// Table allocating node ids
+ let nfaNodeMap = new NfaNodeMap()
+
+ /// Compile a regular expression into the NFA
+ let rec CompileRegexp re dest =
+ match re with
+ | Alt res ->
+ let trs = res |> List.map (fun re -> (Epsilon,CompileRegexp re dest))
+ nfaNodeMap.NewNfaNode(trs,[])
+ | Seq res ->
+ List.foldBack (CompileRegexp) res dest
+ | Inp (Alphabet c) ->
+ nfaNodeMap.NewNfaNode([(c, dest)],[])
+
+ | Star re ->
+ let nfaNode = nfaNodeMap.NewNfaNode([(Epsilon, dest)],[])
+ let sre = CompileRegexp re nfaNode
+ AddToMultiMap nfaNode.Transitions Epsilon sre
+ nfaNodeMap.NewNfaNode([(Epsilon,sre); (Epsilon,dest)],[])
+ | Macro m ->
+ if not (macros.ContainsKey(m)) then failwith ("The macro "+m+" is not defined");
+ CompileRegexp (macros.[m]) dest
+
+ // These cases unwind the difficult cases in the syntax that rely on knowing the
+ // entire alphabet.
+ //
+ // Note we've delayed the expension of these until we've worked out all the 'special' Unicode characters
+ // mentioned in the entire lexer spec, i.e. we wait until GetAlphabet returns a reliable and stable answer.
+ | Inp (UnicodeCategory uc) ->
+ let re = Alt([ yield Inp(Alphabet(EncodeUnicodeCategory uc))
+ // Also include any specific characters in this category
+ for c in GetSingleCharAlphabet() do
+ if System.Char.GetUnicodeCategory(c) = unicodeCategories.[uc] then
+ yield Inp(Alphabet(EncodeChar(c))) ])
+ CompileRegexp re dest
+
+ | Inp Any ->
+ let re = Alt([ for n in GetAlphabet() do yield Inp(Alphabet(n)) ])
+ CompileRegexp re dest
+
+ | Inp (NotCharSet chars) ->
+ let re = Alt [ // Include any characters from those in the alphabet besides those that are not immediately excluded
+ for c in GetSingleCharAlphabet() do
+ let ec = EncodeChar c
+ if not (chars.Contains(ec)) then
+ yield Inp(Alphabet(ec))
+
+ // Include all unicode categories
+ // That is, negations _only_ exclude precisely the given set of characters. You can't
+ // exclude whole classes of characters as yet
+ if !unicode then
+ let ucs = chars |> Set.map(DecodeChar >> System.Char.GetUnicodeCategory)
+ for KeyValue(nm,uc) in unicodeCategories do
+ //if ucs.Contains(uc) then
+ // do printfn "warning: the unicode category '\\%s' ('%s') is automatically excluded by this character set negation. Consider adding this to the negation." nm (uc.ToString())
+ // yield! []
+ //else
+ yield Inp(Alphabet(EncodeUnicodeCategory nm))
+ ]
+ CompileRegexp re dest
+
+ let actions = new System.Collections.Generic.List<_>()
+
+ /// Compile an acceptance of a regular expression into the NFA
+ let sTrans macros nodeId (regexp,code) =
+ let actionId = actions.Count
+ actions.Add(code)
+ let sAccept = nfaNodeMap.NewNfaNode([],[(nodeId,actionId)])
+ CompileRegexp regexp sAccept
+
+ let trs = clauses |> List.mapi (fun n x -> (Epsilon,sTrans macros n x))
+ let nfaStartNode = nfaNodeMap.NewNfaNode(trs,[])
+ nfaStartNode,(actions |> Seq.readonly), nfaNodeMap
+
+// TODO: consider a better representation here.
+type internal NfaNodeIdSetBuilder = HashSet
+
+type internal NfaNodeIdSet(nodes: NfaNodeIdSetBuilder) =
+ // BEWARE: the next line is performance critical
+ let s = nodes |> Seq.toArray |> (fun arr -> Array.sortInPlaceWith compare arr; arr) // 19
+
+ // These are all surprisingly slower:
+ //let s = nodes |> Seq.toArray |> Array.sort
+ //let s = nodes |> Seq.toArray |> Array.sortWith compare // 76
+ //let s = nodes |> Seq.toArray |> (fun arr -> Array.sortInPlace arr; arr) // 76
+
+ member x.Representation = s
+ member x.Elements = s
+ member x.Fold f z = Array.fold f z s
+ interface System.IComparable with
+ member x.CompareTo(y:obj) =
+ let y = (y :?> NfaNodeIdSet)
+ let xr = x.Representation
+ let yr = y.Representation
+ let c = compare xr.Length yr.Length
+ if c <> 0 then c else
+ let n = yr.Length
+ let rec go i =
+ if i >= n then 0 else
+ let c = compare xr.[i] yr.[i]
+ if c <> 0 then c else
+ go (i+1)
+ go 0
+
+ override x.Equals(y:obj) =
+ match y with
+ | :? NfaNodeIdSet as y ->
+ let xr = x.Representation
+ let yr = y.Representation
+ let n = yr.Length
+ xr.Length = n &&
+ (let rec go i = (i < n) && xr.[i] = yr.[i] && go (i+1)
+ go 0)
+ | _ -> false
+
+ override x.GetHashCode() = hash s
+
+ member x.IsEmpty = (s.Length = 0)
+ member x.Iterate f = s |> Array.iter f
+
+type NodeSetSet = Set
+
+let newDfaNodeId =
+ let i = ref 0
+ fun () -> let res = !i in incr i; res
+
+let NfaToDfa (nfaNodeMap:NfaNodeMap) nfaStartNode =
+ let numNfaNodes = nfaNodeMap.Count
+ let rec EClosure1 (acc:NfaNodeIdSetBuilder) (n:NfaNode) =
+ if not (acc.Contains(n.Id)) then
+ acc.Add(n.Id) |> ignore;
+ if n.Transitions.ContainsKey(Epsilon) then
+ match n.Transitions.[Epsilon] with
+ | [] -> () // this Clause is an optimization - the list is normally empty
+ | tr ->
+ //printfn "n.Id = %A, #Epsilon = %d" n.Id tr.Length
+ tr |> List.iter (EClosure1 acc)
+
+ let EClosure (moves:list) =
+ let acc = new NfaNodeIdSetBuilder(HashIdentity.Structural)
+ for i in moves do
+ EClosure1 acc nfaNodeMap.[i];
+ new NfaNodeIdSet(acc)
+
+ // Compute all the immediate one-step moves for a set of NFA states, as a dictionary
+ // mapping inputs to destination lists
+ let ComputeMoves (nset:NfaNodeIdSet) =
+ let moves = new MultiMap<_,_>()
+ nset.Iterate(fun nodeId ->
+ for (KeyValue(inp,dests)) in nfaNodeMap.[nodeId].Transitions do
+ if inp <> Epsilon then
+ match dests with
+ | [] -> () // this Clause is an optimization - the list is normally empty
+ | tr -> tr |> List.iter(fun dest -> AddToMultiMap moves inp dest.Id))
+ moves
+
+ let acc = new NfaNodeIdSetBuilder(HashIdentity.Structural)
+ EClosure1 acc nfaStartNode;
+ let nfaSet0 = new NfaNodeIdSet(acc)
+
+ let dfaNodes = ref (Map.empty)
+
+ let GetDfaNode nfaSet =
+ if (!dfaNodes).ContainsKey(nfaSet) then
+ (!dfaNodes).[nfaSet]
+ else
+ let dfaNode =
+ { Id= newDfaNodeId();
+ Name = nfaSet.Fold (fun s nid -> nfaNodeMap.[nid].Name+"-"+s) "";
+ Transitions=[];
+ Accepted= nfaSet.Elements
+ |> Seq.map (fun nid -> nfaNodeMap.[nid].Accepted)
+ |> List.concat }
+ //Printf.printfn "id = %d" dfaNode.Id;
+
+ dfaNodes := (!dfaNodes).Add(nfaSet,dfaNode);
+ dfaNode
+
+ let workList = ref [nfaSet0]
+ let doneSet = ref Set.empty
+
+ //let count = ref 0
+ let rec Loop () =
+ match !workList with
+ | [] -> ()
+ | nfaSet ::t ->
+ workList := t;
+ if (!doneSet).Contains(nfaSet) then
+ Loop ()
+ else
+ let moves = ComputeMoves nfaSet
+ for (KeyValue(inp,movesForInput)) in moves do
+ assert (inp <> Epsilon);
+ let moveSet = EClosure movesForInput;
+ if not moveSet.IsEmpty then
+ //incr count
+ let dfaNode = GetDfaNode nfaSet
+ dfaNode.Transitions <- (inp, GetDfaNode moveSet) :: dfaNode.Transitions;
+ (* Printf.printf "%d (%s) : %s --> %d (%s)\n" dfaNode.Id dfaNode.Name (match inp with EncodeChar c -> String.make 1 c | LEof -> "eof") moveSetDfaNode.Id moveSetDfaNode.Name;*)
+ workList := moveSet :: !workList;
+
+ doneSet := (!doneSet).Add(nfaSet);
+
+
+ Loop()
+ Loop();
+ //Printf.printfn "count = %d" !count;
+ let ruleStartNode = GetDfaNode nfaSet0
+ let ruleNodes =
+ (!dfaNodes)
+ |> Seq.map (fun kvp -> kvp.Value)
+ |> Seq.toList
+ |> List.sortBy (fun s -> s.Id)
+ ruleStartNode,ruleNodes
+
+let Compile spec =
+ List.foldBack
+ (fun (name,args,clauses) (perRuleData,dfaNodes) ->
+ let nfa, actions, nfaNodeMap = LexerStateToNfa (Map.ofList spec.Macros) clauses
+ let ruleStartNode, ruleNodes = NfaToDfa nfaNodeMap nfa
+ //Printf.printfn "name = %s, ruleStartNode = %O" name ruleStartNode.Id;
+ (ruleStartNode,actions) :: perRuleData, ruleNodes @ dfaNodes)
+ spec.Rules
+ ([],[])
+
diff --git a/src/buildtools/fslex/fslexlex.fs b/src/buildtools/fslex/fslexlex.fs
new file mode 100644
index 0000000000..b29bd10f84
--- /dev/null
+++ b/src/buildtools/fslex/fslexlex.fs
@@ -0,0 +1,735 @@
+# 1 "fslexlex.fsl"
+
+(* (c) Microsoft Corporation 2005-2008. *)
+
+module internal FsLexYacc.FsLex.Lexer
+
+open FsLexYacc.FsLex.AST
+open FsLexYacc.FsLex.Parser
+open Internal.Utilities
+open Internal.Utilities.Text.Lexing
+open System.Text
+
+let escape c =
+ match c with
+ | '\\' -> '\\'
+ | '\'' -> '\''
+ | 'n' -> '\n'
+ | 't' -> '\t'
+ | 'b' -> '\b'
+ | 'r' -> '\r'
+ | c -> c
+
+let lexeme (lexbuf : LexBuffer) = new System.String(lexbuf.Lexeme)
+let newline (lexbuf:LexBuffer<_>) = lexbuf.EndPos <- lexbuf.EndPos.NextLine
+
+let unexpected_char lexbuf =
+ failwith ("Unexpected character '"+(lexeme lexbuf)+"'")
+
+let digit d =
+ if d >= '0' && d <= '9' then int32 d - int32 '0'
+ else failwith "digit"
+
+let hexdigit d =
+ if d >= '0' && d <= '9' then digit d
+ else if d >= 'a' && d <= 'f' then int32 d - int32 'a' + 10
+ else if d >= 'A' && d <= 'F' then int32 d - int32 'A' + 10
+ else failwithf "bad hexdigit: %c" d
+
+let trigraph c1 c2 c3 =
+ char (digit c1 * 100 + digit c2 * 10 + digit c3)
+
+let hexgraph c1 c2 =
+ char (hexdigit c1 * 16 + hexdigit c2)
+
+let unicodegraph_short (s:string) =
+ if s.Length <> 4 then failwith "unicodegraph";
+ char(hexdigit s.[0] * 4096 + hexdigit s.[1] * 256 + hexdigit s.[2] * 16 + hexdigit s.[3])
+
+let unicodegraph_long (s:string) =
+ if s.Length <> 8 then failwith "unicodegraph_long";
+ let high = hexdigit s.[0] * 4096 + hexdigit s.[1] * 256 + hexdigit s.[2] * 16 + hexdigit s.[3] in
+ let low = hexdigit s.[4] * 4096 + hexdigit s.[5] * 256 + hexdigit s.[6] * 16 + hexdigit s.[7] in
+ if high = 0 then None, char low
+ else
+ (* A surrogate pair - see http://www.unicode.org/unicode/uni2book/ch03.pdf, section 3.7 *)
+ Some (char(0xD800 + ((high * 0x10000 + low - 0x10000) / 0x400))),
+ char(0xDF30 + ((high * 0x10000 + low - 0x10000) % 0x400))
+
+
+# 60 "fslexlex.fs"
+let trans : uint16[] array =
+ [|
+ (* State 0 *)
+ [| 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 4us; 8us; 8us; 5us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 2us; 8us; 8us; 8us; 8us; 1us; 3us; 9us; 6us; 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; 7us; |];
+ (* State 1 *)
+ [| 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 15us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 14us; 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; |];
+ (* 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; 13us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 5 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 12us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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; 11us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 *)
+ [| 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 65535us; 10us; 10us; 65535us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 65535us; 10us; 10us; 10us; 10us; 65535us; 65535us; 65535us; 65535us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 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; |];
+ (* State 10 *)
+ [| 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 65535us; 10us; 10us; 65535us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 65535us; 10us; 10us; 10us; 10us; 65535us; 65535us; 65535us; 65535us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 10us; 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; |];
+ (* State 12 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 13 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 14 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 15 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 14us; 65535us; 65535us; 65535us; 65535us; 14us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 14us; 65535us; 65535us; 65535us; 65535us; 65535us; 14us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 14us; 65535us; 65535us; 65535us; 14us; 65535us; 14us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 16 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 17 *)
+ [| 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 22us; 20us; 24us; 24us; 21us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 22us; 24us; 19us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 24us; 18us; 24us; 24us; 24us; 24us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 24us; 23us; |];
+ (* State 18 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 27us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 27us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 19 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 20 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 21 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 26us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 22 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 25us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 25us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 23 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 24 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 25 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 25us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 25us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 25us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 26 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 27 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 28 *)
+ [| 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 35us; 33us; 38us; 38us; 34us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 35us; 38us; 32us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 36us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 38us; 31us; 38us; 38us; 38us; 38us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 30us; 38us; 29us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 38us; 37us; |];
+ (* State 29 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 30 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 31 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 43us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 43us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 32 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 33 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 34 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 42us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 35 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 36 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 39us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 37 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 38 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 39 *)
+ [| 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 65535us; 40us; 40us; 65535us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 65535us; |];
+ (* State 40 *)
+ [| 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 65535us; 40us; 40us; 65535us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 40us; 65535us; |];
+ (* State 41 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 42 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 43 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 44 *)
+ [| 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 49us; 47us; 51us; 51us; 48us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 49us; 51us; 46us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 51us; 45us; 51us; 51us; 51us; 51us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 49us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 50us; |];
+ (* State 45 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 54us; 65535us; 65535us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 56us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 46 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 47 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 48 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 53us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 49 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 52us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 52us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 50 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 51 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 52 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 52us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 52us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 52us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 53 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 54 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 55 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 54us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 56 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 57 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 58 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 59us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 59 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 60 *)
+ [| 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 69us; 70us; 87us; 87us; 71us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 69us; 87us; 68us; 87us; 87us; 87us; 87us; 66us; 81us; 82us; 76us; 75us; 87us; 85us; 74us; 86us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 78us; 87us; 77us; 87us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 79us; 87us; 80us; 84us; 83us; 87us; 65us; 72us; 72us; 72us; 63us; 72us; 72us; 72us; 72us; 72us; 72us; 64us; 72us; 72us; 72us; 62us; 72us; 61us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 72us; 67us; 73us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 87us; 88us; |];
+ (* State 61 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 136us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 62 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 132us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 63 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 130us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 64 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 128us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 65 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 126us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 66 *)
+ [| 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 96us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 95us; 65535us; |];
+ (* State 67 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 68 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 69 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 94us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 94us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 70 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 71 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 93us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 72 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 73 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 74 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 75 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 76 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 77 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 78 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 79 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 80 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 81 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 91us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 82 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 83 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 84 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 85 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 86 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 89us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 87 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 88 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 89 *)
+ [| 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 65535us; 90us; 90us; 65535us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 65535us; |];
+ (* State 90 *)
+ [| 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 65535us; 90us; 90us; 65535us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 90us; 65535us; |];
+ (* State 91 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 92 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 93 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 94 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 94us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 94us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 95 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 125us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 96 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 95us; 65535us; 65535us; 65535us; 65535us; 95us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 97us; 97us; 97us; 97us; 97us; 97us; 97us; 97us; 97us; 97us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 101us; 100us; 101us; 101us; 101us; 101us; 101us; 65535us; 95us; 65535us; 65535us; 65535us; 65535us; 65535us; 95us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 95us; 65535us; 65535us; 65535us; 95us; 65535us; 95us; 99us; 65535us; 65535us; 98us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 97 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 122us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 98 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 119us; 119us; 119us; 119us; 119us; 119us; 119us; 119us; 119us; 119us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 119us; 119us; 119us; 119us; 119us; 119us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 119us; 119us; 119us; 119us; 119us; 119us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 99 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 114us; 114us; 114us; 114us; 114us; 114us; 114us; 114us; 114us; 114us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 114us; 114us; 114us; 114us; 114us; 114us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 114us; 114us; 114us; 114us; 114us; 114us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 100 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 104us; 104us; 104us; 104us; 104us; 104us; 104us; 104us; 104us; 104us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 104us; 104us; 104us; 104us; 104us; 104us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 105us; 105us; 105us; 105us; 105us; 105us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 101 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 102us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 102 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 103us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 103 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 104 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 106us; 106us; 106us; 106us; 106us; 106us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 106us; 106us; 106us; 106us; 106us; 106us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 105 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 103us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 106us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 106us; 106us; 106us; 106us; 106us; 106us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 106us; 106us; 106us; 106us; 106us; 106us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 106 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 107us; 107us; 107us; 107us; 107us; 107us; 107us; 107us; 107us; 107us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 107us; 107us; 107us; 107us; 107us; 107us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 107us; 107us; 107us; 107us; 107us; 107us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 107 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 108us; 108us; 108us; 108us; 108us; 108us; 108us; 108us; 108us; 108us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 108us; 108us; 108us; 108us; 108us; 108us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 108us; 108us; 108us; 108us; 108us; 108us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 108 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 109us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 109us; 109us; 109us; 109us; 109us; 109us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 109us; 109us; 109us; 109us; 109us; 109us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 109 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 110us; 110us; 110us; 110us; 110us; 110us; 110us; 110us; 110us; 110us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 110us; 110us; 110us; 110us; 110us; 110us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 110us; 110us; 110us; 110us; 110us; 110us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 110 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 111us; 111us; 111us; 111us; 111us; 111us; 111us; 111us; 111us; 111us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 111us; 111us; 111us; 111us; 111us; 111us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 111us; 111us; 111us; 111us; 111us; 111us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 111 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 112us; 112us; 112us; 112us; 112us; 112us; 112us; 112us; 112us; 112us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 112us; 112us; 112us; 112us; 112us; 112us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 112us; 112us; 112us; 112us; 112us; 112us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 112 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 113us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 113 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 114 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 115us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 115us; 115us; 115us; 115us; 115us; 115us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 115us; 115us; 115us; 115us; 115us; 115us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 115 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 116us; 116us; 116us; 116us; 116us; 116us; 116us; 116us; 116us; 116us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 116us; 116us; 116us; 116us; 116us; 116us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 116us; 116us; 116us; 116us; 116us; 116us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 116 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 117us; 117us; 117us; 117us; 117us; 117us; 117us; 117us; 117us; 117us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 117us; 117us; 117us; 117us; 117us; 117us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 117us; 117us; 117us; 117us; 117us; 117us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 117 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 118us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 118 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 119 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 120us; 120us; 120us; 120us; 120us; 120us; 120us; 120us; 120us; 120us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 120us; 120us; 120us; 120us; 120us; 120us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 120us; 120us; 120us; 120us; 120us; 120us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 120 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 121 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 122 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 123us; 123us; 123us; 123us; 123us; 123us; 123us; 123us; 123us; 123us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 123 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 124us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 124 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 125 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 126 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 127us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 127 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 128 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 129us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 129 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 130 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 131us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 131 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 132 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 133us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 133 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 134us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 134 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 135us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 135 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 136 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 137us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 137 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 138us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 138 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |];
+ |]
+let actions : uint16[] = [|65535us; 7us; 1us; 7us; 3us; 7us; 7us; 5us; 6us; 7us; 6us; 4us; 3us; 2us; 65535us; 65535us; 0us; 65535us; 5us; 1us; 2us; 5us; 3us; 4us; 5us; 3us; 2us; 0us; 65535us; 0us; 1us; 8us; 3us; 4us; 8us; 5us; 8us; 7us; 8us; 6us; 6us; 5us; 4us; 2us; 65535us; 7us; 3us; 4us; 7us; 5us; 6us; 7us; 5us; 4us; 0us; 65535us; 1us; 65535us; 65535us; 2us; 65535us; 15us; 15us; 15us; 15us; 15us; 31us; 11us; 12us; 13us; 14us; 31us; 15us; 16us; 17us; 18us; 19us; 20us; 21us; 22us; 23us; 24us; 25us; 26us; 27us; 28us; 31us; 31us; 32us; 30us; 30us; 29us; 15us; 14us; 13us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 10us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 9us; 65535us; 65535us; 65535us; 65535us; 8us; 65535us; 65535us; 7us; 65535us; 65535us; 6us; 5us; 15us; 4us; 15us; 3us; 15us; 2us; 15us; 15us; 15us; 1us; 15us; 15us; 0us; |]
+let _fslex_tables = Internal.Utilities.Text.Lexing.UnicodeTables.Create(trans,actions)
+let rec _fslex_dummy () = _fslex_dummy()
+(* Rule token *)
+and token (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_token 60 lexbuf
+(* Rule string *)
+and string p buff (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_string p buff 44 lexbuf
+(* Rule code *)
+and code p buff (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_code p buff 28 lexbuf
+(* Rule codestring *)
+and codestring buff (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_codestring buff 17 lexbuf
+(* Rule comment *)
+and comment p (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_comment p 0 lexbuf
+(* Rule token *)
+and _fslex_token _fslex_state lexbuf =
+ match _fslex_tables.Interpret(_fslex_state,lexbuf) with
+ | 0 -> (
+# 76 "fslexlex.fsl"
+ RULE
+# 361 "fslexlex.fs"
+ )
+ | 1 -> (
+# 77 "fslexlex.fsl"
+ PARSE
+# 366 "fslexlex.fs"
+ )
+ | 2 -> (
+# 78 "fslexlex.fsl"
+ EOF
+# 371 "fslexlex.fs"
+ )
+ | 3 -> (
+# 79 "fslexlex.fsl"
+ LET
+# 376 "fslexlex.fs"
+ )
+ | 4 -> (
+# 80 "fslexlex.fsl"
+ AND
+# 381 "fslexlex.fs"
+ )
+ | 5 -> (
+# 82 "fslexlex.fsl"
+ let s = lexeme lexbuf in
+ CHAR (if s.[1] = '\\' then escape s.[2] else s.[1])
+# 387 "fslexlex.fs"
+ )
+ | 6 -> (
+# 86 "fslexlex.fsl"
+ let s = lexeme lexbuf in
+ CHAR (trigraph s.[2] s.[3] s.[4])
+# 393 "fslexlex.fs"
+ )
+ | 7 -> (
+# 90 "fslexlex.fsl"
+ let s = lexeme lexbuf in
+ CHAR (hexgraph s.[3] s.[4])
+# 399 "fslexlex.fs"
+ )
+ | 8 -> (
+# 94 "fslexlex.fsl"
+ let s = lexeme lexbuf in
+ CHAR (unicodegraph_short s.[3..6])
+# 405 "fslexlex.fs"
+ )
+ | 9 -> (
+# 98 "fslexlex.fsl"
+ let s = lexeme lexbuf in
+ match (unicodegraph_long s.[3..10]) with
+ | None, c -> CHAR(c)
+ | Some _ , _ -> failwith "Unicode characters needing surrogate pairs are not yet supported by this tool"
+# 413 "fslexlex.fs"
+ )
+ | 10 -> (
+# 104 "fslexlex.fsl"
+ let s = (lexeme lexbuf).[2..3] in
+ UNICODE_CATEGORY (s)
+# 419 "fslexlex.fs"
+ )
+ | 11 -> (
+# 107 "fslexlex.fsl"
+ let p = lexbuf.StartPos in
+ let buff = (new StringBuilder 100) in
+ // adjust the first line to get even indentation for all lines w.r.t. the left hand margin
+ buff.Append (String.replicate (lexbuf.StartPos.Column+1) " ") |> ignore;
+ code p buff lexbuf
+# 428 "fslexlex.fs"
+ )
+ | 12 -> (
+# 113 "fslexlex.fsl"
+ string lexbuf.StartPos (new StringBuilder 100) lexbuf
+# 433 "fslexlex.fs"
+ )
+ | 13 -> (
+# 115 "fslexlex.fsl"
+ token lexbuf
+# 438 "fslexlex.fs"
+ )
+ | 14 -> (
+# 116 "fslexlex.fsl"
+ newline lexbuf; token lexbuf
+# 443 "fslexlex.fs"
+ )
+ | 15 -> (
+# 117 "fslexlex.fsl"
+ IDENT (lexeme lexbuf)
+# 448 "fslexlex.fs"
+ )
+ | 16 -> (
+# 118 "fslexlex.fsl"
+ BAR
+# 453 "fslexlex.fs"
+ )
+ | 17 -> (
+# 119 "fslexlex.fsl"
+ DOT
+# 458 "fslexlex.fs"
+ )
+ | 18 -> (
+# 120 "fslexlex.fsl"
+ PLUS
+# 463 "fslexlex.fs"
+ )
+ | 19 -> (
+# 121 "fslexlex.fsl"
+ STAR
+# 468 "fslexlex.fs"
+ )
+ | 20 -> (
+# 122 "fslexlex.fsl"
+ QMARK
+# 473 "fslexlex.fs"
+ )
+ | 21 -> (
+# 123 "fslexlex.fsl"
+ EQUALS
+# 478 "fslexlex.fs"
+ )
+ | 22 -> (
+# 124 "fslexlex.fsl"
+ LBRACK
+# 483 "fslexlex.fs"
+ )
+ | 23 -> (
+# 125 "fslexlex.fsl"
+ RBRACK
+# 488 "fslexlex.fs"
+ )
+ | 24 -> (
+# 126 "fslexlex.fsl"
+ LPAREN
+# 493 "fslexlex.fs"
+ )
+ | 25 -> (
+# 127 "fslexlex.fsl"
+ RPAREN
+# 498 "fslexlex.fs"
+ )
+ | 26 -> (
+# 128 "fslexlex.fsl"
+ UNDERSCORE
+# 503 "fslexlex.fs"
+ )
+ | 27 -> (
+# 129 "fslexlex.fsl"
+ HAT
+# 508 "fslexlex.fs"
+ )
+ | 28 -> (
+# 130 "fslexlex.fsl"
+ DASH
+# 513 "fslexlex.fs"
+ )
+ | 29 -> (
+# 131 "fslexlex.fsl"
+ ignore(comment lexbuf.StartPos lexbuf); token lexbuf
+# 518 "fslexlex.fs"
+ )
+ | 30 -> (
+# 132 "fslexlex.fsl"
+ token lexbuf
+# 523 "fslexlex.fs"
+ )
+ | 31 -> (
+# 133 "fslexlex.fsl"
+ unexpected_char lexbuf
+# 528 "fslexlex.fs"
+ )
+ | 32 -> (
+# 134 "fslexlex.fsl"
+ EOF
+# 533 "fslexlex.fs"
+ )
+ | _ -> failwith "token"
+(* Rule string *)
+and _fslex_string p buff _fslex_state lexbuf =
+ match _fslex_tables.Interpret(_fslex_state,lexbuf) with
+ | 0 -> (
+# 136 "fslexlex.fsl"
+ newline lexbuf; string p buff lexbuf
+# 542 "fslexlex.fs"
+ )
+ | 1 -> (
+# 138 "fslexlex.fsl"
+ let _ = buff.Append (escape (lexeme lexbuf).[1]) in
+ string p buff lexbuf
+# 548 "fslexlex.fs"
+ )
+ | 2 -> (
+# 141 "fslexlex.fsl"
+ let s = lexeme lexbuf in
+ let _ = buff.Append (trigraph s.[1] s.[2] s.[3]) in
+ string p buff lexbuf
+# 555 "fslexlex.fs"
+ )
+ | 3 -> (
+# 144 "fslexlex.fsl"
+ STRING (buff.ToString())
+# 560 "fslexlex.fs"
+ )
+ | 4 -> (
+# 145 "fslexlex.fsl"
+ newline lexbuf;
+ let _ = buff.Append System.Environment.NewLine in
+ string p buff lexbuf
+# 567 "fslexlex.fs"
+ )
+ | 5 -> (
+# 149 "fslexlex.fsl"
+ let _ = buff.Append (lexeme lexbuf) in
+ string p buff lexbuf
+# 573 "fslexlex.fs"
+ )
+ | 6 -> (
+# 151 "fslexlex.fsl"
+ failwith (Printf.sprintf "end of file in string started at (%d,%d)" p.pos_lnum (p.pos_cnum - p.pos_bol))
+# 578 "fslexlex.fs"
+ )
+ | 7 -> (
+# 152 "fslexlex.fsl"
+ let _ = buff.Append (lexeme lexbuf).[0] in
+ string p buff lexbuf
+# 584 "fslexlex.fs"
+ )
+ | _ -> failwith "string"
+(* Rule code *)
+and _fslex_code p buff _fslex_state lexbuf =
+ match _fslex_tables.Interpret(_fslex_state,lexbuf) with
+ | 0 -> (
+# 155 "fslexlex.fsl"
+ CODE (buff.ToString(), p)
+# 593 "fslexlex.fs"
+ )
+ | 1 -> (
+# 156 "fslexlex.fsl"
+ let _ = buff.Append (lexeme lexbuf) in
+ ignore(code p buff lexbuf);
+ let _ = buff.Append "}" in
+ code p buff lexbuf
+# 601 "fslexlex.fs"
+ )
+ | 2 -> (
+# 161 "fslexlex.fsl"
+ let _ = buff.Append (lexeme lexbuf) in
+ code p buff lexbuf
+# 607 "fslexlex.fs"
+ )
+ | 3 -> (
+# 163 "fslexlex.fsl"
+ let _ = buff.Append (lexeme lexbuf) in
+ ignore(codestring buff lexbuf);
+ code p buff lexbuf
+# 614 "fslexlex.fs"
+ )
+ | 4 -> (
+# 166 "fslexlex.fsl"
+ newline lexbuf;
+ let _ = buff.Append System.Environment.NewLine in
+ code p buff lexbuf
+# 621 "fslexlex.fs"
+ )
+ | 5 -> (
+# 170 "fslexlex.fsl"
+ let _ = buff.Append (lexeme lexbuf) in
+ code p buff lexbuf
+# 627 "fslexlex.fs"
+ )
+ | 6 -> (
+# 173 "fslexlex.fsl"
+ let _ = buff.Append (lexeme lexbuf) in
+ code p buff lexbuf
+# 633 "fslexlex.fs"
+ )
+ | 7 -> (
+# 175 "fslexlex.fsl"
+ EOF
+# 638 "fslexlex.fs"
+ )
+ | 8 -> (
+# 176 "fslexlex.fsl"
+ let _ = buff.Append (lexeme lexbuf).[0] in
+ code p buff lexbuf
+# 644 "fslexlex.fs"
+ )
+ | _ -> failwith "code"
+(* Rule codestring *)
+and _fslex_codestring buff _fslex_state lexbuf =
+ match _fslex_tables.Interpret(_fslex_state,lexbuf) with
+ | 0 -> (
+# 181 "fslexlex.fsl"
+ let _ = buff.Append (lexeme lexbuf) in
+ codestring buff lexbuf
+# 654 "fslexlex.fs"
+ )
+ | 1 -> (
+# 183 "fslexlex.fsl"
+ let _ = buff.Append (lexeme lexbuf) in
+ buff.ToString()
+# 660 "fslexlex.fs"
+ )
+ | 2 -> (
+# 185 "fslexlex.fsl"
+ newline lexbuf;
+ let _ = buff.Append System.Environment.NewLine in
+ codestring buff lexbuf
+# 667 "fslexlex.fs"
+ )
+ | 3 -> (
+# 189 "fslexlex.fsl"
+ let _ = buff.Append (lexeme lexbuf) in
+ codestring buff lexbuf
+# 673 "fslexlex.fs"
+ )
+ | 4 -> (
+# 191 "fslexlex.fsl"
+ failwith "unterminated string in code"
+# 678 "fslexlex.fs"
+ )
+ | 5 -> (
+# 192 "fslexlex.fsl"
+ let _ = buff.Append (lexeme lexbuf).[0] in
+ codestring buff lexbuf
+# 684 "fslexlex.fs"
+ )
+ | _ -> failwith "codestring"
+(* Rule comment *)
+and _fslex_comment p _fslex_state lexbuf =
+ match _fslex_tables.Interpret(_fslex_state,lexbuf) with
+ | 0 -> (
+# 196 "fslexlex.fsl"
+ comment p lexbuf
+# 693 "fslexlex.fs"
+ )
+ | 1 -> (
+# 197 "fslexlex.fsl"
+ ignore(try string lexbuf.StartPos (new StringBuilder 100) lexbuf
+ with Failure s -> failwith (s + "\n" + Printf.sprintf "error while processing string nested in comment started at (%d,%d)" p.pos_lnum (p.pos_cnum - p.pos_bol)));
+ comment p lexbuf
+# 700 "fslexlex.fs"
+ )
+ | 2 -> (
+# 200 "fslexlex.fsl"
+ ignore(try comment p lexbuf with Failure s -> failwith (s + "\n" + Printf.sprintf "error while processing nested comment started at (%d,%d)" p.pos_lnum (p.pos_cnum - p.pos_bol)));
+ comment p lexbuf
+# 706 "fslexlex.fs"
+ )
+ | 3 -> (
+# 202 "fslexlex.fsl"
+ newline lexbuf; comment p lexbuf
+# 711 "fslexlex.fs"
+ )
+ | 4 -> (
+# 203 "fslexlex.fsl"
+ ()
+# 716 "fslexlex.fs"
+ )
+ | 5 -> (
+# 204 "fslexlex.fsl"
+ failwith (Printf.sprintf "end of file in comment started at (%d,%d)" p.pos_lnum (p.pos_cnum - p.pos_bol))
+# 721 "fslexlex.fs"
+ )
+ | 6 -> (
+# 205 "fslexlex.fsl"
+ comment p lexbuf
+# 726 "fslexlex.fs"
+ )
+ | 7 -> (
+# 206 "fslexlex.fsl"
+ comment p lexbuf
+# 731 "fslexlex.fs"
+ )
+ | _ -> failwith "comment"
+
+# 3000000 "fslexlex.fs"
diff --git a/src/buildtools/fslex/fslexpars.fs b/src/buildtools/fslex/fslexpars.fs
new file mode 100644
index 0000000000..87268dcb7f
--- /dev/null
+++ b/src/buildtools/fslex/fslexpars.fs
@@ -0,0 +1,651 @@
+// Implementation file for parser generated by fsyacc
+module internal FsLexYacc.FsLex.Parser
+#nowarn "64";; // turn off warnings that type variables used in production annotations are instantiated to concrete type
+open Internal.Utilities.Text.Lexing
+open Internal.Utilities.Text.Parsing.ParseHelpers
+# 1 "fslexpars.fsy"
+
+(* (c) Microsoft Corporation 2005-2008. *)
+
+open FsLexYacc.FsLex
+open FsLexYacc.FsLex.AST
+
+
+# 14 "fslexpars.fs"
+// This type is the type of tokens accepted by the parser
+type token =
+ | EOF
+ | BAR
+ | DOT
+ | PLUS
+ | STAR
+ | QMARK
+ | EQUALS
+ | UNDERSCORE
+ | LBRACK
+ | RBRACK
+ | HAT
+ | DASH
+ | RULE
+ | PARSE
+ | LET
+ | AND
+ | LPAREN
+ | RPAREN
+ | UNICODE_CATEGORY of (string)
+ | CHAR of (char)
+ | CODE of (AST.Code)
+ | STRING of (string)
+ | IDENT of (string)
+// This type is used to give symbolic names to token indexes, useful for error messages
+type tokenId =
+ | TOKEN_EOF
+ | TOKEN_BAR
+ | TOKEN_DOT
+ | TOKEN_PLUS
+ | TOKEN_STAR
+ | TOKEN_QMARK
+ | TOKEN_EQUALS
+ | TOKEN_UNDERSCORE
+ | TOKEN_LBRACK
+ | TOKEN_RBRACK
+ | TOKEN_HAT
+ | TOKEN_DASH
+ | TOKEN_RULE
+ | TOKEN_PARSE
+ | TOKEN_LET
+ | TOKEN_AND
+ | TOKEN_LPAREN
+ | TOKEN_RPAREN
+ | TOKEN_UNICODE_CATEGORY
+ | TOKEN_CHAR
+ | TOKEN_CODE
+ | TOKEN_STRING
+ | TOKEN_IDENT
+ | TOKEN_end_of_input
+ | TOKEN_error
+// This type is used to give symbolic names to token indexes, useful for error messages
+type nonTerminalId =
+ | NONTERM__startspec
+ | NONTERM_spec
+ | NONTERM_codeopt
+ | NONTERM_Macros
+ | NONTERM_macro
+ | NONTERM_Rules
+ | NONTERM_rule
+ | NONTERM_args
+ | NONTERM_optbar
+ | NONTERM_clauses
+ | NONTERM_clause
+ | NONTERM_regexp
+ | NONTERM_charset
+
+// This function maps tokens to integer indexes
+let tagOfToken (t:token) =
+ match t with
+ | EOF -> 0
+ | BAR -> 1
+ | DOT -> 2
+ | PLUS -> 3
+ | STAR -> 4
+ | QMARK -> 5
+ | EQUALS -> 6
+ | UNDERSCORE -> 7
+ | LBRACK -> 8
+ | RBRACK -> 9
+ | HAT -> 10
+ | DASH -> 11
+ | RULE -> 12
+ | PARSE -> 13
+ | LET -> 14
+ | AND -> 15
+ | LPAREN -> 16
+ | RPAREN -> 17
+ | UNICODE_CATEGORY _ -> 18
+ | CHAR _ -> 19
+ | CODE _ -> 20
+ | STRING _ -> 21
+ | IDENT _ -> 22
+
+// This function maps integer indexes to symbolic token ids
+let tokenTagToTokenId (tokenIdx:int) =
+ match tokenIdx with
+ | 0 -> TOKEN_EOF
+ | 1 -> TOKEN_BAR
+ | 2 -> TOKEN_DOT
+ | 3 -> TOKEN_PLUS
+ | 4 -> TOKEN_STAR
+ | 5 -> TOKEN_QMARK
+ | 6 -> TOKEN_EQUALS
+ | 7 -> TOKEN_UNDERSCORE
+ | 8 -> TOKEN_LBRACK
+ | 9 -> TOKEN_RBRACK
+ | 10 -> TOKEN_HAT
+ | 11 -> TOKEN_DASH
+ | 12 -> TOKEN_RULE
+ | 13 -> TOKEN_PARSE
+ | 14 -> TOKEN_LET
+ | 15 -> TOKEN_AND
+ | 16 -> TOKEN_LPAREN
+ | 17 -> TOKEN_RPAREN
+ | 18 -> TOKEN_UNICODE_CATEGORY
+ | 19 -> TOKEN_CHAR
+ | 20 -> TOKEN_CODE
+ | 21 -> TOKEN_STRING
+ | 22 -> TOKEN_IDENT
+ | 25 -> TOKEN_end_of_input
+ | 23 -> TOKEN_error
+ | _ -> failwith "tokenTagToTokenId: bad token"
+
+/// This function maps production indexes returned in syntax errors to strings representing the non terminal that would be produced by that production
+let prodIdxToNonTerminal (prodIdx:int) =
+ match prodIdx with
+ | 0 -> NONTERM__startspec
+ | 1 -> NONTERM_spec
+ | 2 -> NONTERM_codeopt
+ | 3 -> NONTERM_codeopt
+ | 4 -> NONTERM_Macros
+ | 5 -> NONTERM_Macros
+ | 6 -> NONTERM_macro
+ | 7 -> NONTERM_Rules
+ | 8 -> NONTERM_Rules
+ | 9 -> NONTERM_rule
+ | 10 -> NONTERM_args
+ | 11 -> NONTERM_args
+ | 12 -> NONTERM_optbar
+ | 13 -> NONTERM_optbar
+ | 14 -> NONTERM_clauses
+ | 15 -> NONTERM_clauses
+ | 16 -> NONTERM_clause
+ | 17 -> NONTERM_regexp
+ | 18 -> NONTERM_regexp
+ | 19 -> NONTERM_regexp
+ | 20 -> NONTERM_regexp
+ | 21 -> NONTERM_regexp
+ | 22 -> NONTERM_regexp
+ | 23 -> NONTERM_regexp
+ | 24 -> NONTERM_regexp
+ | 25 -> NONTERM_regexp
+ | 26 -> NONTERM_regexp
+ | 27 -> NONTERM_regexp
+ | 28 -> NONTERM_regexp
+ | 29 -> NONTERM_regexp
+ | 30 -> NONTERM_regexp
+ | 31 -> NONTERM_charset
+ | 32 -> NONTERM_charset
+ | 33 -> NONTERM_charset
+ | _ -> failwith "prodIdxToNonTerminal: bad production index"
+
+let _fsyacc_endOfInputTag = 25
+let _fsyacc_tagOfErrorTerminal = 23
+
+// This function gets the name of a token as a string
+let token_to_string (t:token) =
+ match t with
+ | EOF -> "EOF"
+ | BAR -> "BAR"
+ | DOT -> "DOT"
+ | PLUS -> "PLUS"
+ | STAR -> "STAR"
+ | QMARK -> "QMARK"
+ | EQUALS -> "EQUALS"
+ | UNDERSCORE -> "UNDERSCORE"
+ | LBRACK -> "LBRACK"
+ | RBRACK -> "RBRACK"
+ | HAT -> "HAT"
+ | DASH -> "DASH"
+ | RULE -> "RULE"
+ | PARSE -> "PARSE"
+ | LET -> "LET"
+ | AND -> "AND"
+ | LPAREN -> "LPAREN"
+ | RPAREN -> "RPAREN"
+ | UNICODE_CATEGORY _ -> "UNICODE_CATEGORY"
+ | CHAR _ -> "CHAR"
+ | CODE _ -> "CODE"
+ | STRING _ -> "STRING"
+ | IDENT _ -> "IDENT"
+
+// This function gets the data carried by a token as an object
+let _fsyacc_dataOfToken (t:token) =
+ match t with
+ | EOF -> (null : System.Object)
+ | BAR -> (null : System.Object)
+ | DOT -> (null : System.Object)
+ | PLUS -> (null : System.Object)
+ | STAR -> (null : System.Object)
+ | QMARK -> (null : System.Object)
+ | EQUALS -> (null : System.Object)
+ | UNDERSCORE -> (null : System.Object)
+ | LBRACK -> (null : System.Object)
+ | RBRACK -> (null : System.Object)
+ | HAT -> (null : System.Object)
+ | DASH -> (null : System.Object)
+ | RULE -> (null : System.Object)
+ | PARSE -> (null : System.Object)
+ | LET -> (null : System.Object)
+ | AND -> (null : System.Object)
+ | LPAREN -> (null : System.Object)
+ | RPAREN -> (null : System.Object)
+ | UNICODE_CATEGORY _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x
+ | CHAR _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x
+ | CODE _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x
+ | STRING _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x
+ | IDENT _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x
+let _fsyacc_gotos = [| 0us; 65535us; 1us; 65535us; 0us; 1us; 2us; 65535us; 0us; 2us; 5us; 6us; 2us; 65535us; 2us; 3us; 8us; 9us; 2us; 65535us; 2us; 8us; 8us; 8us; 2us; 65535us; 4us; 5us; 15us; 16us; 2us; 65535us; 4us; 14us; 15us; 14us; 2us; 65535us; 17us; 18us; 23us; 24us; 1us; 65535us; 20us; 21us; 2us; 65535us; 21us; 22us; 27us; 28us; 2us; 65535us; 21us; 26us; 27us; 26us; 10us; 65535us; 12us; 13us; 13us; 37us; 21us; 29us; 27us; 29us; 29us; 37us; 37us; 37us; 38us; 37us; 39us; 37us; 43us; 38us; 44us; 39us; 5us; 65535us; 46us; 47us; 47us; 55us; 49us; 50us; 50us; 55us; 55us; 55us; |]
+let _fsyacc_sparseGotoTableRowOffsets = [|0us; 1us; 3us; 6us; 9us; 12us; 15us; 18us; 21us; 23us; 26us; 29us; 40us; |]
+let _fsyacc_stateToProdIdxsTableElements = [| 1us; 0us; 1us; 0us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 2us; 1us; 5us; 1us; 5us; 1us; 6us; 1us; 6us; 1us; 6us; 6us; 6us; 23us; 24us; 25us; 26us; 27us; 2us; 7us; 8us; 1us; 7us; 1us; 7us; 1us; 9us; 1us; 9us; 1us; 9us; 1us; 9us; 1us; 9us; 1us; 9us; 1us; 11us; 1us; 11us; 1us; 13us; 2us; 14us; 15us; 1us; 14us; 1us; 14us; 6us; 16us; 23us; 24us; 25us; 26us; 27us; 1us; 16us; 1us; 17us; 1us; 18us; 1us; 19us; 1us; 20us; 1us; 21us; 1us; 22us; 6us; 23us; 23us; 24us; 25us; 26us; 27us; 6us; 23us; 24us; 25us; 26us; 27us; 27us; 6us; 23us; 24us; 25us; 26us; 27us; 28us; 1us; 24us; 1us; 25us; 1us; 26us; 1us; 27us; 1us; 28us; 1us; 28us; 2us; 29us; 30us; 2us; 29us; 33us; 1us; 29us; 1us; 30us; 2us; 30us; 33us; 1us; 30us; 2us; 31us; 32us; 1us; 32us; 1us; 32us; 2us; 33us; 33us; |]
+let _fsyacc_stateToProdIdxsTableRowOffsets = [|0us; 2us; 4us; 6us; 8us; 10us; 12us; 14us; 16us; 18us; 20us; 22us; 24us; 26us; 33us; 36us; 38us; 40us; 42us; 44us; 46us; 48us; 50us; 52us; 54us; 56us; 58us; 61us; 63us; 65us; 72us; 74us; 76us; 78us; 80us; 82us; 84us; 86us; 93us; 100us; 107us; 109us; 111us; 113us; 115us; 117us; 119us; 122us; 125us; 127us; 129us; 132us; 134us; 137us; 139us; 141us; |]
+let _fsyacc_action_rows = 56
+let _fsyacc_actionTableElements = [|1us; 16387us; 20us; 7us; 0us; 49152us; 1us; 16388us; 14us; 10us; 1us; 32768us; 12us; 4us; 1us; 32768us; 22us; 17us; 1us; 16387us; 20us; 7us; 0us; 16385us; 0us; 16386us; 1us; 16388us; 14us; 10us; 0us; 16389us; 1us; 32768us; 22us; 11us; 1us; 32768us; 6us; 12us; 8us; 32768us; 0us; 33us; 7us; 34us; 8us; 46us; 16us; 44us; 18us; 32us; 19us; 31us; 21us; 35us; 22us; 36us; 12us; 16390us; 0us; 33us; 1us; 43us; 3us; 40us; 4us; 41us; 5us; 42us; 7us; 34us; 8us; 46us; 16us; 44us; 18us; 32us; 19us; 31us; 21us; 35us; 22us; 36us; 1us; 16392us; 15us; 15us; 1us; 32768us; 22us; 17us; 0us; 16391us; 1us; 16394us; 22us; 23us; 1us; 32768us; 6us; 19us; 1us; 32768us; 13us; 20us; 1us; 16396us; 1us; 25us; 8us; 32768us; 0us; 33us; 7us; 34us; 8us; 46us; 16us; 44us; 18us; 32us; 19us; 31us; 21us; 35us; 22us; 36us; 0us; 16393us; 1us; 16394us; 22us; 23us; 0us; 16395us; 0us; 16397us; 1us; 16399us; 1us; 27us; 8us; 32768us; 0us; 33us; 7us; 34us; 8us; 46us; 16us; 44us; 18us; 32us; 19us; 31us; 21us; 35us; 22us; 36us; 0us; 16398us; 13us; 32768us; 0us; 33us; 1us; 43us; 3us; 40us; 4us; 41us; 5us; 42us; 7us; 34us; 8us; 46us; 16us; 44us; 18us; 32us; 19us; 31us; 20us; 30us; 21us; 35us; 22us; 36us; 0us; 16400us; 0us; 16401us; 0us; 16402us; 0us; 16403us; 0us; 16404us; 0us; 16405us; 0us; 16406us; 11us; 16407us; 0us; 33us; 3us; 40us; 4us; 41us; 5us; 42us; 7us; 34us; 8us; 46us; 16us; 44us; 18us; 32us; 19us; 31us; 21us; 35us; 22us; 36us; 11us; 16411us; 0us; 33us; 3us; 40us; 4us; 41us; 5us; 42us; 7us; 34us; 8us; 46us; 16us; 44us; 18us; 32us; 19us; 31us; 21us; 35us; 22us; 36us; 13us; 32768us; 0us; 33us; 1us; 43us; 3us; 40us; 4us; 41us; 5us; 42us; 7us; 34us; 8us; 46us; 16us; 44us; 17us; 45us; 18us; 32us; 19us; 31us; 21us; 35us; 22us; 36us; 0us; 16408us; 0us; 16409us; 0us; 16410us; 8us; 32768us; 0us; 33us; 7us; 34us; 8us; 46us; 16us; 44us; 18us; 32us; 19us; 31us; 21us; 35us; 22us; 36us; 8us; 32768us; 0us; 33us; 7us; 34us; 8us; 46us; 16us; 44us; 18us; 32us; 19us; 31us; 21us; 35us; 22us; 36us; 0us; 16412us; 2us; 32768us; 10us; 49us; 19us; 52us; 2us; 32768us; 9us; 48us; 19us; 52us; 0us; 16413us; 1us; 32768us; 19us; 52us; 2us; 32768us; 9us; 51us; 19us; 52us; 0us; 16414us; 1us; 16415us; 11us; 53us; 1us; 32768us; 19us; 54us; 0us; 16416us; 1us; 16417us; 19us; 52us; |]
+let _fsyacc_actionTableRowOffsets = [|0us; 2us; 3us; 5us; 7us; 9us; 11us; 12us; 13us; 15us; 16us; 18us; 20us; 29us; 42us; 44us; 46us; 47us; 49us; 51us; 53us; 55us; 64us; 65us; 67us; 68us; 69us; 71us; 80us; 81us; 95us; 96us; 97us; 98us; 99us; 100us; 101us; 102us; 114us; 126us; 140us; 141us; 142us; 143us; 152us; 161us; 162us; 165us; 168us; 169us; 171us; 174us; 175us; 177us; 179us; 180us; |]
+let _fsyacc_reductionSymbolCounts = [|1us; 5us; 1us; 0us; 0us; 2us; 4us; 3us; 1us; 6us; 0us; 2us; 0us; 1us; 3us; 1us; 2us; 1us; 1us; 1us; 1us; 1us; 1us; 2us; 2us; 2us; 2us; 3us; 3us; 3us; 4us; 1us; 3us; 2us; |]
+let _fsyacc_productionToNonTerminalTable = [|0us; 1us; 2us; 2us; 3us; 3us; 4us; 5us; 5us; 6us; 7us; 7us; 8us; 8us; 9us; 9us; 10us; 11us; 11us; 11us; 11us; 11us; 11us; 11us; 11us; 11us; 11us; 11us; 11us; 11us; 11us; 12us; 12us; 12us; |]
+let _fsyacc_immediateActions = [|65535us; 49152us; 65535us; 65535us; 65535us; 65535us; 16385us; 16386us; 65535us; 16389us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 16391us; 65535us; 65535us; 65535us; 65535us; 65535us; 16393us; 65535us; 16395us; 16397us; 65535us; 65535us; 16398us; 65535us; 16400us; 16401us; 16402us; 16403us; 16404us; 16405us; 16406us; 65535us; 65535us; 65535us; 16408us; 16409us; 16410us; 65535us; 65535us; 16412us; 65535us; 65535us; 16413us; 65535us; 65535us; 16414us; 65535us; 65535us; 16416us; 65535us; |]
+let _fsyacc_reductions () = [|
+# 246 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : AST.Spec)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+ raise (Internal.Utilities.Text.Parsing.Accept(Microsoft.FSharp.Core.Operators.box _1))
+ )
+ : '_startspec));
+# 255 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'codeopt)) in
+ let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'Macros)) in
+ let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'Rules)) in
+ let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'codeopt)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 24 "fslexpars.fsy"
+ { TopCode=_1;Macros=_2;Rules=_4;BottomCode=_5 }
+ )
+# 24 "fslexpars.fsy"
+ : AST.Spec));
+# 269 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : AST.Code)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 25 "fslexpars.fsy"
+ _1
+ )
+# 25 "fslexpars.fsy"
+ : 'codeopt));
+# 280 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 25 "fslexpars.fsy"
+ "", (parseState.ResultRange |> fst)
+ )
+# 25 "fslexpars.fsy"
+ : 'codeopt));
+# 290 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 26 "fslexpars.fsy"
+ []
+ )
+# 26 "fslexpars.fsy"
+ : 'Macros));
+# 300 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'macro)) in
+ let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'Macros)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 26 "fslexpars.fsy"
+ _1 :: _2
+ )
+# 26 "fslexpars.fsy"
+ : 'Macros));
+# 312 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in
+ let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'regexp)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 27 "fslexpars.fsy"
+ (_2, _4)
+ )
+# 27 "fslexpars.fsy"
+ : 'macro));
+# 324 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'rule)) in
+ let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'Rules)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 28 "fslexpars.fsy"
+ _1 :: _3
+ )
+# 28 "fslexpars.fsy"
+ : 'Rules));
+# 336 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'rule)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 28 "fslexpars.fsy"
+ [_1]
+ )
+# 28 "fslexpars.fsy"
+ : 'Rules));
+# 347 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in
+ let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'args)) in
+ let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'optbar)) in
+ let _6 = (let data = parseState.GetInput(6) in (Microsoft.FSharp.Core.Operators.unbox data : 'clauses)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 29 "fslexpars.fsy"
+ (_1,_2,_6)
+ )
+# 29 "fslexpars.fsy"
+ : 'rule));
+# 361 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 30 "fslexpars.fsy"
+ []
+ )
+# 30 "fslexpars.fsy"
+ : 'args));
+# 371 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in
+ let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'args)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 30 "fslexpars.fsy"
+ _1 :: _2
+ )
+# 30 "fslexpars.fsy"
+ : 'args));
+# 383 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 31 "fslexpars.fsy"
+
+ )
+# 31 "fslexpars.fsy"
+ : 'optbar));
+# 393 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 31 "fslexpars.fsy"
+
+ )
+# 31 "fslexpars.fsy"
+ : 'optbar));
+# 403 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'clause)) in
+ let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'clauses)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 32 "fslexpars.fsy"
+ _1 :: _3
+ )
+# 32 "fslexpars.fsy"
+ : 'clauses));
+# 415 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'clause)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 32 "fslexpars.fsy"
+ [_1]
+ )
+# 32 "fslexpars.fsy"
+ : 'clauses));
+# 426 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'regexp)) in
+ let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : AST.Code)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 33 "fslexpars.fsy"
+ _1, _2
+ )
+# 33 "fslexpars.fsy"
+ : 'clause));
+# 438 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : char)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 35 "fslexpars.fsy"
+ Inp(Alphabet(EncodeChar _1))
+ )
+# 35 "fslexpars.fsy"
+ : 'regexp));
+# 449 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 36 "fslexpars.fsy"
+ Inp(UnicodeCategory _1)
+ )
+# 36 "fslexpars.fsy"
+ : 'regexp));
+# 460 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 37 "fslexpars.fsy"
+ Inp(Alphabet(Eof))
+ )
+# 37 "fslexpars.fsy"
+ : 'regexp));
+# 470 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 38 "fslexpars.fsy"
+ Inp Any
+ )
+# 38 "fslexpars.fsy"
+ : 'regexp));
+# 480 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 39 "fslexpars.fsy"
+ Seq([ for n in 0 .. _1.Length - 1 -> Inp(Alphabet(EncodeChar _1.[n]))])
+ )
+# 39 "fslexpars.fsy"
+ : 'regexp));
+# 491 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 40 "fslexpars.fsy"
+ Macro(_1)
+ )
+# 40 "fslexpars.fsy"
+ : 'regexp));
+# 502 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'regexp)) in
+ let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'regexp)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 41 "fslexpars.fsy"
+ Seq[_1;_2]
+ )
+# 41 "fslexpars.fsy"
+ : 'regexp));
+# 514 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'regexp)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 42 "fslexpars.fsy"
+ Seq[_1;Star _1]
+ )
+# 42 "fslexpars.fsy"
+ : 'regexp));
+# 525 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'regexp)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 43 "fslexpars.fsy"
+ Star _1
+ )
+# 43 "fslexpars.fsy"
+ : 'regexp));
+# 536 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'regexp)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 44 "fslexpars.fsy"
+ Alt[Seq[];_1]
+ )
+# 44 "fslexpars.fsy"
+ : 'regexp));
+# 547 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'regexp)) in
+ let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'regexp)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 45 "fslexpars.fsy"
+ Alt[_1;_3]
+ )
+# 45 "fslexpars.fsy"
+ : 'regexp));
+# 559 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'regexp)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 46 "fslexpars.fsy"
+ _2
+ )
+# 46 "fslexpars.fsy"
+ : 'regexp));
+# 570 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'charset)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 47 "fslexpars.fsy"
+ Alt [ for c in _2 -> Inp(Alphabet(c)) ]
+ )
+# 47 "fslexpars.fsy"
+ : 'regexp));
+# 581 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'charset)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 48 "fslexpars.fsy"
+ Inp(NotCharSet(_3))
+ )
+# 48 "fslexpars.fsy"
+ : 'regexp));
+# 592 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : char)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 51 "fslexpars.fsy"
+ Set.singleton(EncodeChar _1)
+ )
+# 51 "fslexpars.fsy"
+ : 'charset));
+# 603 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : char)) in
+ let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : char)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 52 "fslexpars.fsy"
+ Set.ofSeq [ for c in _1 .. _3 -> EncodeChar c ]
+ )
+# 52 "fslexpars.fsy"
+ : 'charset));
+# 615 "fslexpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'charset)) in
+ let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'charset)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 53 "fslexpars.fsy"
+ Set.union _1 _2
+ )
+# 53 "fslexpars.fsy"
+ : 'charset));
+|]
+# 628 "fslexpars.fs"
+let tables () : Internal.Utilities.Text.Parsing.Tables<_> =
+ { reductions= _fsyacc_reductions ();
+ endOfInputTag = _fsyacc_endOfInputTag;
+ tagOfToken = tagOfToken;
+ dataOfToken = _fsyacc_dataOfToken;
+ actionTableElements = _fsyacc_actionTableElements;
+ actionTableRowOffsets = _fsyacc_actionTableRowOffsets;
+ stateToProdIdxsTableElements = _fsyacc_stateToProdIdxsTableElements;
+ stateToProdIdxsTableRowOffsets = _fsyacc_stateToProdIdxsTableRowOffsets;
+ reductionSymbolCounts = _fsyacc_reductionSymbolCounts;
+ immediateActions = _fsyacc_immediateActions;
+ gotos = _fsyacc_gotos;
+ sparseGotoTableRowOffsets = _fsyacc_sparseGotoTableRowOffsets;
+ tagOfErrorTerminal = _fsyacc_tagOfErrorTerminal;
+ parseError = (fun (ctxt:Internal.Utilities.Text.Parsing.ParseErrorContext<_>) ->
+ match parse_error_rich with
+ | Some f -> f ctxt
+ | None -> parse_error ctxt.Message);
+ numTerminals = 26;
+ productionToNonTerminalTable = _fsyacc_productionToNonTerminalTable }
+let engine lexer lexbuf startState = (tables ()).Interpret(lexer, lexbuf, startState)
+let spec lexer lexbuf : AST.Spec =
+ Microsoft.FSharp.Core.Operators.unbox ((tables ()).Interpret(lexer, lexbuf, 0))
diff --git a/src/buildtools/fsyacc/App.config b/src/buildtools/fsyacc/App.config
new file mode 100644
index 0000000000..e1b09eda9f
--- /dev/null
+++ b/src/buildtools/fsyacc/App.config
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/buildtools/fsyacc/Arg.fs b/src/buildtools/fsyacc/Arg.fs
new file mode 100644
index 0000000000..a1f63bd963
--- /dev/null
+++ b/src/buildtools/fsyacc/Arg.fs
@@ -0,0 +1,133 @@
+// (c) Microsoft Corporation 2005-2009.
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+namespace Internal.Utilities
+#else
+namespace Microsoft.FSharp.Text
+#endif
+
+
+type ArgType =
+ | ClearArg of bool ref
+ | FloatArg of (float -> unit)
+ | IntArg of (int -> unit)
+ | RestArg of (string -> unit)
+ | SetArg of bool ref
+ | StringArg of (string -> unit)
+ | UnitArg of (unit -> unit)
+ static member Clear r = ClearArg r
+ static member Float r = FloatArg r
+ static member Int r = IntArg r
+ static member Rest r = RestArg r
+ static member Set r = SetArg r
+ static member String r = StringArg r
+ static member Unit r = UnitArg r
+
+
+type ArgInfo (name,action,help) =
+ member x.Name = name
+ member x.ArgType = action
+ member x.HelpText = help
+
+exception Bad of string
+exception HelpText of string
+
+[]
+type ArgParser() =
+ static let getUsage specs u =
+ let sbuf = new System.Text.StringBuilder 100
+ let pstring (s:string) = sbuf.Append s |> ignore
+ let pendline s = pstring s; pstring "\n"
+ pendline u;
+ List.iter (fun (arg:ArgInfo) ->
+ match arg.Name, arg.ArgType, arg.HelpText with
+ | (s, (UnitArg _ | SetArg _ | ClearArg _), helpText) -> pstring "\t"; pstring s; pstring ": "; pendline helpText
+ | (s, StringArg _, helpText) -> pstring "\t"; pstring s; pstring " : "; pendline helpText
+ | (s, IntArg _, helpText) -> pstring "\t"; pstring s; pstring " : "; pendline helpText
+ | (s, FloatArg _, helpText) -> pstring "\t"; pstring s; pstring " : "; pendline helpText
+ | (s, RestArg _, helpText) -> pstring "\t"; pstring s; pstring " ...: "; pendline helpText)
+ specs;
+ pstring "\t"; pstring "--help"; pstring ": "; pendline "display this list of options";
+ pstring "\t"; pstring "-help"; pstring ": "; pendline "display this list of options";
+ sbuf.ToString()
+
+
+ static member ParsePartial(cursor,argv,argSpecs:seq,?other,?usageText) =
+ let other = defaultArg other (fun _ -> ())
+ let usageText = defaultArg usageText ""
+ let nargs = Array.length argv
+ incr cursor;
+ let argSpecs = argSpecs |> Seq.toList
+ let specs = argSpecs |> List.map (fun (arg:ArgInfo) -> arg.Name, arg.ArgType)
+ while !cursor < nargs do
+ let arg = argv.[!cursor]
+ let rec findMatchingArg args =
+ match args with
+ | ((s, action) :: _) when s = arg ->
+ let getSecondArg () =
+ if !cursor + 1 >= nargs then
+ raise(Bad("option "+s+" needs an argument.\n"+getUsage argSpecs usageText));
+ argv.[!cursor+1]
+
+ match action with
+ | UnitArg f ->
+ f ();
+ incr cursor
+ | SetArg f ->
+ f := true;
+ incr cursor
+ | ClearArg f ->
+ f := false;
+ incr cursor
+ | StringArg f->
+ let arg2 = getSecondArg()
+ f arg2;
+ cursor := !cursor + 2
+ | IntArg f ->
+ let arg2 = getSecondArg ()
+ let arg2 = try int32 arg2 with _ -> raise(Bad(getUsage argSpecs usageText)) in
+ f arg2;
+ cursor := !cursor + 2;
+ | FloatArg f ->
+ let arg2 = getSecondArg()
+ let arg2 = try float arg2 with _ -> raise(Bad(getUsage argSpecs usageText)) in
+ f arg2;
+ cursor := !cursor + 2;
+ | RestArg f ->
+ incr cursor;
+ while !cursor < nargs do
+ f (argv.[!cursor]);
+ incr cursor;
+
+ | (_ :: more) -> findMatchingArg more
+ | [] ->
+ if arg = "-help" || arg = "--help" || arg = "/help" || arg = "/help" || arg = "/?" then
+ raise (HelpText (getUsage argSpecs usageText))
+ // Note: for '/abc/def' does not count as an argument
+ // Note: '/abc' does
+ elif arg.Length>0 && (arg.[0] = '-' || (arg.[0] = '/' && not (arg.Length > 1 && arg.[1..].Contains ("/")))) then
+ raise (Bad ("unrecognized argument: "+ arg + "\n" + getUsage argSpecs usageText))
+ else
+ other arg;
+ incr cursor
+ findMatchingArg specs
+
+ static member Usage (specs,?usage) =
+ let usage = defaultArg usage ""
+ System.Console.Error.WriteLine (getUsage (Seq.toList specs) usage)
+
+ #if FX_NO_COMMAND_LINE_ARGS
+ #else
+ static member Parse (specs,?other,?usageText) =
+ let current = ref 0
+ let argv = System.Environment.GetCommandLineArgs()
+ try ArgParser.ParsePartial (current, argv, specs, ?other=other, ?usageText=usageText)
+ with
+ | Bad h
+ | HelpText h ->
+ System.Console.Error.WriteLine h;
+ System.Console.Error.Flush();
+ System.Environment.Exit(1);
+ | e ->
+ reraise()
+ #endif
diff --git a/src/buildtools/fsyacc/Arg.fsi b/src/buildtools/fsyacc/Arg.fsi
new file mode 100644
index 0000000000..367f69f959
--- /dev/null
+++ b/src/buildtools/fsyacc/Arg.fsi
@@ -0,0 +1,50 @@
+// (c) Microsoft Corporation 2005-2009.
+
+/// A simple command-line argument processor.
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+namespace Internal.Utilities
+#else
+namespace Microsoft.FSharp.Text
+#endif
+
+/// The spec value describes the action of the argument,
+/// and whether it expects a following parameter.
+[]
+type ArgType =
+ static member Clear : bool ref -> ArgType
+ static member Float : (float -> unit) -> ArgType
+ static member Int : (int -> unit) -> ArgType
+ static member Rest : (string -> unit) -> ArgType
+ static member Set : bool ref -> ArgType
+ static member String : (string -> unit) -> ArgType
+ static member Unit : (unit -> unit) -> ArgType
+
+type ArgInfo =
+ new : name:string * action:ArgType * help:string -> ArgInfo
+ /// Return the name of the argument
+ member Name : string
+ /// Return the argument type and action of the argument
+ member ArgType : ArgType
+ /// Return the usage help associated with the argument
+ member HelpText : string
+
+[]
+type ArgParser =
+ #if FX_NO_COMMAND_LINE_ARGS
+ #else
+
+ /// Parse some of the arguments given by 'argv', starting at the given position
+ []
+ static member ParsePartial: cursor: int ref * argv: string[] * arguments:seq * ?otherArgs: (string -> unit) * ?usageText:string -> unit
+
+ /// Parse the arguments given by System.Environment.GetEnvironmentVariables()
+ /// according to the argument processing specifications "specs".
+ /// Args begin with "-". Non-arguments are passed to "f" in
+ /// order. "use" is printed as part of the usage line if an error occurs.
+
+ static member Parse: arguments:seq * ?otherArgs: (string -> unit) * ?usageText:string -> unit
+ #endif
+
+ /// Prints the help for each argument.
+ static member Usage : arguments:seq * ?usage:string -> unit
+
diff --git a/src/buildtools/fsyacc/Lexing.fs b/src/buildtools/fsyacc/Lexing.fs
new file mode 100644
index 0000000000..8337717d6f
--- /dev/null
+++ b/src/buildtools/fsyacc/Lexing.fs
@@ -0,0 +1,423 @@
+// (c) Microsoft Corporation 2005-2009.
+
+#nowarn "47" // recursive initialization of LexBuffer
+
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+namespace Internal.Utilities.Text.Lexing
+
+#else
+namespace Microsoft.FSharp.Text.Lexing
+#endif
+
+ open System.Collections.Generic
+
+ // REVIEW: This type showed up on a parsing-intensive performance measurement. Consider whether it can be a struct-record later when we have this feature. -jomo
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ type internal Position =
+#else
+ type Position =
+#endif
+ { pos_fname : string;
+ pos_lnum : int;
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ pos_orig_lnum : int;
+#endif
+ pos_bol : int;
+ pos_cnum : int; }
+ member x.FileName = x.pos_fname
+ member x.Line = x.pos_lnum
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ member x.OriginalLine = x.pos_orig_lnum
+#endif
+ member x.Char = x.pos_cnum
+ member x.AbsoluteOffset = x.pos_cnum
+ member x.StartOfLine = x.pos_bol
+ member x.StartOfLineAbsoluteOffset = x.pos_bol
+ member x.Column = x.pos_cnum - x.pos_bol
+ member pos.NextLine =
+ { pos with
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ pos_orig_lnum = pos.OriginalLine + 1;
+#endif
+ pos_lnum = pos.Line+1;
+ pos_bol = pos.AbsoluteOffset }
+ member pos.EndOfToken(n) = {pos with pos_cnum=pos.pos_cnum + n }
+ member pos.AsNewLinePos() = pos.NextLine
+ member pos.ShiftColumnBy(by) = {pos with pos_cnum = pos.pos_cnum + by}
+ static member Empty =
+ { pos_fname="";
+ pos_lnum= 0;
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ pos_orig_lnum = 0;
+#endif
+ pos_bol= 0;
+ pos_cnum=0 }
+ static member FirstLine(filename) =
+ { pos_fname=filename;
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ pos_orig_lnum = 1;
+#endif
+ pos_lnum= 1;
+ pos_bol= 0;
+ pos_cnum=0 }
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ type internal LexBufferFiller<'char> =
+#else
+ type LexBufferFiller<'char> =
+#endif
+ { fillSync : (LexBuffer<'char> -> unit) option
+ fillAsync : (LexBuffer<'char> -> Async) option }
+
+ and []
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ internal LexBuffer<'char>(filler: LexBufferFiller<'char>) as this =
+#else
+ LexBuffer<'char>(filler: LexBufferFiller<'char>) as this =
+#endif
+ let context = new Dictionary(1) in
+ let extendBufferSync = (fun () -> match filler.fillSync with Some refill -> refill this | None -> invalidOp "attempt to read synchronously from an asynchronous lex buffer")
+ let extendBufferAsync = (fun () -> match filler.fillAsync with Some refill -> refill this | None -> invalidOp "attempt to read asynchronously from a synchronous lex buffer")
+ let mutable buffer=[||];
+ /// number of valid charactes beyond bufferScanStart
+ let mutable bufferMaxScanLength=0;
+ /// count into the buffer when scanning
+ let mutable bufferScanStart=0;
+ /// number of characters scanned so far
+ let mutable bufferScanLength=0;
+ /// length of the scan at the last accepting state
+ let mutable lexemeLength=0;
+ /// action related to the last accepting state
+ let mutable bufferAcceptAction=0;
+ let mutable eof = false;
+ let mutable startPos = Position.Empty ;
+ let mutable endPos = Position.Empty
+
+ // Throw away all the input besides the lexeme
+
+ let discardInput () =
+ let keep = Array.sub buffer bufferScanStart bufferScanLength
+ let nkeep = keep.Length
+ Array.blit keep 0 buffer 0 nkeep;
+ bufferScanStart <- 0;
+ bufferMaxScanLength <- nkeep
+
+
+ member lexbuf.EndOfScan () : int =
+ // Printf.eprintf "endOfScan, lexBuffer.lexemeLength = %d\n" lexBuffer.lexemeLength;
+ if bufferAcceptAction < 0 then
+ failwith "unrecognized input"
+
+ // Printf.printf "endOfScan %d state %d on unconsumed input '%c' (%d)\n" a s (Char.chr inp) inp;
+ // Printf.eprintf "accept, lexeme = %s\n" (lexeme lexBuffer);
+ lexbuf.StartPos <- endPos;
+ lexbuf.EndPos <- endPos.EndOfToken(lexbuf.LexemeLength);
+ bufferAcceptAction
+
+ member lexbuf.StartPos
+ with get() = startPos
+ and set(b) = startPos <- b
+
+ member lexbuf.EndPos
+ with get() = endPos
+ and set(b) = endPos <- b
+
+ member lexbuf.Lexeme = Array.sub buffer bufferScanStart lexemeLength
+ member lexbuf.LexemeChar(n) = buffer.[n+bufferScanStart]
+
+ member lexbuf.BufferLocalStore = (context :> IDictionary<_,_>)
+ member lexbuf.LexemeLength with get() : int = lexemeLength and set v = lexemeLength <- v
+ member internal lexbuf.Buffer with get() : 'char[] = buffer and set v = buffer <- v
+ member internal lexbuf.BufferMaxScanLength with get() = bufferMaxScanLength and set v = bufferMaxScanLength <- v
+ member internal lexbuf.BufferScanLength with get() = bufferScanLength and set v = bufferScanLength <- v
+ member internal lexbuf.BufferScanStart with get() : int = bufferScanStart and set v = bufferScanStart <- v
+ member internal lexbuf.BufferAcceptAction with get() = bufferAcceptAction and set v = bufferAcceptAction <- v
+ member internal lexbuf.RefillBuffer = extendBufferSync
+ member internal lexbuf.AsyncRefillBuffer = extendBufferAsync
+
+ static member LexemeString(lexbuf:LexBuffer) =
+ new System.String(lexbuf.Buffer,lexbuf.BufferScanStart,lexbuf.LexemeLength)
+
+ member lexbuf.IsPastEndOfStream
+ with get() = eof
+ and set(b) = eof <- b
+
+ member lexbuf.DiscardInput() = discardInput ()
+
+ member x.BufferScanPos = bufferScanStart + bufferScanLength
+
+ member lexbuf.EnsureBufferSize n =
+ if lexbuf.BufferScanPos + n >= buffer.Length then
+ let repl = Array.zeroCreate (lexbuf.BufferScanPos + n)
+ Array.blit buffer bufferScanStart repl bufferScanStart bufferScanLength;
+ buffer <- repl
+
+ static member FromReadFunctions (syncRead : ('char[] * int * int -> int) option, asyncRead : ('char[] * int * int -> Async) option) : LexBuffer<'char> =
+ let extension= Array.zeroCreate 4096
+ let fillers =
+ { fillSync =
+ match syncRead with
+ | None -> None
+ | Some read ->
+ Some (fun lexBuffer ->
+ let n = read(extension,0,extension.Length)
+ lexBuffer.EnsureBufferSize n;
+ Array.blit extension 0 lexBuffer.Buffer lexBuffer.BufferScanPos n;
+ lexBuffer.BufferMaxScanLength <- lexBuffer.BufferScanLength + n);
+ fillAsync =
+ match asyncRead with
+ | None -> None
+ | Some read ->
+ Some (fun lexBuffer ->
+ async {
+ let! n = read(extension,0,extension.Length)
+ lexBuffer.EnsureBufferSize n;
+ Array.blit extension 0 lexBuffer.Buffer lexBuffer.BufferScanPos n;
+ lexBuffer.BufferMaxScanLength <- lexBuffer.BufferScanLength + n }) }
+ new LexBuffer<_>(fillers)
+
+ // A full type signature is required on this method because it is used at more specific types within its own scope
+ static member FromFunction (f : 'char[] * int * int -> int) : LexBuffer<'char> = LexBuffer<_>.FromReadFunctions(Some(f),None)
+ static member FromAsyncFunction (f : 'char[] * int * int -> Async) : LexBuffer<'char> = LexBuffer<_>.FromReadFunctions(None,Some(f))
+
+ static member FromCharFunction f : LexBuffer =
+ LexBuffer.FromFunction(fun (buff,start,len) ->
+ let buff2 = Array.zeroCreate len
+ let n = f buff2 len
+ Array.blit buff2 0 buff start len
+ n)
+ static member FromByteFunction f : LexBuffer =
+ LexBuffer.FromFunction(fun (buff,start,len) ->
+ let buff2 = Array.zeroCreate len
+ let n = f buff2 len
+ Array.blit buff2 0 buff start len
+ n)
+
+ // A full type signature is required on this method because it is used at more specific types within its own scope
+ static member FromArray (s: 'char[]) : LexBuffer<'char> =
+ let lexBuffer =
+ new LexBuffer<_>
+ { fillSync = Some (fun _ -> ());
+ fillAsync = Some (fun _ -> async { return () }) }
+ let buffer = Array.copy s
+ lexBuffer.Buffer <- buffer;
+ lexBuffer.BufferMaxScanLength <- buffer.Length;
+ lexBuffer
+
+ static member FromBytes (arr) = LexBuffer.FromArray(arr)
+ static member FromChars (arr) = LexBuffer.FromArray(arr)
+ static member FromString (s:string) = LexBuffer.FromChars (s.ToCharArray())
+
+ static member FromTextReader (tr:System.IO.TextReader) : LexBuffer =
+ LexBuffer.FromFunction(tr.Read)
+
+ static member FromBinaryReader (br:System.IO.BinaryReader) : LexBuffer =
+ LexBuffer.FromFunction(br.Read)
+
+ static member FromStream (stream:System.IO.Stream) : LexBuffer =
+ LexBuffer.FromReadFunctions(Some(stream.Read),Some(fun (buf,offset,len) -> stream.AsyncRead(buf,offset=offset,count=len)))
+
+ module GenericImplFragments =
+ let startInterpret(lexBuffer:LexBuffer<_>)=
+ lexBuffer.BufferScanStart <- lexBuffer.BufferScanStart + lexBuffer.LexemeLength;
+ lexBuffer.BufferMaxScanLength <- lexBuffer.BufferMaxScanLength - lexBuffer.LexemeLength;
+ lexBuffer.BufferScanLength <- 0;
+ lexBuffer.LexemeLength <- 0;
+ lexBuffer.BufferAcceptAction <- -1;
+
+ let afterRefill (trans: uint16[] array,sentinel,lexBuffer:LexBuffer<_>,scanUntilSentinel,endOfScan,state,eofPos) =
+ // end of file occurs if we couldn't extend the buffer
+ if lexBuffer.BufferScanLength = lexBuffer.BufferMaxScanLength then
+ let snew = int trans.[state].[eofPos] // == EOF
+ if snew = sentinel then
+ endOfScan()
+ else
+ if lexBuffer.IsPastEndOfStream then failwith "End of file on lexing stream";
+ lexBuffer.IsPastEndOfStream <- true;
+ // Printf.printf "state %d --> %d on eof\n" state snew;
+ scanUntilSentinel(lexBuffer,snew)
+ else
+ scanUntilSentinel(lexBuffer, state)
+
+ let onAccept (lexBuffer:LexBuffer<_>,a) =
+ lexBuffer.LexemeLength <- lexBuffer.BufferScanLength;
+ lexBuffer.BufferAcceptAction <- a;
+
+ open GenericImplFragments
+
+ []
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ type internal AsciiTables(trans: uint16[] array, accept: uint16[]) =
+#else
+ type AsciiTables(trans: uint16[] array, accept: uint16[]) =
+#endif
+ let rec scanUntilSentinel(lexBuffer, state) =
+ let sentinel = 255 * 256 + 255
+ // Return an endOfScan after consuming the input
+ let a = int accept.[state]
+ if a <> sentinel then
+ onAccept (lexBuffer,a)
+
+ if lexBuffer.BufferScanLength = lexBuffer.BufferMaxScanLength then
+ lexBuffer.DiscardInput();
+ lexBuffer.RefillBuffer ();
+ // end of file occurs if we couldn't extend the buffer
+ afterRefill (trans,sentinel,lexBuffer,scanUntilSentinel,lexBuffer.EndOfScan,state,256 (* == EOF *) )
+ else
+ // read a character - end the scan if there are no further transitions
+ let inp = int(lexBuffer.Buffer.[lexBuffer.BufferScanPos])
+ let snew = int trans.[state].[inp]
+ if snew = sentinel then
+ lexBuffer.EndOfScan()
+ else
+ lexBuffer.BufferScanLength <- lexBuffer.BufferScanLength + 1;
+ // Printf.printf "state %d --> %d on '%c' (%d)\n" state snew (Char.chr inp) inp;
+ scanUntilSentinel(lexBuffer, snew)
+
+ /// Interpret tables for an ascii lexer generated by fslex.
+ member tables.Interpret(initialState,lexBuffer : LexBuffer) =
+ startInterpret(lexBuffer)
+ scanUntilSentinel(lexBuffer, initialState)
+
+ /// Interpret tables for an ascii lexer generated by fslex.
+ member tables.AsyncInterpret(initialState,lexBuffer : LexBuffer) =
+
+ let rec scanUntilSentinel(lexBuffer,state) : Async =
+ async {
+ let sentinel = 255 * 256 + 255
+ // Return an endOfScan after consuming the input
+ let a = int accept.[state]
+ if a <> sentinel then
+ onAccept (lexBuffer,a)
+
+ if lexBuffer.BufferScanLength = lexBuffer.BufferMaxScanLength then
+ lexBuffer.DiscardInput();
+ do! lexBuffer.AsyncRefillBuffer ();
+ // end of file occurs if we couldn't extend the buffer
+ return! afterRefill (trans,sentinel,lexBuffer,scanUntilSentinel,endOfScan,state,256 (* == EOF *) )
+ else
+ // read a character - end the scan if there are no further transitions
+ let inp = int(lexBuffer.Buffer.[lexBuffer.BufferScanPos])
+ let snew = int trans.[state].[inp]
+ if snew = sentinel then
+ return! endOfScan()
+ else
+ lexBuffer.BufferScanLength <- lexBuffer.BufferScanLength + 1;
+ return! scanUntilSentinel(lexBuffer,snew)
+ }
+ and endOfScan() =
+ async { return lexBuffer.EndOfScan() }
+ startInterpret(lexBuffer)
+ scanUntilSentinel(lexBuffer, initialState)
+
+
+ static member Create(trans,accept) = new AsciiTables(trans,accept)
+
+ []
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ type internal UnicodeTables(trans: uint16[] array, accept: uint16[]) =
+#else
+ type UnicodeTables(trans: uint16[] array, accept: uint16[]) =
+#endif
+ let sentinel = 255 * 256 + 255
+ let numUnicodeCategories = 30
+ let numLowUnicodeChars = 128
+ let numSpecificUnicodeChars = (trans.[0].Length - 1 - numLowUnicodeChars - numUnicodeCategories)/2
+ let lookupUnicodeCharacters (state,inp) =
+ let inpAsInt = int inp
+ // Is it a fast ASCII character?
+ if inpAsInt < numLowUnicodeChars then
+ int trans.[state].[inpAsInt]
+ else
+ // Search for a specific unicode character
+ let baseForSpecificUnicodeChars = numLowUnicodeChars
+ let rec loop i =
+ if i >= numSpecificUnicodeChars then
+ // OK, if we failed then read the 'others' entry in the alphabet,
+ // which covers all Unicode characters not covered in other
+ // ways
+ let baseForUnicodeCategories = numLowUnicodeChars+numSpecificUnicodeChars*2
+ let unicodeCategory = System.Globalization.CharUnicodeInfo.GetUnicodeCategory(inp)
+ //System.Console.WriteLine("inp = {0}, unicodeCategory = {1}", [| box inp; box unicodeCategory |]);
+ int trans.[state].[baseForUnicodeCategories + int32 unicodeCategory]
+ else
+ // This is the specific unicode character
+ let c = char (int trans.[state].[baseForSpecificUnicodeChars+i*2])
+ //System.Console.WriteLine("c = {0}, inp = {1}, i = {2}", [| box c; box inp; box i |]);
+ // OK, have we found the entry for a specific unicode character?
+ if c = inp
+ then int trans.[state].[baseForSpecificUnicodeChars+i*2+1]
+ else loop(i+1)
+
+ loop 0
+ let eofPos = numLowUnicodeChars + 2*numSpecificUnicodeChars + numUnicodeCategories
+
+ let rec scanUntilSentinel(lexBuffer,state) =
+ // Return an endOfScan after consuming the input
+ let a = int accept.[state]
+ if a <> sentinel then
+ onAccept(lexBuffer,a)
+
+ if lexBuffer.BufferScanLength = lexBuffer.BufferMaxScanLength then
+ lexBuffer.DiscardInput();
+ lexBuffer.RefillBuffer ();
+ // end of file occurs if we couldn't extend the buffer
+ afterRefill (trans,sentinel,lexBuffer,scanUntilSentinel,lexBuffer.EndOfScan,state,eofPos)
+ else
+ // read a character - end the scan if there are no further transitions
+ let inp = lexBuffer.Buffer.[lexBuffer.BufferScanPos]
+
+ // Find the new state
+ let snew = lookupUnicodeCharacters (state,inp)
+
+ if snew = sentinel then
+ lexBuffer.EndOfScan()
+ else
+ lexBuffer.BufferScanLength <- lexBuffer.BufferScanLength + 1;
+ // Printf.printf "state %d --> %d on '%c' (%d)\n" s snew (char inp) inp;
+ scanUntilSentinel(lexBuffer,snew)
+
+ // Each row for the Unicode table has format
+ // 128 entries for ASCII characters
+ // A variable number of 2*UInt16 entries for SpecificUnicodeChars
+ // 30 entries, one for each UnicodeCategory
+ // 1 entry for EOF
+
+ member tables.Interpret(initialState,lexBuffer : LexBuffer) =
+ startInterpret(lexBuffer)
+ scanUntilSentinel(lexBuffer, initialState)
+
+ member tables.AsyncInterpret(initialState,lexBuffer : LexBuffer) =
+
+ let rec scanUntilSentinel(lexBuffer, state) =
+ async {
+ // Return an endOfScan after consuming the input
+ let a = int accept.[state]
+ if a <> sentinel then
+ onAccept(lexBuffer,a)
+
+ if lexBuffer.BufferScanLength = lexBuffer.BufferMaxScanLength then
+ lexBuffer.DiscardInput();
+ lexBuffer.RefillBuffer ();
+ // end of file occurs if we couldn't extend the buffer
+ return! afterRefill (trans,sentinel,lexBuffer,scanUntilSentinel,endOfScan,state,eofPos)
+ else
+ // read a character - end the scan if there are no further transitions
+ let inp = lexBuffer.Buffer.[lexBuffer.BufferScanPos]
+
+ // Find the new state
+ let snew = lookupUnicodeCharacters (state,inp)
+
+ if snew = sentinel then
+ return! endOfScan()
+ else
+ lexBuffer.BufferScanLength <- lexBuffer.BufferScanLength + 1;
+ return! scanUntilSentinel(lexBuffer, snew)
+ }
+ and endOfScan() =
+ async { return lexBuffer.EndOfScan() }
+ startInterpret(lexBuffer)
+ scanUntilSentinel(lexBuffer, initialState)
+
+ static member Create(trans,accept) = new UnicodeTables(trans,accept)
diff --git a/src/buildtools/fsyacc/Lexing.fsi b/src/buildtools/fsyacc/Lexing.fsi
new file mode 100644
index 0000000000..e31ad411aa
--- /dev/null
+++ b/src/buildtools/fsyacc/Lexing.fsi
@@ -0,0 +1,151 @@
+//==========================================================================
+// LexBuffers are for use with automatically generated lexical analyzers,
+// in particular those produced by 'fslex'.
+//
+// (c) Microsoft Corporation 2005-2008.
+//===========================================================================
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+namespace Internal.Utilities.Text.Lexing
+#else
+namespace Microsoft.FSharp.Text.Lexing
+#endif
+
+open System.Collections.Generic
+
+/// Position information stored for lexing tokens
+//
+// Note: this is an OCaml compat record type.
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal Position =
+#else
+type Position =
+#endif
+ { /// The file name for the position
+ pos_fname: string;
+ /// The line number for the position
+ pos_lnum: int;
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ /// The line number for the position in the original source file
+ pos_orig_lnum : int;
+#endif
+ /// The absolute offset of the beginning of the line
+ pos_bol: int;
+ /// The absolute offset of the column for the position
+ pos_cnum: int; }
+ /// The file name associated with the input stream.
+ member FileName : string
+ /// The line number in the input stream, assuming fresh positions have been updated
+ /// using AsNewLinePos() and by modifying the EndPos property of the LexBuffer.
+ member Line : int
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+ /// The line number for the position in the input stream, assuming fresh positions have been updated
+ /// using AsNewLinePos()
+ member OriginalLine : int
+#endif
+ []
+ member Char : int
+ /// The character number in the input stream
+ member AbsoluteOffset : int
+ /// Return absolute offset of the start of the line marked by the position
+ member StartOfLineAbsoluteOffset : int
+ /// Return the column number marked by the position, i.e. the difference between the AbsoluteOffset and the StartOfLineAbsoluteOffset
+ member Column : int
+ // Given a position just beyond the end of a line, return a position at the start of the next line
+ member NextLine : Position
+
+ /// Given a position at the start of a token of length n, return a position just beyond the end of the token
+ member EndOfToken: n:int -> Position
+ /// Gives a position shifted by specified number of characters
+ member ShiftColumnBy: by:int -> Position
+
+ []
+ member AsNewLinePos : unit -> Position
+
+ /// Get an arbitrary position, with the empty string as filename, and
+ static member Empty : Position
+
+ /// Get a position corresponding to the first line (line number 1) in a given file
+ static member FirstLine : filename:string -> Position
+
+[]
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal LexBuffer<'char> =
+#else
+/// Input buffers consumed by lexers generated by fslex.exe
+type LexBuffer<'char> =
+#endif
+ /// The start position for the lexeme
+ member StartPos: Position with get,set
+ /// The end position for the lexeme
+ member EndPos: Position with get,set
+ /// The matched string
+ member Lexeme: 'char array
+
+ /// Fast helper to turn the matched characters into a string, avoiding an intermediate array
+ static member LexemeString : LexBuffer -> string
+
+ /// The length of the matched string
+ member LexemeLength: int
+ /// Fetch a particular character in the matched string
+ member LexemeChar: int -> 'char
+
+ /// Dynamically typed, non-lexically scoped parameter table
+ member BufferLocalStore : IDictionary
+
+ /// True if the refill of the buffer ever failed , or if explicitly set to true.
+ member IsPastEndOfStream: bool with get,set
+ /// Remove all input, though don't discard the current lexeme
+ member DiscardInput: unit -> unit
+
+ /// Create a lex buffer suitable for byte lexing that reads characters from the given array
+ static member FromBytes: byte[] -> LexBuffer
+ /// Create a lex buffer suitable for Unicode lexing that reads characters from the given array
+ static member FromChars: char[] -> LexBuffer
+ /// Create a lex buffer suitable for Unicode lexing that reads characters from the given string
+ static member FromString: string -> LexBuffer
+ /// Create a lex buffer that reads character or byte inputs by using the given function
+ static member FromFunction: ('char[] * int * int -> int) -> LexBuffer<'char>
+ /// Create a lex buffer that asynchronously reads character or byte inputs by using the given function
+ static member FromAsyncFunction: ('char[] * int * int -> Async) -> LexBuffer<'char>
+
+
+ [.FromFunction instead")>]
+ static member FromCharFunction: (char[] -> int -> int) -> LexBuffer
+ [.FromFunction instead")>]
+ static member FromByteFunction: (byte[] -> int -> int) -> LexBuffer
+
+ /// Create a lex buffer suitable for use with a Unicode lexer that reads character inputs from the given text reader
+ static member FromTextReader: System.IO.TextReader -> LexBuffer
+ /// Create a lex buffer suitable for use with ASCII byte lexing that reads byte inputs from the given binary reader
+ static member FromBinaryReader: System.IO.BinaryReader -> LexBuffer
+
+
+/// The type of tables for an ascii lexer generated by fslex.
+[]
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal AsciiTables =
+#else
+type AsciiTables =
+#endif
+ static member Create : uint16[] array * uint16[] -> AsciiTables
+ /// Interpret tables for an ascii lexer generated by fslex.
+ member Interpret: initialState:int * LexBuffer -> int
+ /// Interpret tables for an ascii lexer generated by fslex, processing input asynchronously
+ member AsyncInterpret: initialState:int * LexBuffer -> Async
+
+
+/// The type of tables for an unicode lexer generated by fslex.
+[]
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal UnicodeTables =
+#else
+type UnicodeTables =
+#endif
+ static member Create : uint16[] array * uint16[] -> UnicodeTables
+ /// Interpret tables for a unicode lexer generated by fslex.
+ member Interpret: initialState:int * LexBuffer -> int
+
+ /// Interpret tables for a unicode lexer generated by fslex, processing input asynchronously
+ member AsyncInterpret: initialState:int * LexBuffer -> Async
+
diff --git a/src/buildtools/fsyacc/Parsing.fs b/src/buildtools/fsyacc/Parsing.fs
new file mode 100644
index 0000000000..01dccfb610
--- /dev/null
+++ b/src/buildtools/fsyacc/Parsing.fs
@@ -0,0 +1,514 @@
+// (c) Microsoft Corporation 2005-2009.
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+
+namespace Internal.Utilities.Text.Parsing
+open Internal.Utilities
+open Internal.Utilities.Text.Lexing
+
+#else
+namespace Microsoft.FSharp.Text.Parsing
+open Microsoft.FSharp.Text.Lexing
+#endif
+
+
+
+open System
+open System.Collections.Generic
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal IParseState =
+#else
+type IParseState =
+#endif
+ abstract InputRange: int -> Position * Position
+ abstract InputEndPosition: int -> Position
+ abstract InputStartPosition: int -> Position
+ abstract ResultRange: Position * Position
+ abstract GetInput: int -> obj
+ abstract ParserLocalStore : IDictionary
+ abstract RaiseError<'b> : unit -> 'b
+
+//-------------------------------------------------------------------------
+// This context is passed to the error reporter when a syntax error occurs
+
+[]
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal ParseErrorContext<'tok>
+#else
+type ParseErrorContext<'tok>
+#endif
+ (//lexbuf: LexBuffer<_>,
+ stateStack:int list,
+ parseState: IParseState,
+ reduceTokens: int list,
+ currentToken: 'tok option,
+ reducibleProductions: int list list,
+ shiftableTokens: int list ,
+ message : string) =
+ //member x.LexBuffer = lexbuf
+ member x.StateStack = stateStack
+ member x.ReduceTokens = reduceTokens
+ member x.CurrentToken = currentToken
+ member x.ParseState = parseState
+ member x.ReducibleProductions = reducibleProductions
+ member x.ShiftTokens = shiftableTokens
+ member x.Message = message
+
+
+//-------------------------------------------------------------------------
+// This is the data structure emitted as code by FSYACC.
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal Tables<'tok> =
+#else
+type Tables<'tok> =
+#endif
+ { reductions: (IParseState -> obj) array;
+ endOfInputTag: int;
+ tagOfToken: 'tok -> int;
+ dataOfToken: 'tok -> obj;
+ actionTableElements: uint16[];
+ actionTableRowOffsets: uint16[];
+ reductionSymbolCounts: uint16[];
+ immediateActions: uint16[];
+ gotos: uint16[];
+ sparseGotoTableRowOffsets: uint16[];
+ stateToProdIdxsTableElements: uint16[];
+ stateToProdIdxsTableRowOffsets: uint16[];
+ productionToNonTerminalTable: uint16[];
+ /// For fsyacc.exe, this entry is filled in by context from the generated parser file. If no 'parse_error' function
+ /// is defined by the user then ParseHelpers.parse_error is used by default (ParseHelpers is opened
+ /// at the top of the generated parser file)
+ parseError: ParseErrorContext<'tok> -> unit;
+ numTerminals: int;
+ tagOfErrorTerminal: int }
+
+//-------------------------------------------------------------------------
+// An implementation of stacks.
+
+// This type is in System.dll so for the moment we can't use it in FSharp.Core.dll
+//type Stack<'a> = System.Collections.Generic.Stack<'a>
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type Stack<'a>(n) =
+#else
+type internal Stack<'a>(n) =
+#endif
+ let mutable contents = Array.zeroCreate<'a>(n)
+ let mutable count = 0
+
+ member buf.Ensure newSize =
+ let oldSize = Array.length contents
+ if newSize > oldSize then
+ let old = contents
+ contents <- Array.zeroCreate (max newSize (oldSize * 2));
+ Array.blit old 0 contents 0 count;
+
+ member buf.Count = count
+ member buf.Pop() = count <- count - 1
+ member buf.Peep() = contents.[count - 1]
+ member buf.Top(n) = [ for x in contents.[max 0 (count-n)..count - 1] -> x ] |> List.rev
+ member buf.Push(x) =
+ buf.Ensure(count + 1);
+ contents.[count] <- x;
+ count <- count + 1
+
+ member buf.IsEmpty = (count = 0)
+#if __DEBUG
+ member buf.PrintStack() =
+ for i = 0 to (count - 1) do
+#if FX_NO_CONSOLE
+ ()
+#else
+ System.Console.Write("{0}{1}",(contents.[i]),if i=count-1 then ":" else "-")
+#endif
+#endif
+exception RecoverableParseError
+exception Accept of obj
+
+#if __DEBUG
+module Flags =
+ let mutable debug = false
+#endif
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+module internal Implementation =
+#else
+module Implementation =
+#endif
+
+ // Definitions shared with fsyacc
+ let anyMarker = 0xffff
+ let shiftFlag = 0x0000
+ let reduceFlag = 0x4000
+ let errorFlag = 0x8000
+ let acceptFlag = 0xc000
+ let actionMask = 0xc000
+
+ let actionValue action = action &&& (~~~ actionMask)
+ let actionKind action = action &&& actionMask
+
+ //-------------------------------------------------------------------------
+ // Read the tables written by FSYACC.
+
+ type AssocTable(elemTab:uint16[], offsetTab:uint16[]) =
+ let cache = new Dictionary<_,_>(2000)
+
+ member t.readAssoc (minElemNum,maxElemNum,defaultValueOfAssoc,keyToFind) =
+ // do a binary chop on the table
+ let elemNumber : int = (minElemNum+maxElemNum)/2
+ if elemNumber = maxElemNum
+ then defaultValueOfAssoc
+ else
+ let x = int elemTab.[elemNumber*2]
+ if keyToFind = x then
+ int elemTab.[elemNumber*2+1]
+ elif keyToFind < x then t.readAssoc (minElemNum ,elemNumber,defaultValueOfAssoc,keyToFind)
+ else t.readAssoc (elemNumber+1,maxElemNum,defaultValueOfAssoc,keyToFind)
+
+ member t.Read(rowNumber ,keyToFind) =
+
+ // First check the sparse lookaside table
+ // Performance note: without this lookaside table the binary chop in readAssoc
+ // takes up around 10% of of parsing time
+ // for parsing intensive samples such as the bootstrapped F# compiler.
+ //
+ // Note: using a .NET Dictionary for this int -> int table looks like it could be sub-optimal.
+ // Some other better sparse lookup table may be better.
+ let mutable res = 0
+ let cacheKey = (rowNumber <<< 16) ||| keyToFind
+ let ok = cache.TryGetValue(cacheKey, &res)
+ if ok then res
+ else
+ let headOfTable = int offsetTab.[rowNumber]
+ let firstElemNumber = headOfTable + 1
+ let numberOfElementsInAssoc = int elemTab.[headOfTable*2]
+ let defaultValueOfAssoc = int elemTab.[headOfTable*2+1]
+ let res = t.readAssoc (firstElemNumber,(firstElemNumber+numberOfElementsInAssoc),defaultValueOfAssoc,keyToFind)
+ cache.[cacheKey] <- res
+ res
+
+ // Read all entries in the association table
+ // Used during error recovery to find all valid entries in the table
+ member x.ReadAll(n) =
+ let headOfTable = int offsetTab.[n]
+ let firstElemNumber = headOfTable + 1
+ let numberOfElementsInAssoc = int32 elemTab.[headOfTable*2]
+ let defaultValueOfAssoc = int elemTab.[headOfTable*2+1]
+ [ for i in firstElemNumber .. (firstElemNumber+numberOfElementsInAssoc-1) ->
+ (int elemTab.[i*2], int elemTab.[i*2+1]) ], defaultValueOfAssoc
+
+ type IdxToIdxListTable(elemTab:uint16[], offsetTab:uint16[]) =
+
+ // Read all entries in a row of the table
+ member x.ReadAll(n) =
+ let headOfTable = int offsetTab.[n]
+ let firstElemNumber = headOfTable + 1
+ let numberOfElements = int32 elemTab.[headOfTable]
+ [ for i in firstElemNumber .. (firstElemNumber+numberOfElements-1) -> int elemTab.[i] ]
+
+ //-------------------------------------------------------------------------
+ // interpret the tables emitted by FSYACC.
+
+ []
+ []
+ type ValueInfo =
+ val value: obj
+ val startPos: Position
+ val endPos: Position
+ new(value,startPos,endPos) = { value=value; startPos=startPos;endPos=endPos }
+
+ let interpret (tables: Tables<'tok>) lexer (lexbuf : LexBuffer<_>) initialState =
+ let localStore = new Dictionary() in
+ localStore.["LexBuffer"] <- lexbuf;
+#if __DEBUG
+ if Flags.debug then System.Console.WriteLine("\nParser: interpret tables");
+#endif
+ let stateStack : Stack = new Stack<_>(100)
+ stateStack.Push(initialState);
+ let valueStack = new Stack(100)
+ let mutable haveLookahead = false
+ let mutable lookaheadToken = Unchecked.defaultof<'tok>
+ let mutable lookaheadEndPos = Unchecked.defaultof
+ let mutable lookaheadStartPos = Unchecked.defaultof
+ let mutable finished = false
+ // After an error occurs, we suppress errors until we've shifted three tokens in a row.
+ let mutable errorSuppressionCountDown = 0
+
+ // When we hit the end-of-file we don't fail straight away but rather keep permitting shift
+ // and reduce against the last token in the token stream 20 times or until we've accepted
+ // or exhausted the stack. This allows error recovery rules of the form
+ // input : realInput EOF | realInput error EOF | error EOF
+ // where consuming one EOF to trigger an error doesn't result in overall parse failure
+ // catastrophe and the loss of intermediate results.
+ //
+ let mutable inEofCountDown = false
+ let mutable eofCountDown = 20 // Number of EOFs to supply at the end for error recovery
+ // The 100 here means a maximum of 100 elements for each rule
+ let ruleStartPoss = (Array.zeroCreate 100 : Position array)
+ let ruleEndPoss = (Array.zeroCreate 100 : Position array)
+ let ruleValues = (Array.zeroCreate 100 : obj array)
+ let lhsPos = (Array.zeroCreate 2 : Position array)
+ let reductions = tables.reductions
+ let actionTable = new AssocTable(tables.actionTableElements, tables.actionTableRowOffsets)
+ let gotoTable = new AssocTable(tables.gotos, tables.sparseGotoTableRowOffsets)
+ let stateToProdIdxsTable = new IdxToIdxListTable(tables.stateToProdIdxsTableElements, tables.stateToProdIdxsTableRowOffsets)
+
+ let parseState =
+ { new IParseState with
+ member p.InputRange(n) = ruleStartPoss.[n-1], ruleEndPoss.[n-1];
+ member p.InputStartPosition(n) = ruleStartPoss.[n-1]
+ member p.InputEndPosition(n) = ruleEndPoss.[n-1];
+ member p.GetInput(n) = ruleValues.[n-1];
+ member p.ResultRange = (lhsPos.[0], lhsPos.[1]);
+ member p.ParserLocalStore = (localStore :> IDictionary<_,_>);
+ member p.RaiseError() = raise RecoverableParseError (* NOTE: this binding tests the fairly complex logic associated with an object expression implementing a generic abstract method *)
+ }
+
+#if __DEBUG
+ let report haveLookahead lookaheadToken =
+ if haveLookahead then sprintf "%A" lookaheadToken
+ else "[TBC]"
+#endif
+
+ // Pop the stack until we can shift the 'error' token. If 'tokenOpt' is given
+ // then keep popping until we can shift both the 'error' token and the token in 'tokenOpt'.
+ // This is used at end-of-file to make sure we can shift both the 'error' token and the 'EOF' token.
+ let rec popStackUntilErrorShifted(tokenOpt) =
+ // Keep popping the stack until the "error" terminal is shifted
+#if __DEBUG
+ if Flags.debug then System.Console.WriteLine("popStackUntilErrorShifted");
+#endif
+ if stateStack.IsEmpty then
+#if __DEBUG
+ if Flags.debug then
+ System.Console.WriteLine("state stack empty during error recovery - generating parse error");
+#endif
+ failwith "parse error";
+
+ let currState = stateStack.Peep()
+#if __DEBUG
+ if Flags.debug then
+ System.Console.WriteLine("In state {0} during error recovery", currState);
+#endif
+
+ let action = actionTable.Read(currState, tables.tagOfErrorTerminal)
+
+ if actionKind action = shiftFlag &&
+ (match tokenOpt with
+ | None -> true
+ | Some(token) ->
+ let nextState = actionValue action
+ actionKind (actionTable.Read(nextState, tables.tagOfToken(token))) = shiftFlag) then
+
+#if __DEBUG
+ if Flags.debug then System.Console.WriteLine("shifting error, continuing with error recovery");
+#endif
+ let nextState = actionValue action
+ // The "error" non terminal needs position information, though it tends to be unreliable.
+ // Use the StartPos/EndPos from the lex buffer
+ valueStack.Push(ValueInfo(box (), lexbuf.StartPos, lexbuf.EndPos));
+ stateStack.Push(nextState)
+ else
+ if valueStack.IsEmpty then
+ failwith "parse error";
+#if __DEBUG
+ if Flags.debug then
+ System.Console.WriteLine("popping stack during error recovery");
+#endif
+ valueStack.Pop();
+ stateStack.Pop();
+ popStackUntilErrorShifted(tokenOpt)
+
+ while not finished do
+ if stateStack.IsEmpty then
+ finished <- true
+ else
+ let state = stateStack.Peep()
+#if __DEBUG
+ if Flags.debug then (Console.Write("{0} value(state), state ",valueStack.Count); stateStack.PrintStack())
+#endif
+ let action =
+ let immediateAction = int tables.immediateActions.[state]
+ if not (immediateAction = anyMarker) then
+ // Action has been pre-determined, no need to lookahead
+ // Expecting it to be a Reduce action on a non-fakeStartNonTerminal ?
+ immediateAction
+ else
+ // Lookahead required to determine action
+ if not haveLookahead then
+ if lexbuf.IsPastEndOfStream then
+ // When the input runs out, keep supplying the last token for eofCountDown times
+ if eofCountDown>0 then
+ haveLookahead <- true
+ eofCountDown <- eofCountDown - 1
+ inEofCountDown <- true
+ else
+ haveLookahead <- false
+ else
+ lookaheadToken <- lexer lexbuf
+ lookaheadStartPos <- lexbuf.StartPos
+ lookaheadEndPos <- lexbuf.EndPos
+ haveLookahead <- true;
+
+ let tag =
+ if haveLookahead then tables.tagOfToken lookaheadToken
+ else tables.endOfInputTag
+
+ // Printf.printf "state %d\n" state
+ actionTable.Read(state,tag)
+
+ let kind = actionKind action
+ if kind = shiftFlag then (
+ if errorSuppressionCountDown > 0 then
+ errorSuppressionCountDown <- errorSuppressionCountDown - 1;
+#if __DEBUG
+ if Flags.debug then Console.WriteLine("shifting, reduced errorRecoverylevel to {0}\n", errorSuppressionCountDown);
+#endif
+ let nextState = actionValue action
+ if not haveLookahead then failwith "shift on end of input!";
+ let data = tables.dataOfToken lookaheadToken
+ valueStack.Push(ValueInfo(data, lookaheadStartPos, lookaheadEndPos));
+ stateStack.Push(nextState);
+#if __DEBUG
+ if Flags.debug then Console.WriteLine("shift/consume input {0}, shift to state {1}", report haveLookahead lookaheadToken, nextState);
+#endif
+ haveLookahead <- false
+
+ ) elif kind = reduceFlag then
+ let prod = actionValue action
+ let reduction = reductions.[prod]
+ let n = int tables.reductionSymbolCounts.[prod]
+ // pop the symbols, populate the values and populate the locations
+#if __DEBUG
+ if Flags.debug then Console.Write("reduce popping {0} values/states, lookahead {1}", n, report haveLookahead lookaheadToken);
+#endif
+
+ lhsPos.[0] <- Position.Empty;
+ lhsPos.[1] <- Position.Empty;
+ for i = 0 to n - 1 do
+ if valueStack.IsEmpty then failwith "empty symbol stack";
+ let topVal = valueStack.Peep()
+ valueStack.Pop();
+ stateStack.Pop();
+ ruleValues.[(n-i)-1] <- topVal.value;
+ ruleStartPoss.[(n-i)-1] <- topVal.startPos;
+ ruleEndPoss.[(n-i)-1] <- topVal.endPos;
+ if lhsPos.[1] = Position.Empty then lhsPos.[1] <- topVal.endPos;
+ if not (topVal.startPos = Position.Empty) then lhsPos.[0] <- topVal.startPos
+ done;
+
+ try
+ // Printf.printf "reduce %d\n" prod;
+ let redResult = reduction parseState
+ valueStack.Push(ValueInfo(redResult, lhsPos.[0], lhsPos.[1]));
+ let currState = stateStack.Peep()
+ let newGotoState = gotoTable.Read(int tables.productionToNonTerminalTable.[prod], currState)
+ stateStack.Push(newGotoState)
+#if __DEBUG
+ if Flags.debug then Console.WriteLine(" goto state {0}", newGotoState)
+#endif
+ with
+ | Accept res ->
+ finished <- true;
+ valueStack.Push(ValueInfo(res, lhsPos.[0], lhsPos.[1]))
+ | RecoverableParseError ->
+#if __DEBUG
+ if Flags.debug then Console.WriteLine("RecoverableParseErrorException...\n");
+#endif
+ popStackUntilErrorShifted(None);
+ // User code raised a Parse_error. Don't report errors again until three tokens have been shifted
+ errorSuppressionCountDown <- 3
+ elif kind = errorFlag then (
+#if __DEBUG
+ if Flags.debug then Console.Write("ErrorFlag... ");
+#endif
+ // Silently discard inputs and don't report errors
+ // until three tokens in a row have been shifted
+#if __DEBUG
+ if Flags.debug then printfn "error on token '%A' " (if haveLookahead then Some(lookaheadToken) else None);
+#endif
+ if errorSuppressionCountDown > 0 then
+ // If we're in the end-of-file count down then we're very keen to 'Accept'.
+ // We can only do this by repeatedly popping the stack until we can shift both an 'error' token
+ // and an EOF token.
+ if inEofCountDown && eofCountDown < 10 then
+#if __DEBUG
+ if Flags.debug then printfn "poppin stack, lokking to shift both 'error' and that token, during end-of-file error recovery" ;
+#endif
+ popStackUntilErrorShifted(if haveLookahead then Some(lookaheadToken) else None);
+
+ // If we don't haveLookahead then the end-of-file count down is over and we have no further options.
+ if not haveLookahead then
+ failwith "parse error: unexpected end of file"
+
+#if __DEBUG
+ if Flags.debug then printfn "discarding token '%A' during error suppression" (if haveLookahead then Some(lookaheadToken) else None);
+#endif
+ // Discard the token
+ haveLookahead <- false
+ // Try again to shift three tokens
+ errorSuppressionCountDown <- 3
+ else (
+
+ let currentToken = if haveLookahead then Some(lookaheadToken) else None
+ let actions,defaultAction = actionTable.ReadAll(state)
+ let explicit = Set.ofList [ for (tag,_action) in actions -> tag ]
+
+ let shiftableTokens =
+ [ for (tag,action) in actions do
+ if (actionKind action) = shiftFlag then
+ yield tag
+ if actionKind defaultAction = shiftFlag then
+ for tag in 0 .. tables.numTerminals-1 do
+ if not (explicit.Contains(tag)) then
+ yield tag ] in
+
+ let stateStack = stateStack.Top(12) in
+ let reducibleProductions =
+ [ for state in stateStack do
+ yield stateToProdIdxsTable.ReadAll(state) ]
+
+ let reduceTokens =
+ [ for (tag,action) in actions do
+ if actionKind(action) = reduceFlag then
+ yield tag
+ if actionKind(defaultAction) = reduceFlag then
+ for tag in 0 .. tables.numTerminals-1 do
+ if not (explicit.Contains(tag)) then
+ yield tag ] in
+ //let activeRules = stateStack |> List.iter (fun state ->
+ let errorContext = new ParseErrorContext<'tok>(stateStack,parseState, reduceTokens,currentToken,reducibleProductions, shiftableTokens, "syntax error")
+ tables.parseError(errorContext);
+ popStackUntilErrorShifted(None);
+ errorSuppressionCountDown <- 3;
+#if __DEBUG
+ if Flags.debug then System.Console.WriteLine("generated syntax error and shifted error token, haveLookahead = {0}\n", haveLookahead);
+#endif
+ )
+ ) elif kind = acceptFlag then
+ finished <- true
+#if __DEBUG
+ else
+ if Flags.debug then System.Console.WriteLine("ALARM!!! drop through case in parser");
+#endif
+ done;
+ // OK, we're done - read off the overall generated value
+ valueStack.Peep().value
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal Tables<'tok> with
+#else
+type Tables<'tok> with
+#endif
+ member tables.Interpret (lexer,lexbuf,initialState) =
+ Implementation.interpret tables lexer lexbuf initialState
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+module internal ParseHelpers =
+#else
+module ParseHelpers =
+#endif
+ let parse_error (_s:string) = ()
+ let parse_error_rich = (None : (ParseErrorContext<_> -> unit) option)
diff --git a/src/buildtools/fsyacc/Parsing.fsi b/src/buildtools/fsyacc/Parsing.fsi
new file mode 100644
index 0000000000..2fef45975a
--- /dev/null
+++ b/src/buildtools/fsyacc/Parsing.fsi
@@ -0,0 +1,130 @@
+//==========================================================================
+// (c) Microsoft Corporation 2005-2009.
+//=========================================================================
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+namespace Internal.Utilities.Text.Parsing
+open Internal.Utilities
+open Internal.Utilities.Text.Lexing
+#else
+namespace Microsoft.FSharp.Text.Parsing
+open Microsoft.FSharp.Text.Lexing
+#endif
+
+open System.Collections.Generic
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal IParseState =
+#else
+/// The information accessible via the parseState value within parser actions.
+type IParseState =
+#endif
+ /// Get the start and end position for the terminal or non-terminal at a given index matched by the production
+ abstract InputRange: index:int -> Position * Position
+ /// Get the end position for the terminal or non-terminal at a given index matched by the production
+ abstract InputEndPosition: int -> Position
+ /// Get the start position for the terminal or non-terminal at a given index matched by the production
+ abstract InputStartPosition: int -> Position
+ /// Get the full range of positions matched by the production
+ abstract ResultRange: Position * Position
+ /// Get the value produced by the terminal or non-terminal at the given position
+ abstract GetInput : int -> obj
+ /// Get the store of local values associated with this parser
+ // Dynamically typed, non-lexically scoped local store
+ abstract ParserLocalStore : IDictionary
+ /// Raise an error in this parse context
+ abstract RaiseError<'b> : unit -> 'b
+
+
+[]
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal ParseErrorContext<'tok> =
+#else
+/// The context provided when a parse error occurs
+type ParseErrorContext<'tok> =
+#endif
+ /// The stack of state indexes active at the parse error
+ member StateStack : int list
+ /// The state active at the parse error
+ member ParseState : IParseState
+ /// The tokens that would cause a reduction at the parse error
+ member ReduceTokens: int list
+ /// The stack of productions that would be reduced at the parse error
+ member ReducibleProductions : int list list
+ /// The token that caused the parse error
+ member CurrentToken : 'tok option
+ /// The token that would cause a shift at the parse error
+ member ShiftTokens : int list
+ /// The message associated with the parse error
+ member Message : string
+
+/// Tables generated by fsyacc
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+type internal Tables<'tok> =
+#else
+/// The type of the tables contained in a file produced by the fsyacc.exe parser generator.
+type Tables<'tok> =
+#endif
+ { /// The reduction table
+ reductions: (IParseState -> obj) array ;
+ /// The token number indicating the end of input
+ endOfInputTag: int;
+ /// A function to compute the tag of a token
+ tagOfToken: 'tok -> int;
+ /// A function to compute the data carried by a token
+ dataOfToken: 'tok -> obj;
+ /// The sparse action table elements
+ actionTableElements: uint16[];
+ /// The sparse action table row offsets
+ actionTableRowOffsets: uint16[];
+ /// The number of symbols for each reduction
+ reductionSymbolCounts: uint16[];
+ /// The immediate action table
+ immediateActions: uint16[];
+ /// The sparse goto table
+ gotos: uint16[];
+ /// The sparse goto table row offsets
+ sparseGotoTableRowOffsets: uint16[];
+ /// The sparse table for the productions active for each state
+ stateToProdIdxsTableElements: uint16[];
+ /// The sparse table offsets for the productions active for each state
+ stateToProdIdxsTableRowOffsets: uint16[];
+ /// This table is logically part of the Goto table
+ productionToNonTerminalTable: uint16[];
+ /// This function is used to hold the user specified "parse_error" or "parse_error_rich" functions
+ parseError: ParseErrorContext<'tok> -> unit;
+ /// The total number of terminals
+ numTerminals: int;
+ /// The tag of the error terminal
+ tagOfErrorTerminal: int }
+
+ /// Interpret the parser table taking input from the given lexer, using the given lex buffer, and the given start state.
+ /// Returns an object indicating the final synthesized value for the parse.
+ member Interpret : lexer:(LexBuffer<'char> -> 'tok) * lexbuf:LexBuffer<'char> * startState:int -> obj
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+exception internal Accept of obj
+exception internal RecoverableParseError
+#else
+/// Indicates an accept action has occured
+exception Accept of obj
+/// Indicates a parse error has occured and parse recovery is in progress
+exception RecoverableParseError
+#endif
+
+#if __DEBUG
+module internal Flags =
+ val mutable debug : bool
+#endif
+
+#if INTERNALIZED_FSLEXYACC_RUNTIME
+module internal ParseHelpers =
+#else
+/// Helpers used by generated parsers.
+module ParseHelpers =
+#endif
+ /// The default implementation of the parse_error_rich function
+ val parse_error_rich: (ParseErrorContext<'tok> -> unit) option
+ /// The default implementation of the parse_error function
+ val parse_error: string -> unit
+
diff --git a/src/buildtools/fsyacc/fsyacc.fs b/src/buildtools/fsyacc/fsyacc.fs
new file mode 100644
index 0000000000..185ff33232
--- /dev/null
+++ b/src/buildtools/fsyacc/fsyacc.fs
@@ -0,0 +1,533 @@
+(* (c) Microsoft Corporation 2005-2008. *)
+
+module internal FsLexYacc.FsYacc.Driver
+
+open System.IO
+open System.Collections.Generic
+open Printf
+open Internal.Utilities
+open Internal.Utilities.Text.Lexing
+
+open FsLexYacc.FsYacc
+open FsLexYacc.FsYacc.AST
+
+//------------------------------------------------------------------
+// This code is duplicated from Microsoft.FSharp.Compiler.UnicodeLexing
+
+type Lexbuf = LexBuffer
+
+/// Standard utility to create a Unicode LexBuffer
+///
+/// One small annoyance is that LexBuffers and not IDisposable. This means
+/// we can't just return the LexBuffer object, since the file it wraps wouldn't
+/// get closed when we're finished with the LexBuffer. Hence we return the stream,
+/// the reader and the LexBuffer. The caller should dispose the first two when done.
+let UnicodeFileAsLexbuf (filename,codePage : int option) : FileStream * StreamReader * Lexbuf =
+ // Use the .NET functionality to auto-detect the unicode encoding
+ // It also uses Lexing.from_text_reader to present the bytes read to the lexer in UTF8 decoded form
+ let stream = new FileStream(filename,FileMode.Open,FileAccess.Read,FileShare.Read)
+ let reader =
+ match codePage with
+ | None -> new StreamReader(stream,true)
+ | Some n -> new StreamReader(stream,System.Text.Encoding.GetEncoding(n))
+ let lexbuf = LexBuffer.FromFunction(reader.Read)
+ lexbuf.EndPos <- Position.FirstLine(filename);
+ stream, reader, lexbuf
+
+//------------------------------------------------------------------
+// This is the program proper
+
+let input = ref None
+let modname= ref None
+let internal_module = ref false
+let opens= ref []
+let out = ref None
+let tokenize = ref false
+let compat = ref false
+let log = ref false
+let light = ref None
+let inputCodePage = ref None
+let mutable lexlib = "Microsoft.FSharp.Text.Lexing"
+let mutable parslib = "Microsoft.FSharp.Text.Parsing"
+
+let usage =
+ [ ArgInfo("-o", ArgType.String (fun s -> out := Some s), "Name the output file.");
+ ArgInfo("-v", ArgType.Unit (fun () -> log := true), "Produce a listing file.");
+ ArgInfo("--module", ArgType.String (fun s -> modname := Some s), "Define the F# module name to host the generated parser.");
+ ArgInfo("--internal", ArgType.Unit (fun () -> internal_module := true), "Generate an internal module");
+ ArgInfo("--open", ArgType.String (fun s -> opens := !opens @ [s]), "Add the given module to the list of those to open in both the generated signature and implementation.");
+ ArgInfo("--light", ArgType.Unit (fun () -> light := Some true), "(ignored)");
+ ArgInfo("--light-off", ArgType.Unit (fun () -> light := Some false), "Add #light \"off\" to the top of the generated file");
+ ArgInfo("--ml-compatibility", ArgType.Set compat, "Support the use of the global state from the 'Parsing' module in FSharp.PowerPack.dll.");
+ ArgInfo("--tokens", ArgType.Set tokenize, "Simply tokenize the specification file itself.");
+ ArgInfo("--lexlib", ArgType.String (fun s -> lexlib <- s), "Specify the namespace for the implementation of the lexer (default: Microsoft.FSharp.Text.Lexing)");
+ ArgInfo("--parslib", ArgType.String (fun s -> parslib <- s), "Specify the namespace for the implementation of the parser table interpreter (default: Microsoft.FSharp.Text.Parsing)");
+ ArgInfo("--codepage", ArgType.Int (fun i -> inputCodePage := Some i), "Assume input lexer specification file is encoded with the given codepage."); ]
+
+let _ = ArgParser.Parse(usage,(fun x -> match !input with Some _ -> failwith "more than one input given" | None -> input := Some x),"fsyacc ")
+
+let output_int (os: #TextWriter) (n:int) = os.Write(string n)
+
+let outputCodedUInt16 (os: #TextWriter) (n:int) =
+ os.Write n;
+ os.Write "us; ";
+
+let shiftFlag = 0x0000
+let reduceFlag = 0x4000
+let errorFlag = 0x8000
+let acceptFlag = 0xc000
+let actionMask = 0xc000
+
+let anyMarker = 0xffff
+
+let actionCoding action =
+ match action with
+ | Accept -> acceptFlag
+ | Shift n -> shiftFlag ||| n
+ | Reduce n -> reduceFlag ||| n
+ | Error -> errorFlag
+
+let main() =
+ let filename = (match !input with Some x -> x | None -> failwith "no input given") in
+ let spec =
+ let stream,reader,lexbuf = UnicodeFileAsLexbuf(filename, !inputCodePage)
+ use stream = stream
+ use reader = reader
+
+ try
+ if !tokenize then begin
+ while true do
+ printf "tokenize - getting one token";
+ let t = Lexer.token lexbuf in
+ (*F# printf "tokenize - got %s" (Parser.token_to_string t); F#*)
+ if t = Parser.EOF then exit 0;
+ done;
+ end;
+
+ Parser.spec Lexer.token lexbuf
+ with e ->
+ eprintf "%s(%d,%d): error: %s" filename lexbuf.StartPos.Line lexbuf.StartPos.Column e.Message;
+ exit 1 in
+
+ let has_extension (s:string) =
+ (s.Length >= 1 && s.[s.Length - 1] = '.')
+ || Path.HasExtension(s)
+
+ let chop_extension (s:string) =
+ if not (has_extension s) then invalidArg "s" "the file name does not have an extension"
+ Path.Combine (Path.GetDirectoryName s,Path.GetFileNameWithoutExtension(s))
+
+ let checkSuffix (x:string) (y:string) = x.EndsWith(y)
+
+ let output = match !out with Some x -> x | _ -> chop_extension filename + (if checkSuffix filename ".mly" then ".ml" else ".fs") in
+ let outputi = match !out with Some x -> chop_extension x + (if checkSuffix x ".ml" then ".mli" else ".fsi") | _ -> chop_extension filename + (if checkSuffix filename ".mly" then ".mli" else ".fsi") in
+ let outputo =
+ if !log then Some (match !out with Some x -> chop_extension x + ".fsyacc.output" | _ -> chop_extension filename + ".fsyacc.output")
+ else None
+
+ use os = (File.CreateText output :> TextWriter)
+ use osi = (File.CreateText outputi :> TextWriter)
+
+ let lineCountOutput = ref 0
+ let lineCountSignature = ref 0
+ let cos = (os,lineCountOutput)
+ let cosi = (osi,lineCountSignature)
+ let cprintf (os:TextWriter,lineCount) fmt = Printf.fprintf os fmt
+ let cprintfn (os:TextWriter,lineCount) fmt = Printf.kfprintf (fun () -> incr lineCount; os.WriteLine()) os fmt
+
+ let logf =
+ match outputo with
+ | None -> (fun f -> ())
+ | Some filename ->
+ let oso = (File.CreateText filename :> TextWriter)
+ (fun f -> f oso)
+
+ logf (fun oso -> fprintfn oso " Output file describing compiled parser placed in %s and %s" output outputi);
+
+ printfn " building tables";
+ let spec1 = ProcessParserSpecAst spec
+ let (prods,states, startStates,actionTable,immediateActionTable,gotoTable,endOfInputTerminalIdx,errorTerminalIdx,nonTerminals) =
+ CompilerLalrParserSpec logf spec1
+
+ let (code,pos) = spec.Header
+ printfn " %d states" states.Length;
+ printfn " %d nonterminals" gotoTable.[0].Length;
+ printfn " %d terminals" actionTable.[0].Length;
+ printfn " %d productions" prods.Length;
+ printfn " #rows in action table: %d" actionTable.Length;
+(*
+ printfn "#unique rows in action table: %d" (List.length (Array.foldBack (fun row acc -> insert (Array.to_list row) acc) actionTable []));
+ printfn "maximum #different actions per state: %d" (Array.foldBack (fun row acc ->max (List.length (List.foldBack insert (Array.to_list row) [])) acc) actionTable 0);
+ printfn "average #different actions per state: %d" ((Array.foldBack (fun row acc -> (List.length (List.foldBack insert (Array.to_list row) [])) + acc) actionTable 0) / (Array.length states));
+*)
+
+ cprintfn cos "// Implementation file for parser generated by fsyacc";
+ cprintfn cosi "// Signature file for parser generated by fsyacc";
+
+ if (!light = Some(false)) || (!light = None && checkSuffix output ".ml") then
+ cprintfn cos "#light \"off\"";
+ cprintfn cosi "#light \"off\"";
+
+ match !modname with
+ | None -> ()
+ | Some s ->
+ match !internal_module with
+ | true ->
+ cprintfn cos "module internal %s" s;
+ cprintfn cosi "module internal %s" s;
+ | false ->
+ cprintfn cos "module %s" s;
+ cprintfn cosi "module %s" s;
+
+ cprintfn cos "#nowarn \"64\";; // turn off warnings that type variables used in production annotations are instantiated to concrete type";
+
+ for s in !opens do
+ cprintfn cos "open %s" s;
+ cprintfn cosi "open %s" s;
+
+ cprintfn cos "open %s" lexlib;
+ cprintfn cos "open %s.ParseHelpers" parslib;
+ if !compat then
+ cprintfn cos "open Microsoft.FSharp.Compatibility.OCaml.Parsing";
+
+ cprintfn cos "# %d \"%s\"" pos.pos_lnum pos.pos_fname;
+ cprintfn cos "%s" code;
+ lineCountOutput := !lineCountOutput + code.Replace("\r","").Split([| '\n' |]).Length;
+
+ cprintfn cos "# %d \"%s\"" !lineCountOutput output;
+ // Print the datatype for the tokens
+ cprintfn cos "// This type is the type of tokens accepted by the parser";
+ for out in [cos;cosi] do
+ cprintfn out "type token = ";
+ for id,typ in spec.Tokens do
+ match typ with
+ | None -> cprintfn out " | %s" id
+ | Some ty -> cprintfn out " | %s of (%s)" id ty;
+
+ // Print the datatype for the token names
+ cprintfn cos "// This type is used to give symbolic names to token indexes, useful for error messages";
+ for out in [cos;cosi] do
+ cprintfn out "type tokenId = ";
+ for id,typ in spec.Tokens do
+ cprintfn out " | TOKEN_%s" id;
+ cprintfn out " | TOKEN_end_of_input";
+ cprintfn out " | TOKEN_error";
+
+ cprintfn cos "// This type is used to give symbolic names to token indexes, useful for error messages";
+ for out in [cos;cosi] do
+ cprintfn out "type nonTerminalId = ";
+ for nt in nonTerminals do
+ cprintfn out " | NONTERM_%s" nt;
+
+ cprintfn cos "";
+ cprintfn cos "// This function maps tokens to integer indexes";
+ cprintfn cos "let tagOfToken (t:token) = ";
+ cprintfn cos " match t with";
+ spec.Tokens |> List.iteri (fun i (id,typ) ->
+ cprintfn cos " | %s %s -> %d " id (match typ with Some _ -> "_" | None -> "") i);
+ cprintfn cosi "/// This function maps tokens to integer indexes";
+ cprintfn cosi "val tagOfToken: token -> int";
+
+ cprintfn cos "";
+ cprintfn cos "// This function maps integer indexes to symbolic token ids";
+ cprintfn cos "let tokenTagToTokenId (tokenIdx:int) = ";
+ cprintfn cos " match tokenIdx with";
+ spec.Tokens |> List.iteri (fun i (id,typ) ->
+ cprintfn cos " | %d -> TOKEN_%s " i id)
+ cprintfn cos " | %d -> TOKEN_end_of_input" endOfInputTerminalIdx;
+ cprintfn cos " | %d -> TOKEN_error" errorTerminalIdx;
+ cprintfn cos " | _ -> failwith \"tokenTagToTokenId: bad token\""
+
+ cprintfn cosi "";
+ cprintfn cosi "/// This function maps integer indexes to symbolic token ids";
+ cprintfn cosi "val tokenTagToTokenId: int -> tokenId";
+
+ cprintfn cos "";
+ cprintfn cos "/// This function maps production indexes returned in syntax errors to strings representing the non terminal that would be produced by that production";
+ cprintfn cos "let prodIdxToNonTerminal (prodIdx:int) = ";
+ cprintfn cos " match prodIdx with";
+ prods |> Array.iteri (fun i (nt,ntIdx,syms,code) ->
+ cprintfn cos " | %d -> NONTERM_%s " i nt);
+ cprintfn cos " | _ -> failwith \"prodIdxToNonTerminal: bad production index\""
+
+ cprintfn cosi "";
+ cprintfn cosi "/// This function maps production indexes returned in syntax errors to strings representing the non terminal that would be produced by that production";
+ cprintfn cosi "val prodIdxToNonTerminal: int -> nonTerminalId";
+
+ cprintfn cos "";
+ cprintfn cos "let _fsyacc_endOfInputTag = %d " endOfInputTerminalIdx;
+ cprintfn cos "let _fsyacc_tagOfErrorTerminal = %d" errorTerminalIdx;
+ cprintfn cos "";
+ cprintfn cos "// This function gets the name of a token as a string";
+ cprintfn cos "let token_to_string (t:token) = ";
+ cprintfn cos " match t with ";
+ spec.Tokens |> List.iteri (fun i (id,typ) ->
+ cprintfn cos " | %s %s -> \"%s\" " id (match typ with Some _ -> "_" | None -> "") id);
+
+ cprintfn cosi "";
+ cprintfn cosi "/// This function gets the name of a token as a string";
+ cprintfn cosi "val token_to_string: token -> string";
+
+ cprintfn cos "";
+ cprintfn cos "// This function gets the data carried by a token as an object";
+ cprintfn cos "let _fsyacc_dataOfToken (t:token) = ";
+ cprintfn cos " match t with ";
+
+ for (id,typ) in spec.Tokens do
+ cprintfn cos " | %s %s -> %s "
+ id
+ (match typ with Some _ -> "_fsyacc_x" | None -> "")
+ (match typ with Some _ -> "Microsoft.FSharp.Core.Operators.box _fsyacc_x" | None -> "(null : System.Object)")
+
+ let tychar = "'cty"
+
+ for (key,_) in spec.Types |> Seq.countBy fst |> Seq.filter (fun (_,n) -> n > 1) do
+ failwithf "%s is given multiple %%type declarations" key;
+
+ for (key,_) in spec.Tokens |> Seq.countBy fst |> Seq.filter (fun (_,n) -> n > 1) do
+ failwithf "%s is given %%token declarations" key
+
+ let types = Map.ofList spec.Types
+ let tokens = Map.ofList spec.Tokens
+
+ let nStates = states.Length
+ begin
+ cprintf cos "let _fsyacc_gotos = [| " ;
+ let numGotoNonTerminals = gotoTable.[0].Length
+ let gotoIndexes = Array.create numGotoNonTerminals 0
+ let gotoTableCurrIndex = ref 0 in
+ for j = 0 to numGotoNonTerminals-1 do
+ gotoIndexes.[j] <- !gotoTableCurrIndex;
+
+ (* Count the number of entries in the association table. *)
+ let count = ref 0 in
+ for i = 0 to nStates - 1 do
+ let goto = gotoTable.[i].[j]
+ match goto with
+ | None -> ()
+ | Some _ -> incr count
+
+ (* Write the head of the table (i.e. the number of entries and the default value) *)
+ gotoTableCurrIndex := !gotoTableCurrIndex + 1;
+ outputCodedUInt16 os !count;
+ outputCodedUInt16 os anyMarker;
+
+ (* Write the pairs of entries in incremental order by key *)
+ (* This lets us implement the lookup by a binary chop. *)
+ for i = 0 to nStates - 1 do
+ let goto = gotoTable.[i].[j]
+ match goto with
+ | None -> ()
+ | Some n ->
+ gotoTableCurrIndex := !gotoTableCurrIndex + 1;
+ outputCodedUInt16 os i;
+ outputCodedUInt16 os n;
+ cprintfn cos "|]" ;
+ (* Output offsets into gotos table where the gotos for a particular nonterminal begin *)
+ cprintf cos "let _fsyacc_sparseGotoTableRowOffsets = [|" ;
+ for j = 0 to numGotoNonTerminals-1 do
+ outputCodedUInt16 os gotoIndexes.[j];
+ cprintfn cos "|]" ;
+ end;
+
+ begin
+ cprintf cos "let _fsyacc_stateToProdIdxsTableElements = [| " ;
+ let indexes = Array.create states.Length 0
+ let currIndex = ref 0
+ for j = 0 to states.Length - 1 do
+ let state = states.[j]
+ indexes.[j] <- !currIndex;
+
+ (* Write the head of the table (i.e. the number of entries) *)
+ outputCodedUInt16 os state.Length;
+ currIndex := !currIndex + state.Length + 1;
+
+ (* Write the pairs of entries in incremental order by key *)
+ (* This lets us implement the lookup by a binary chop. *)
+ for prodIdx in state do
+ outputCodedUInt16 os prodIdx;
+ cprintfn cos "|]" ;
+ (* Output offsets into gotos table where the gotos for a particular nonterminal begin *)
+ cprintf cos "let _fsyacc_stateToProdIdxsTableRowOffsets = [|" ;
+ for idx in indexes do
+ outputCodedUInt16 os idx;
+ cprintfn cos "|]" ;
+ end;
+
+ begin
+ let numActionRows = (Array.length actionTable)
+ let maxActionColumns = Array.length actionTable.[0]
+ cprintfn cos "let _fsyacc_action_rows = %d" numActionRows;
+ cprintf cos "let _fsyacc_actionTableElements = [|" ;
+ let actionIndexes = Array.create numActionRows 0
+
+ let actionTableCurrIndex = ref 0
+ for i = 0 to nStates-1 do
+ actionIndexes.[i] <- !actionTableCurrIndex;
+ let actions = actionTable.[i]
+ let terminalsByAction = new Dictionary<_,int list>(10)
+ let countPerAction = new Dictionary<_,_>(10)
+ for terminal = 0 to actions.Length - 1 do
+ let action = snd actions.[terminal]
+ if terminalsByAction.ContainsKey action then
+ terminalsByAction.[action] <- terminal :: terminalsByAction.[action] ;
+ else
+ terminalsByAction.[action] <- [terminal];
+ if countPerAction.ContainsKey action then
+ countPerAction.[action] <- countPerAction.[action]+1
+ else
+ countPerAction.[action] <- 1
+
+ let mostCommonAction =
+ let mostCommon = ref Error
+ let max = ref 0
+ for (KeyValue(x,y)) in countPerAction do
+ if y > !max then (mostCommon := x; max := y)
+ !mostCommon
+
+ (* Count the number of entries in the association table. *)
+ let count = ref 0
+ for (KeyValue(action,terminals)) in terminalsByAction do
+ for terminals in terminals do
+ if action <> mostCommonAction then
+ incr count;
+
+ (* Write the head of the table (i.e. the number of entries and the default value) *)
+ actionTableCurrIndex := !actionTableCurrIndex + 1;
+ outputCodedUInt16 os !count;
+ outputCodedUInt16 os (actionCoding mostCommonAction);
+
+ (* Write the pairs of entries in incremental order by key *)
+ (* This lets us implement the lookup by a binary chop. *)
+ for terminal = 0 to Array.length actions-1 do
+ let action = snd actions.[terminal] in
+ if action <> mostCommonAction then (
+ actionTableCurrIndex := !actionTableCurrIndex + 1;
+ outputCodedUInt16 os terminal;
+ outputCodedUInt16 os (actionCoding action);
+ );
+ cprintfn cos "|]" ;
+ (* Output offsets into actions table where the actions for a particular nonterminal begin *)
+ cprintf cos "let _fsyacc_actionTableRowOffsets = [|" ;
+ for j = 0 to numActionRows-1 do
+ cprintf cos "%a" outputCodedUInt16 actionIndexes.[j];
+ cprintfn cos "|]" ;
+
+ end;
+ begin
+ cprintf cos "let _fsyacc_reductionSymbolCounts = [|" ;
+ for nt,ntIdx,syms,code in prods do
+ cprintf cos "%a" outputCodedUInt16 (List.length syms);
+ cprintfn cos "|]" ;
+ end;
+ begin
+ cprintf cos "let _fsyacc_productionToNonTerminalTable = [|" ;
+ for nt,ntIdx,syms,code in prods do
+ cprintf cos "%a" outputCodedUInt16 ntIdx;
+ cprintfn cos "|]" ;
+ end;
+ begin
+ cprintf cos "let _fsyacc_immediateActions = [|" ;
+ for prodIdx in immediateActionTable do
+ match prodIdx with
+ | None -> cprintf cos "%a" outputCodedUInt16 anyMarker (* NONE REP *)
+ | Some act -> cprintf cos "%a" outputCodedUInt16 (actionCoding act)
+ cprintfn cos "|]" ;
+ end;
+
+ let getType nt = if types.ContainsKey nt then types.[nt] else "'"+nt
+ begin
+ cprintf cos "let _fsyacc_reductions () =" ;
+ cprintfn cos " [| " ;
+ for nt,ntIdx,syms,code in prods do
+ cprintfn cos "# %d \"%s\"" !lineCountOutput output;
+ cprintfn cos " (fun (parseState : %s.IParseState) ->" parslib
+ if !compat then
+ cprintfn cos " Parsing.set_parse_state parseState;"
+ syms |> List.iteri (fun i sym ->
+ let tyopt =
+ match sym with
+ | Terminal t ->
+ if tokens.ContainsKey t then
+ tokens.[t]
+ else None
+ | NonTerminal nt -> Some (getType nt)
+ match tyopt with
+ | Some ty -> cprintfn cos " let _%d = (let data = parseState.GetInput(%d) in (Microsoft.FSharp.Core.Operators.unbox data : %s)) in" (i+1) (i+1) ty
+ | None -> ())
+ cprintfn cos " Microsoft.FSharp.Core.Operators.box"
+ cprintfn cos " (";
+ cprintfn cos " (";
+ match code with
+ | Some (_,pos) -> cprintfn cos "# %d \"%s\"" pos.pos_lnum pos.pos_fname
+ | None -> ()
+ match code with
+ | Some (code,_) ->
+ let dollar = ref false in
+ let c = code |> String.collect (fun c ->
+ if not !dollar && c = '$' then (dollar := true; "")
+ elif !dollar && c >= '0' && c <= '9' then (dollar := false; "_"+new System.String(c,1))
+ elif !dollar then (dollar := false; "$"+new System.String(c,1))
+ else new System.String(c,1))
+ let lines = c.Split([| '\r'; '\n' |], System.StringSplitOptions.RemoveEmptyEntries);
+ for line in lines do
+ cprintfn cos " %s" line;
+ if !dollar then os.Write '$'
+ | None ->
+ cprintfn cos " raise (%s.Accept(Microsoft.FSharp.Core.Operators.box _1))" parslib
+ cprintfn cos " )";
+ // Place the line count back for the type constraint
+ match code with
+ | Some (_,pos) -> cprintfn cos "# %d \"%s\"" pos.pos_lnum pos.pos_fname
+ | None -> ()
+ cprintfn cos " : %s));" (if types.ContainsKey nt then types.[nt] else "'"+nt);
+ done;
+ cprintfn cos "|]" ;
+ end;
+ cprintfn cos "# %d \"%s\"" !lineCountOutput output;
+ cprintfn cos "let tables () : %s.Tables<_> = " parslib
+ cprintfn cos " { reductions= _fsyacc_reductions ();"
+ cprintfn cos " endOfInputTag = _fsyacc_endOfInputTag;"
+ cprintfn cos " tagOfToken = tagOfToken;"
+ cprintfn cos " dataOfToken = _fsyacc_dataOfToken; "
+ cprintfn cos " actionTableElements = _fsyacc_actionTableElements;"
+ cprintfn cos " actionTableRowOffsets = _fsyacc_actionTableRowOffsets;"
+ cprintfn cos " stateToProdIdxsTableElements = _fsyacc_stateToProdIdxsTableElements;"
+ cprintfn cos " stateToProdIdxsTableRowOffsets = _fsyacc_stateToProdIdxsTableRowOffsets;"
+ cprintfn cos " reductionSymbolCounts = _fsyacc_reductionSymbolCounts;"
+ cprintfn cos " immediateActions = _fsyacc_immediateActions;"
+ cprintfn cos " gotos = _fsyacc_gotos;"
+ cprintfn cos " sparseGotoTableRowOffsets = _fsyacc_sparseGotoTableRowOffsets;"
+ cprintfn cos " tagOfErrorTerminal = _fsyacc_tagOfErrorTerminal;"
+ cprintfn cos " parseError = (fun (ctxt:%s.ParseErrorContext<_>) -> " parslib
+ cprintfn cos " match parse_error_rich with "
+ cprintfn cos " | Some f -> f ctxt"
+ cprintfn cos " | None -> parse_error ctxt.Message);"
+
+ cprintfn cos " numTerminals = %d;" (Array.length actionTable.[0]);
+ cprintfn cos " productionToNonTerminalTable = _fsyacc_productionToNonTerminalTable }"
+ cprintfn cos "let engine lexer lexbuf startState = (tables ()).Interpret(lexer, lexbuf, startState)"
+
+ for (id,startState) in List.zip spec.StartSymbols startStates do
+ if not (types.ContainsKey id) then
+ failwith ("a %type declaration is required for for start token "+id);
+ let ty = types.[id] in
+ cprintfn cos "let %s lexer lexbuf : %s =" id ty;
+ cprintfn cos " Microsoft.FSharp.Core.Operators.unbox ((tables ()).Interpret(lexer, lexbuf, %d))" startState
+
+ for id in spec.StartSymbols do
+ if not (types.ContainsKey id) then
+ failwith ("a %type declaration is required for start token "+id);
+ let ty = types.[id] in
+ cprintfn cosi "val %s : (%s.LexBuffer<%s> -> token) -> %s.LexBuffer<%s> -> (%s) " id lexlib tychar lexlib tychar ty;
+
+ logf (fun oso -> oso.Close())
+
+[]
+let result(args: string[]) =
+ try
+ main()
+ 0
+ with e ->
+ eprintf "FSYACC: error FSY000: %s" (match e with Failure s -> s | e -> e.Message);
+ 1
diff --git a/src/buildtools/fsyacc/fsyacc.fsproj b/src/buildtools/fsyacc/fsyacc.fsproj
new file mode 100644
index 0000000000..286c7a4eb1
--- /dev/null
+++ b/src/buildtools/fsyacc/fsyacc.fsproj
@@ -0,0 +1,22 @@
+
+
+
+ Exe
+ netcoreapp2.0
+ INTERNALIZED_FSLEXYACC_RUNTIME;$(DefineConstant)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/buildtools/fsyacc/fsyaccast.fs b/src/buildtools/fsyacc/fsyaccast.fs
new file mode 100644
index 0000000000..f4edc39972
--- /dev/null
+++ b/src/buildtools/fsyacc/fsyaccast.fs
@@ -0,0 +1,1000 @@
+// (c) Microsoft Corporation 2005-2007.
+
+module internal FsLexYacc.FsYacc.AST
+
+#nowarn "62" // This construct is for ML compatibility.
+
+
+open System
+open System.Collections.Generic
+open Printf
+open Microsoft.FSharp.Collections
+open Internal.Utilities
+open Internal.Utilities.Text.Lexing
+
+/// An active pattern that should be in the F# standard library
+let (|KeyValue|) (kvp:KeyValuePair<_,_>) = kvp.Key,kvp.Value
+
+
+type Identifier = string
+type Code = string * Position
+
+type ParserSpec=
+ { Header : Code;
+ Tokens : (Identifier * string option) list;
+ Types : (Identifier * string) list;
+ Associativities: (Identifier * Associativity) list list;
+ StartSymbols : Identifier list;
+ Rules : (Identifier * Rule list) list }
+
+and Rule = Rule of Identifier list * Identifier option * Code option
+and Associativity = LeftAssoc | RightAssoc | NonAssoc
+
+type Terminal = string
+type NonTerminal = string
+type Symbol = Terminal of Terminal | NonTerminal of NonTerminal
+type Symbols = Symbol list
+
+
+//---------------------------------------------------------------------
+// Output Raw Parser Spec AST
+
+let StringOfSym sym = match sym with Terminal s -> "'" + s + "'" | NonTerminal s -> s
+
+let OutputSym os sym = fprintf os "%s" (StringOfSym sym)
+
+let OutputSyms os syms =
+ fprintf os "%s" (String.Join(" ",Array.map StringOfSym syms))
+
+let OutputTerminalSet os (tset:string seq) =
+ fprintf os "%s" (String.Join(";", tset |> Seq.toArray))
+
+let OutputAssoc os p =
+ match p with
+ | LeftAssoc -> fprintf os "left"
+ | RightAssoc -> fprintf os "right"
+ | NonAssoc -> fprintf os "nonassoc"
+
+
+//---------------------------------------------------------------------
+// PreProcess Raw Parser Spec AST
+
+type PrecedenceInfo =
+ | ExplicitPrec of Associativity * int
+ | NoPrecedence
+
+type Production = Production of NonTerminal * PrecedenceInfo * Symbols * Code option
+
+type ProcessedParserSpec =
+ { Terminals: (Terminal * PrecedenceInfo) list;
+ NonTerminals: NonTerminal list;
+ Productions: Production list;
+ StartSymbols: NonTerminal list }
+
+
+let ProcessParserSpecAst (spec: ParserSpec) =
+ let explicitPrecInfo =
+ spec.Associativities
+ |> List.mapi (fun n precSpecs -> precSpecs |> List.map (fun (precSym, assoc) -> precSym,ExplicitPrec (assoc, 10000 - n)))
+ |> List.concat
+
+ for (key,_) in explicitPrecInfo |> Seq.countBy fst |> Seq.filter (fun (_,n) -> n > 1) do
+ failwithf "%s is given two associativities" key
+
+ let explicitPrecInfo =
+ explicitPrecInfo |> Map.ofList
+
+ let implicitSymPrecInfo = NoPrecedence
+ let terminals = List.map fst spec.Tokens @ ["error"]in
+ let terminalSet = Set.ofList terminals
+ let IsTerminal z = terminalSet.Contains(z)
+ let prec_of_terminal sym implicitPrecInfo =
+ if explicitPrecInfo.ContainsKey(sym) then explicitPrecInfo.[sym]
+ else match implicitPrecInfo with Some x -> x | None -> implicitSymPrecInfo
+
+ let mkSym s = if IsTerminal s then Terminal s else NonTerminal s
+ let prods =
+ spec.Rules |> List.mapi (fun i (nonterm,rules) ->
+ rules |> List.mapi (fun j (Rule(syms,precsym,code)) ->
+ let precInfo =
+ let precsym = List.foldBack (fun x acc -> match acc with Some _ -> acc | None -> match x with z when IsTerminal z -> Some z | _ -> acc) syms precsym
+ let implicitPrecInfo = NoPrecedence
+ match precsym with
+ | None -> implicitPrecInfo
+ | Some sym -> if explicitPrecInfo.ContainsKey(sym) then explicitPrecInfo.[sym] else implicitPrecInfo
+ Production(nonterm, precInfo, List.map mkSym syms, code)))
+ |> List.concat
+ let nonTerminals = List.map fst spec.Rules
+ let nonTerminalSet = Set.ofList nonTerminals
+ let checkNonTerminal nt =
+ if nt <> "error" && not (nonTerminalSet.Contains(nt)) then
+ failwith (sprintf "NonTerminal '%s' has no productions" nt)
+
+ for (Production(nt,_,syms,_)) in prods do
+ for sym in syms do
+ match sym with
+ | NonTerminal nt ->
+ checkNonTerminal nt
+ | Terminal t ->
+ if not (IsTerminal t) then failwith (sprintf "token %s is not declared" t)
+
+ if spec.StartSymbols= [] then (failwith "at least one %start declaration is required");
+
+ for (nt,_) in spec.Types do
+ checkNonTerminal nt;
+
+ let terminals = terminals |> List.map (fun t -> (t,prec_of_terminal t None))
+
+ { Terminals=terminals;
+ NonTerminals=nonTerminals;
+ Productions=prods;
+ StartSymbols=spec.StartSymbols }
+
+
+//-------------------------------------------------
+// Process LALR(1) grammars to tables
+
+type ProductionIndex = int
+type ProdictionDotIndex = int
+
+/// Represent (ProductionIndex,ProdictionDotIndex) as one integer
+type Item0 = uint32
+
+let mkItem0 (prodIdx,dotIdx) : Item0 = (uint32 prodIdx <<< 16) ||| uint32 dotIdx
+let prodIdx_of_item0 (item0:Item0) = int32 (item0 >>> 16)
+let dotIdx_of_item0 (item0:Item0) = int32 (item0 &&& 0xFFFFu)
+
+/// Part of the output of CompilerLalrParserSpec
+type Action =
+ | Shift of int
+ | Reduce of ProductionIndex
+ | Accept
+ | Error
+
+let outputPrecInfo os p =
+ match p with
+ | ExplicitPrec (assoc,n) -> fprintf os "explicit %a %d" OutputAssoc assoc n
+ | NoPrecedence -> fprintf os "noprec"
+
+
+/// LR(0) kernels
+type Kernel = Set
+
+/// Indexes of LR(0) kernels in the KernelTable
+type KernelIdx = int
+
+/// Indexes in the TerminalTable and NonTerminalTable
+type TerminalIndex = int
+type NonTerminalIndex = int
+
+/// Representation of Symbols.
+/// Ideally would be declared as
+/// type SymbolIndex = PTerminal of TerminalIndex | PNonTerminal of NonTerminalIndex
+/// but for performance reasons we embed as a simple integer (saves ~10%)
+///
+/// We use an active pattern to reverse the embedding.
+type SymbolIndex = int
+let PTerminal(i:TerminalIndex) : SymbolIndex = -i-1
+let PNonTerminal(i:NonTerminalIndex) : SymbolIndex = i
+let (|PTerminal|PNonTerminal|) x = if x < 0 then PTerminal (-(x+1)) else PNonTerminal x
+
+type SymbolIndexes = SymbolIndex list
+
+/// Indexes in the LookaheadTable, SpontaneousTable, PropagateTable
+/// Embed in a single integer, since these are faster
+/// keys for the dictionary hash tables
+///
+/// Logically:
+///
+/// type KernelItemIndex = KernelItemIdx of KernelIdx * Item0
+type KernelItemIndex = int64
+let KernelItemIdx (i1,i2) = ((int64 i1) <<< 32) ||| int64 i2
+
+
+/// Indexes into the memoizing table for the Goto computations
+/// Embed in a single integer, since these are faster
+/// keys for the dictionary hash tables
+///
+/// Logically:
+///
+/// type GotoItemIndex = GotoItemIdx of KernelIdx * SymbolIndex
+type GotoItemIndex = uint64
+let GotoItemIdx (i1:KernelIdx,i2:SymbolIndex) = (uint64 (uint32 i1) <<< 32) ||| uint64 (uint32 i2)
+let (|GotoItemIdx|) (i64:uint64) = int32 ((i64 >>> 32) &&& 0xFFFFFFFFUL), int32 (i64 &&& 0xFFFFFFFFUL)
+
+/// Create a work list and loop until it is exhausted, calling a worker function for
+/// each element. Pass a function to queue additional work on the work list
+/// to the worker function
+let ProcessWorkList start f =
+ let work = ref (start : 'a list)
+ let queueWork = (fun x -> work := x :: !work)
+ let rec loop() =
+ match !work with
+ | [] -> ()
+ | x::t ->
+ work := t;
+ f queueWork x;
+ loop()
+ loop()
+
+/// A standard utility to compute a least fixed point of a set under a generative computation
+let LeastFixedPoint f set =
+ let acc = ref set
+ ProcessWorkList (Set.toList set) (fun queueWork item ->
+ f(item) |> List.iter (fun i2 -> if not (Set.contains i2 !acc) then (acc := Set.add i2 !acc; queueWork i2)) )
+ !acc
+
+/// A general standard memoization utility. Be sure to apply to only one (function) argument to build the
+/// residue function!
+let Memoize f =
+ let t = new Dictionary<_,_>(1000)
+ fun x ->
+ let ok,v = t.TryGetValue(x)
+ if ok then v else let res = f x in t.[x] <- res; res
+
+/// A standard utility to create a dictionary from a list of pairs
+let CreateDictionary xs =
+ let dict = new Dictionary<_,_>()
+ for x,y in xs do dict.Add(x,y)
+ dict
+
+/// Allocate indexes for each non-terminal
+type NonTerminalTable(nonTerminals:NonTerminal list) =
+ let nonterminalsWithIdxs = List.mapi (fun (i:NonTerminalIndex) n -> (i,n)) nonTerminals
+ let nonterminalIdxs = List.map fst nonterminalsWithIdxs
+ let a = Array.ofList nonTerminals
+ let b = CreateDictionary [ for i,x in nonterminalsWithIdxs -> x,i ];
+ member table.OfIndex(i) = a.[i]
+ member table.ToIndex(i) = b.[i]
+ member table.Indexes = nonterminalIdxs
+
+/// Allocate indexes for each terminal
+type TerminalTable(terminals:(Terminal * PrecedenceInfo) list) =
+ let terminalsWithIdxs = List.mapi (fun i (t,_) -> (i,t)) terminals
+ let terminalIdxs = List.map fst terminalsWithIdxs
+ let a = Array.ofList (List.map fst terminals)
+ let b = Array.ofList (List.map snd terminals)
+ let c = CreateDictionary [ for i,x in terminalsWithIdxs -> x,i ]
+
+ member table.OfIndex(i) = a.[i]
+ member table.PrecInfoOfIndex(i) = b.[i]
+ member table.ToIndex(i) = c.[i]
+ member table.Indexes = terminalIdxs
+
+/// Allocate indexes for each production
+type ProductionTable(ntTab:NonTerminalTable, termTab:TerminalTable, nonTerminals:string list, prods: Production list) =
+ let prodsWithIdxs = List.mapi (fun i n -> (i,n)) prods
+ let a =
+ prodsWithIdxs
+ |> List.map(fun (_,Production(_,_,syms,_)) ->
+ syms
+ |> Array.ofList
+ |> Array.map (function
+ | Terminal t -> PTerminal (termTab.ToIndex t)
+ | NonTerminal nt -> PNonTerminal (ntTab.ToIndex nt )) )
+ |> Array.ofList
+ let b = Array.ofList (List.map (fun (_,Production(nt,_,_,_)) -> ntTab.ToIndex nt) prodsWithIdxs)
+ let c = Array.ofList (List.map (fun (_,Production(_,prec,_,_)) -> prec) prodsWithIdxs)
+ let productions =
+ nonTerminals
+ |> List.map(fun nt -> (ntTab.ToIndex nt, List.choose (fun (i,Production(nt2,prec,syms,_)) -> if nt2=nt then Some i else None) prodsWithIdxs))
+ |> CreateDictionary
+
+ member prodTab.Symbols(i) = a.[i]
+ member prodTab.NonTerminal(i) = b.[i]
+ member prodTab.Precedence(i) = c.[i]
+ member prodTab.Symbol i n =
+ let syms = prodTab.Symbols i
+ if n >= syms.Length then None else Some (syms.[n])
+ member prodTab.Productions = productions
+
+/// A mutable table maping kernels to sets of lookahead tokens
+type LookaheadTable() =
+ let t = new Dictionary>()
+ member table.Add(x,y) =
+ let prev = if t.ContainsKey(x) then t.[x] else Set.empty
+ t.[x] <- prev.Add(y)
+ member table.Contains(x,y) = t.ContainsKey(x) && t.[x].Contains(y)
+ member table.GetLookaheads(idx:KernelItemIndex) =
+ let ok,v = t.TryGetValue(idx)
+ if ok then v else Set.empty
+ member table.Count = t |> Seq.fold(fun acc (KeyValue(_,v)) -> v.Count+acc) 0
+
+/// A mutable table giving an index to each LR(0) kernel. Kernels are referred to only by index.
+type KernelTable(kernels) =
+ // Give an index to each LR(0) kernel, and from now on refer to them only by index
+ // Also develop "kernelItemIdx" to refer to individual items within a kernel
+ let kernelsAndIdxs = List.mapi (fun i x -> (i,x)) kernels
+ let kernelIdxs = List.map fst kernelsAndIdxs
+ let toIdxMap = Map.ofList [ for i,x in kernelsAndIdxs -> x,i ]
+ let ofIdxMap = Array.ofList kernels
+ member t.Indexes = kernelIdxs
+ member t.Index(kernel) = toIdxMap.[kernel]
+ member t.Kernel(i) = ofIdxMap.[i]
+
+/// Hold the results of cpmuting the LALR(1) closure of an LR(0) kernel
+type Closure1Table() =
+ let t = new Dictionary>()
+ member table.Add(a,b) =
+ if not (t.ContainsKey(a)) then t.[a] <- new HashSet<_>(HashIdentity.Structural)
+ t.[a].Add(b)
+ member table.Count = t.Count
+ member table.IEnumerable = (t :> seq<_>)
+ member table.Contains(a,b) = t.ContainsKey(a) && t.[a].Contains(b)
+
+/// A mutable table giving a lookahead set Set for each kernel. The terminals represent the
+/// "spontaneous" items for the kernel. TODO: document this more w.r.t. the Dragon book.
+type SpontaneousTable() =
+ let t = new Dictionary>()
+ member table.Add(a,b) =
+ if not (t.ContainsKey(a)) then t.[a] <- new HashSet<_>(HashIdentity.Structural)
+ t.[a].Add(b)
+ member table.Count = t.Count
+ member table.IEnumerable = (t :> seq<_>)
+
+/// A mutable table giving a Set for each kernel. The kernels represent the
+/// "propagate" items for the kernel. TODO: document this more w.r.t. the Dragon book.
+type PropagateTable() =
+ let t = new Dictionary>()
+ member table.Add(a,b) =
+ if not (t.ContainsKey(a)) then t.[a] <- new HashSet(HashIdentity.Structural)
+ t.[a].Add(b)
+ member table.Item
+ with get(a) =
+ let ok,v = t.TryGetValue(a)
+ if ok then v :> seq<_> else Seq.empty
+ member table.Count = t.Count
+
+
+/// Compile a pre-processed LALR parser spec to tables following the Dragon book algorithm
+let CompilerLalrParserSpec logf (spec : ProcessedParserSpec) =
+ let stopWatch = new System.Diagnostics.Stopwatch()
+ let reportTime() = printfn " time: %A" stopWatch.Elapsed; stopWatch.Reset(); stopWatch.Start()
+ stopWatch.Start()
+
+ // Augment the grammar
+ let fakeStartNonTerminals = spec.StartSymbols |> List.map(fun nt -> "_start" + nt)
+ let nonTerminals = fakeStartNonTerminals@spec.NonTerminals
+ let endOfInputTerminal = "$$"
+ let dummyLookahead = "#"
+ let dummyPrec = NoPrecedence
+ let terminals = spec.Terminals @ [(dummyLookahead,dummyPrec); (endOfInputTerminal,dummyPrec)]
+ let prods = List.map2 (fun a b -> Production(a, dummyPrec,[NonTerminal b],None)) fakeStartNonTerminals spec.StartSymbols @ spec.Productions
+ let startNonTerminalIdx_to_prodIdx (i:int) = i
+
+ // Build indexed tables
+ let ntTab = NonTerminalTable(nonTerminals)
+ let termTab = TerminalTable(terminals)
+ let prodTab = ProductionTable(ntTab,termTab,nonTerminals,prods)
+ let dummyLookaheadIdx = termTab.ToIndex dummyLookahead
+ let endOfInputTerminalIdx = termTab.ToIndex endOfInputTerminal
+
+ let errorTerminalIdx = termTab.ToIndex "error"
+
+ // Compute the FIRST function
+ printf "computing first function..."; stdout.Flush();
+
+ let computedFirstTable =
+ let seed =
+ Map.ofList
+ [ for term in termTab.Indexes do yield (PTerminal(term),Set.singleton (Some term))
+ for nonTerm in ntTab.Indexes do
+ yield
+ (PNonTerminal nonTerm,
+ List.foldBack
+ (fun prodIdx acc -> match prodTab.Symbol prodIdx 0 with None -> Set.add None acc | Some _ -> acc)
+ prodTab.Productions.[nonTerm]
+ Set.empty) ]
+
+ let add changed ss (x,y) =
+ let s = Map.find x ss
+ if Set.contains y s then ss
+ else (changed := true; Map.add x (Set.add y s) ss)
+
+ let oneRound (ss:Map<_,_>) =
+ let changed = ref false
+ let frontier =
+ let res = ref []
+ for nonTermX in ntTab.Indexes do
+ for prodIdx in prodTab.Productions.[nonTermX] do
+ let rhs = Array.toList (prodTab.Symbols prodIdx)
+ let rec place l =
+ match l with
+ | (yi::t) ->
+ res :=
+ List.choose
+ (function None -> None | Some a -> Some (PNonTerminal nonTermX,Some a))
+ (Set.toList ss.[yi])
+ @ !res;
+ if ss.[yi].Contains(None) then place t;
+ | [] ->
+ res := (PNonTerminal nonTermX,None) :: !res
+ place rhs
+ !res
+ let ss' = List.fold (add changed) ss frontier
+ !changed, ss'
+
+ let rec loop ss =
+ let changed, ss' = oneRound ss
+ if changed then loop ss' else ss'
+ loop seed
+
+
+ /// Compute the first set of the given sequence of non-terminals. If any of the non-terminals
+ /// have an empty token in the first set then we have to iterate through those.
+ let ComputeFirstSetOfTokenList =
+ Memoize (fun (str,term) ->
+ let acc = new System.Collections.Generic.List<_>()
+ let rec add l =
+ match l with
+ | [] -> acc.Add(term)
+ | sym::moreSyms ->
+ let firstSetOfSym = computedFirstTable.[sym]
+ firstSetOfSym |> Set.iter (function None -> () | Some v -> acc.Add(v))
+ if firstSetOfSym.Contains(None) then add moreSyms
+ add str;
+ Set.ofSeq acc)
+
+ // (int,int) representation of LR(0) items
+ let prodIdx_to_item0 idx = mkItem0(idx,0)
+ let prec_of_item0 item0 = prodTab.Precedence (prodIdx_of_item0 item0)
+ let ntIdx_of_item0 item0 = prodTab.NonTerminal (prodIdx_of_item0 item0)
+
+ let lsyms_of_item0 item0 =
+ let prodIdx = prodIdx_of_item0 item0
+ let dotIdx = dotIdx_of_item0 item0
+ let syms = prodTab.Symbols prodIdx
+ if dotIdx <= 0 then [||] else syms.[..dotIdx-1]
+
+ let rsyms_of_item0 item0 =
+ let prodIdx = prodIdx_of_item0 item0
+ let dotIdx = dotIdx_of_item0 item0
+ let syms = prodTab.Symbols prodIdx
+ syms.[dotIdx..]
+
+ let rsym_of_item0 item0 =
+ let prodIdx = prodIdx_of_item0 item0
+ let dotIdx = dotIdx_of_item0 item0
+ prodTab.Symbol prodIdx dotIdx
+
+ let advance_of_item0 item0 =
+ let prodIdx = prodIdx_of_item0 item0
+ let dotIdx = dotIdx_of_item0 item0
+ mkItem0(prodIdx,dotIdx+1)
+ let fakeStartNonTerminalsSet = Set.ofList (fakeStartNonTerminals |> List.map ntTab.ToIndex)
+
+ let IsStartItem item0 = fakeStartNonTerminalsSet.Contains(ntIdx_of_item0 item0)
+ let IsKernelItem item0 = (IsStartItem item0 || dotIdx_of_item0 item0 <> 0)
+
+ let StringOfSym sym = match sym with PTerminal s -> "'" + termTab.OfIndex s + "'" | PNonTerminal s -> ntTab.OfIndex s
+
+ let OutputSym os sym = fprintf os "%s" (StringOfSym sym)
+
+ let OutputSyms os syms =
+ fprintf os "%s" (String.Join(" ",Array.map StringOfSym syms))
+
+ // Print items and other stuff
+ let OutputItem0 os item0 =
+ fprintf os " %s -> %a . %a" (ntTab.OfIndex (ntIdx_of_item0 item0)) (* outputPrecInfo precInfo *) OutputSyms (lsyms_of_item0 item0) OutputSyms (rsyms_of_item0 item0)
+
+ let OutputItem0Set os s =
+ Set.iter (fun item -> fprintfn os "%a" OutputItem0 item) s
+
+ let OutputFirstSet os m =
+ Set.iter (function None -> fprintf os "" | Some x -> fprintfn os " term %s" x) m
+
+ let OutputFirstMap os m =
+ Map.iter (fun x y -> fprintf os "first '%a' = " OutputSym x; fprintfn os "%a" OutputFirstSet y) m
+
+ let OutputAction os m =
+ match m with
+ | Shift n -> fprintf os " shift %d" n
+ | Reduce prodIdx -> fprintf os " reduce %s --> %a" (ntTab.OfIndex (prodTab.NonTerminal prodIdx)) OutputSyms (prodTab.Symbols prodIdx)
+ | Error -> fprintf os " error"
+ | Accept -> fprintf os " accept"
+
+ let OutputActions os m =
+ Array.iteri (fun i (prec,action) -> let term = termTab.OfIndex i in fprintfn os " action '%s' (%a): %a" term outputPrecInfo prec OutputAction action) m
+
+ let OutputActionTable os m =
+ Array.iteri (fun i n -> fprintfn os "state %d:" i; fprintfn os "%a" OutputActions n) m
+
+ let OutputImmediateActions os m =
+ match m with
+ | None -> fprintf os ""
+ | Some a -> OutputAction os a
+
+ let OutputGotos os m =
+ Array.iteri (fun ntIdx s -> let nonterm = ntTab.OfIndex ntIdx in match s with Some st -> fprintfn os " goto %s: %d" nonterm st | None -> ()) m
+
+ let OutputCombined os m =
+ Array.iteri (fun i (a,b,c,d) ->
+ fprintf os "state %d:" i
+ fprintf os " items:"
+ fprintf os "%a" OutputItem0Set a
+ fprintf os " actions:"
+ fprintf os "%a" OutputActions b
+ fprintf os " immediate action: "
+ fprintf os "%a" OutputImmediateActions c
+ fprintf os " gotos:"
+ fprintf os "%a" OutputGotos d) m
+
+ let OutputLalrTables os (prods,states, startStates,actionTable,immediateActionTable,gotoTable,endOfInputTerminalIdx,errorTerminalIdx) =
+ let combined = Array.ofList (List.map2 (fun x (y,(z,w)) -> x,y,z,w) (Array.toList states) (List.zip (Array.toList actionTable) (List.zip (Array.toList immediateActionTable) (Array.toList gotoTable))))
+ fprintfn os "------------------------";
+ fprintfn os "states = ";
+ fprintfn os "%a" OutputCombined combined;
+ fprintfn os "startStates = %s" (String.Join(";",Array.ofList (List.map string startStates)));
+ fprintfn os "------------------------"
+
+
+ // Closure of LR(0) nonTerminals, items etc
+ let ComputeClosure0NonTerminal =
+ Memoize (fun nt ->
+ let seed = (List.foldBack (prodIdx_to_item0 >> Set.add) prodTab.Productions.[nt] Set.empty)
+ LeastFixedPoint
+ (fun item0 ->
+ match rsym_of_item0 item0 with
+ | None -> []
+ | Some(PNonTerminal ntB) -> List.map prodIdx_to_item0 prodTab.Productions.[ntB]
+ | Some(PTerminal _) -> [])
+ seed)
+
+ // Close a symbol under epsilon moves
+ let ComputeClosure0Symbol rsym acc =
+ match rsym with
+ | Some (PNonTerminal nt) -> Set.union (ComputeClosure0NonTerminal nt) acc
+ | _ -> acc
+
+ // Close a set under epsilon moves
+ let ComputeClosure0 iset =
+ Set.fold (fun acc x -> ComputeClosure0Symbol (rsym_of_item0 x) acc) iset iset
+
+ // Right symbols after closing under epsilon moves
+ let RelevantSymbolsOfKernel kernel =
+ let kernelClosure0 = ComputeClosure0 kernel
+ Set.fold (fun acc x -> Option.fold (fun acc x -> Set.add x acc) acc (rsym_of_item0 x)) Set.empty kernelClosure0
+
+ // Goto set of a kernel of LR(0) nonTerminals, items etc
+ // Input is kernel, output is kernel
+ let ComputeGotosOfKernel iset sym =
+ let isetClosure = ComputeClosure0 iset
+ let acc = new System.Collections.Generic.List<_>(10)
+ isetClosure |> Set.iter (fun item0 ->
+ match rsym_of_item0 item0 with
+ | Some sym2 when sym = sym2 -> acc.Add(advance_of_item0 item0)
+ | _ -> ())
+ Set.ofSeq acc
+
+ // Build the full set of LR(0) kernels
+ reportTime(); printf "building kernels..."; stdout.Flush();
+ let startItems = List.mapi (fun i _ -> prodIdx_to_item0 (startNonTerminalIdx_to_prodIdx i)) fakeStartNonTerminals
+ let startKernels = List.map Set.singleton startItems
+ let kernels =
+
+ /// We use a set-of-sets here. F# sets support structural comparison but at the time of writing
+ /// did not structural hashing.
+ let acc = ref Set.empty
+ ProcessWorkList startKernels (fun addToWorkList kernel ->
+ if not ((!acc).Contains(kernel)) then
+ acc := (!acc).Add(kernel);
+ for csym in RelevantSymbolsOfKernel kernel do
+ let gotoKernel = ComputeGotosOfKernel kernel csym
+ assert (gotoKernel.Count > 0)
+ addToWorkList gotoKernel )
+
+ !acc |> Seq.toList |> List.map (Set.filter IsKernelItem)
+
+ reportTime(); printf "building kernel table..."; stdout.Flush();
+ // Give an index to each LR(0) kernel, and from now on refer to them only by index
+ let kernelTab = new KernelTable(kernels)
+ let startKernelIdxs = List.map kernelTab.Index startKernels
+ let startKernelItemIdxs = List.map2 (fun a b -> KernelItemIdx(a,b)) startKernelIdxs startItems
+
+ let outputKernelItemIdx os (kernelIdx,item0) =
+ fprintf os "kernel %d, item %a" kernelIdx OutputItem0 item0
+
+ /// A cached version of the "goto" computation on LR(0) kernels
+ let gotoKernel =
+ Memoize (fun (GotoItemIdx(kernelIdx,sym)) ->
+ let gset = ComputeGotosOfKernel (kernelTab.Kernel kernelIdx) sym
+ if gset.IsEmpty then None else Some (kernelTab.Index gset))
+
+ /// Iterate (iset,sym) pairs such that (gotoKernel kernelIdx sym) is not empty
+ let IterateGotosOfKernel kernelIdx f =
+ for sym in RelevantSymbolsOfKernel (kernelTab.Kernel kernelIdx) do
+ match gotoKernel (GotoItemIdx(kernelIdx,sym)) with
+ | None -> ()
+ | Some k -> f sym k
+
+
+ // This is used to compute the closure of an LALR(1) kernel
+ //
+ // For each item [A --> X.BY, a] in I
+ // For each production B -> g in G'
+ // For each terminal b in FIRST(Ya)
+ // such that [B --> .g, b] is not in I do
+ // add [B --> .g, b] to I
+
+ let ComputeClosure1 iset =
+ let acc = new Closure1Table()
+ ProcessWorkList iset (fun addToWorkList (item0,pretokens:Set) ->
+ pretokens |> Set.iter (fun pretoken ->
+ if not (acc.Contains(item0,pretoken)) then
+ acc.Add(item0,pretoken) |> ignore
+ let rsyms = rsyms_of_item0 item0
+ if rsyms.Length > 0 then
+ match rsyms.[0] with
+ | (PNonTerminal ntB) ->
+ let firstSet = ComputeFirstSetOfTokenList (Array.toList rsyms.[1..],pretoken)
+ for prodIdx in prodTab.Productions.[ntB] do
+ addToWorkList (prodIdx_to_item0 prodIdx,firstSet)
+ | PTerminal _ -> ()))
+ acc
+
+ // Compute the "spontaneous" and "propagate" maps for each LR(0) kernelItem
+ //
+ // Input: The kernal K of a set of LR(0) items I and a grammar symbol X
+ //
+ // Output: The lookaheads generated spontaneously by items in I for kernel items
+ // in goto(I,X) and the items I from which lookaheads are propagated to kernel
+ // items in goto(I,X)
+ //
+ // Method
+ // 1. Construct LR(0) kernel items (done - above)
+ // 2.
+ // TODO: this is very, very slow.
+ //
+ // PLAN TO OPTIMIZE THIS;
+ // - Clarify and comment what's going on here
+ // - verify if we really have to do these enormouos closure computations
+ // - assess if it's possible to use the symbol we're looking for to help trim the jset
+
+ reportTime(); printf "computing lookahead relations..."; stdout.Flush();
+
+
+ let spontaneous, propagate =
+ let closure1OfItem0WithDummy =
+ Memoize (fun item0 -> ComputeClosure1 [(item0,Set.ofList [dummyLookaheadIdx])])
+
+ let spontaneous = new SpontaneousTable()
+ let propagate = new PropagateTable()
+ let count = ref 0
+
+ for kernelIdx in kernelTab.Indexes do
+ printf "."; stdout.Flush();
+ //printf "kernelIdx = %d\n" kernelIdx; stdout.Flush();
+ let kernel = kernelTab.Kernel(kernelIdx)
+ for item0 in kernel do
+ let item0Idx = KernelItemIdx(kernelIdx,item0)
+ let jset = closure1OfItem0WithDummy item0
+ //printf "#jset = %d\n" jset.Count; stdout.Flush();
+ for (KeyValue(closureItem0, lookaheadTokens)) in jset.IEnumerable do
+ incr count
+ match rsym_of_item0 closureItem0 with
+ | None -> ()
+ | Some rsym ->
+ match gotoKernel (GotoItemIdx(kernelIdx,rsym)) with
+ | None -> ()
+ | Some gotoKernelIdx ->
+ let gotoItem = advance_of_item0 closureItem0
+ let gotoItemIdx = KernelItemIdx(gotoKernelIdx,gotoItem)
+ for lookaheadToken in lookaheadTokens do
+ if lookaheadToken = dummyLookaheadIdx
+ then propagate.Add(item0Idx, gotoItemIdx) |> ignore
+ else spontaneous.Add(gotoItemIdx, lookaheadToken) |> ignore
+
+
+ //printfn "#kernelIdxs = %d, count = %d" kernelTab.Indexes.Length !count
+ spontaneous,
+ propagate
+
+ //printfn "#spontaneous = %d, #propagate = %d" spontaneous.Count propagate.Count; stdout.Flush();
+
+ //exit 0;
+ // Repeatedly use the "spontaneous" and "propagate" maps to build the full set
+ // of lookaheads for each LR(0) kernelItem.
+ reportTime(); printf "building lookahead table..."; stdout.Flush();
+ let lookaheadTable =
+
+ // Seed the table with the startKernelItems and the spontaneous info
+ let initialWork =
+ [ for idx in startKernelItemIdxs do
+ yield (idx,endOfInputTerminalIdx)
+ for (KeyValue(kernelItemIdx,lookaheads)) in spontaneous.IEnumerable do
+ for lookahead in lookaheads do
+ yield (kernelItemIdx,lookahead) ]
+
+ let acc = new LookaheadTable()
+ // Compute the closure
+ ProcessWorkList
+ initialWork
+ (fun queueWork (kernelItemIdx,lookahead) ->
+ acc.Add(kernelItemIdx,lookahead)
+ for gotoKernelIdx in propagate.[kernelItemIdx] do
+ if not (acc.Contains(gotoKernelIdx,lookahead)) then
+ queueWork(gotoKernelIdx,lookahead))
+ acc
+
+ //printf "built lookahead table, #lookaheads = %d\n" lookaheadTable.Count; stdout.Flush();
+
+ reportTime(); printf "building action table..."; stdout.Flush();
+ let shiftReduceConflicts = ref 0
+ let reduceReduceConflicts = ref 0
+ let actionTable, immediateActionTable =
+
+ // Now build the action tables. First a utility to merge the given action
+ // into the table, taking into account precedences etc. and reporting errors.
+ let addResolvingPrecedence (arr: _[]) kernelIdx termIdx (precNew, actionNew) =
+ // printf "DEBUG: state %d: adding action for %s, precNew = %a, actionNew = %a\n" kernelIdx (termTab.OfIndex termIdx) outputPrec precNew OutputAction actionNew;
+ // We add in order of precedence - however the precedences may be the same, and we give warnings when rpecedence resolution is based on implicit file orderings
+
+ let (precSoFar, actionSoFar) as itemSoFar = arr.[termIdx]
+
+ // printf "DEBUG: state %d: adding action for %s, precNew = %a, precSoFar = %a, actionSoFar = %a\n" kernelIdx (termTab.OfIndex termIdx) outputPrec precNew outputPrec precSoFar OutputAction actionSoFar;
+ // if compare_prec precSoFar precNew = -1 then failwith "addResolvingPrecedence";
+
+ let itemNew = (precNew, actionNew)
+ let winner =
+ let reportConflict x1 x2 reason =
+ let reportAction (p, a) =
+ let an, astr =
+ match a with
+ | Shift x -> "shift", sprintf "shift(%d)" x
+ | Reduce x ->
+ let nt = prodTab.NonTerminal x
+ "reduce", prodTab.Symbols x
+ |> Array.map StringOfSym
+ |> String.concat " "
+ |> sprintf "reduce(%s:%s)" (ntTab.OfIndex nt)
+ | _ -> "", ""
+ let pstr =
+ match p with
+ | ExplicitPrec (assoc,n) ->
+ let astr =
+ match assoc with
+ | LeftAssoc -> "left"
+ | RightAssoc -> "right"
+ | NonAssoc -> "nonassoc"
+ sprintf "[explicit %s %d]" astr n
+ | NoPrecedence ->
+ "noprec"
+ an, "{" + pstr + " " + astr + "}"
+ let a1n, astr1 = reportAction x1
+ let a2n, astr2 = reportAction x2
+ printfn " %s/%s error at state %d on terminal %s between %s and %s - assuming the former because %s" a1n a2n kernelIdx (termTab.OfIndex termIdx) astr1 astr2 reason
+ match itemSoFar,itemNew with
+ | (_,Shift s1),(_, Shift s2) ->
+ if actionSoFar <> actionNew then
+ reportConflict itemSoFar itemNew "internal error"
+ itemSoFar
+
+ | (((precShift,Shift sIdx) as shiftItem),
+ ((precReduce,Reduce prodIdx) as reduceItem))
+ | (((precReduce,Reduce prodIdx) as reduceItem),
+ ((precShift,Shift sIdx) as shiftItem)) ->
+ match precReduce, precShift with
+ | (ExplicitPrec (_,p1), ExplicitPrec(assocNew,p2)) ->
+ if p1 < p2 then shiftItem
+ elif p1 > p2 then reduceItem
+ else
+ match assocNew with
+ | LeftAssoc -> reduceItem
+ | RightAssoc -> shiftItem
+ | NonAssoc ->
+ reportConflict shiftItem reduceItem "we prefer shift on equal precedences"
+ incr shiftReduceConflicts;
+ shiftItem
+ | _ ->
+ reportConflict shiftItem reduceItem "we prefer shift when unable to compare precedences"
+ incr shiftReduceConflicts;
+ shiftItem
+ | ((_,Reduce prodIdx1),(_, Reduce prodIdx2)) ->
+ "we prefer the rule earlier in the file"
+ |> if prodIdx1 < prodIdx2 then reportConflict itemSoFar itemNew else reportConflict itemNew itemSoFar
+ incr reduceReduceConflicts;
+ if prodIdx1 < prodIdx2 then itemSoFar else itemNew
+ | _ -> itemNew
+ arr.[termIdx] <- winner
+
+
+ // This build the action table for one state.
+ let ComputeActions kernelIdx =
+ let kernel = kernelTab.Kernel kernelIdx
+ let arr = Array.create terminals.Length (NoPrecedence,Error)
+
+ //printf "building lookahead table LR(1) items for kernelIdx %d\n" kernelIdx; stdout.Flush();
+
+ // Compute the LR(1) items based on lookaheads
+ let items =
+ [ for item0 in kernel do
+ let kernelItemIdx = KernelItemIdx(kernelIdx,item0)
+ let lookaheads = lookaheadTable.GetLookaheads(kernelItemIdx)
+ yield (item0,lookaheads) ]
+ |> ComputeClosure1
+
+ for (KeyValue(item0,lookaheads)) in items.IEnumerable do
+
+ let nonTermA = ntIdx_of_item0 item0
+ match rsym_of_item0 item0 with
+ | Some (PTerminal termIdx) ->
+ let action =
+ match gotoKernel (GotoItemIdx(kernelIdx,PTerminal termIdx)) with
+ | None -> failwith "action on terminal should have found a non-empty goto state"
+ | Some gkernelItemIdx -> Shift gkernelItemIdx
+ let prec = termTab.PrecInfoOfIndex termIdx
+ addResolvingPrecedence arr kernelIdx termIdx (prec, action)
+ | None ->
+ for lookahead in lookaheads do
+ if not (IsStartItem(item0)) then
+ let prodIdx = prodIdx_of_item0 item0
+ let prec = prec_of_item0 item0
+ let action = (prec, Reduce prodIdx)
+ addResolvingPrecedence arr kernelIdx lookahead action
+ elif lookahead = endOfInputTerminalIdx then
+ let prec = prec_of_item0 item0
+ let action = (prec,Accept)
+ addResolvingPrecedence arr kernelIdx lookahead action
+ else ()
+ | _ -> ()
+
+ // If there is a single item A -> B C . and no Shift or Accept actions (i.e. only Error or Reduce, so the choice of terminal
+ // cannot affect what we do) then we emit an immediate reduce action for the rule corresponding to that item
+ // Also do the same for Accept rules.
+ let closure = (ComputeClosure0 kernel)
+
+ let immediateAction =
+ match Set.toList closure with
+ | [item0] ->
+ match (rsym_of_item0 item0) with
+ | None when (let reduceOrErrorAction = function Error | Reduce _ -> true | Shift _ | Accept -> false
+ termTab.Indexes |> List.forall(fun terminalIdx -> reduceOrErrorAction (snd(arr.[terminalIdx]))))
+ -> Some (Reduce (prodIdx_of_item0 item0))
+
+ | None when (let acceptOrErrorAction = function Error | Accept -> true | Shift _ | Reduce _ -> false
+ List.forall (fun terminalIdx -> acceptOrErrorAction (snd(arr.[terminalIdx]))) termTab.Indexes)
+ -> Some Accept
+
+ | _ -> None
+ | _ -> None
+
+ // A -> B C . rules give rise to reductions in favour of errors
+ for item0 in ComputeClosure0 kernel do
+ let prec = prec_of_item0 item0
+ match rsym_of_item0 item0 with
+ | None ->
+ for terminalIdx in termTab.Indexes do
+ if snd(arr.[terminalIdx]) = Error then
+ let prodIdx = prodIdx_of_item0 item0
+ let action = (prec, (if IsStartItem(item0) then Accept else Reduce prodIdx))
+ addResolvingPrecedence arr kernelIdx terminalIdx action
+ | _ -> ()
+
+ arr,immediateAction
+
+ let actionInfo = List.map ComputeActions kernelTab.Indexes
+ Array.ofList (List.map fst actionInfo),
+ Array.ofList (List.map snd actionInfo)
+
+ // The goto table is much simpler - it is based on LR(0) kernels alone.
+
+ reportTime(); printf " building goto table..."; stdout.Flush();
+ let gotoTable =
+ let gotos kernelIdx = Array.ofList (List.map (fun nt -> gotoKernel (GotoItemIdx(kernelIdx,PNonTerminal nt))) ntTab.Indexes)
+ Array.ofList (List.map gotos kernelTab.Indexes)
+
+ reportTime(); printfn " returning tables."; stdout.Flush();
+ if !shiftReduceConflicts > 0 then printfn " %d shift/reduce conflicts" !shiftReduceConflicts; stdout.Flush();
+ if !reduceReduceConflicts > 0 then printfn " %d reduce/reduce conflicts" !reduceReduceConflicts; stdout.Flush();
+ if !shiftReduceConflicts > 0 || !reduceReduceConflicts > 0 then printfn " consider setting precedences explicitly using %%left %%right and %%nonassoc on terminals and/or setting explicit precedence on rules using %%prec"
+
+ /// The final results
+ let states = kernels |> Array.ofList
+ let prods = Array.ofList (List.map (fun (Production(nt,prec,syms,code)) -> (nt, ntTab.ToIndex nt, syms,code)) prods)
+
+ logf (fun logStream ->
+ printfn "writing tables to log"; stdout.Flush();
+ OutputLalrTables logStream (prods, states, startKernelIdxs, actionTable, immediateActionTable, gotoTable, (termTab.ToIndex endOfInputTerminal), errorTerminalIdx));
+
+ let states = states |> Array.map (Set.toList >> List.map prodIdx_of_item0)
+ (prods, states, startKernelIdxs,
+ actionTable, immediateActionTable, gotoTable,
+ (termTab.ToIndex endOfInputTerminal),
+ errorTerminalIdx, nonTerminals)
+
+
+(* Some examples for testing *)
+
+(*
+
+let example1 =
+ let e = "E"
+ let t = "Terminal"
+ let plus = "+"
+ let mul = "*"
+ let f = "F"
+ let lparen = "("
+ let rparen = ")"
+ let id = "id"
+
+ let terminals = [plus; mul; lparen; rparen; id]
+ let nonTerminals = [e; t; f]
+
+ let p2 = e, (NonAssoc, ExplicitPrec 1), [NonTerminal e; Terminal plus; NonTerminal t], None
+ let p3 = e, (NonAssoc, ExplicitPrec 2), [NonTerminal t], None in
+ let p4 = t, (NonAssoc, ExplicitPrec 3), [NonTerminal t; Terminal mul; NonTerminal f], None
+ let p5 = t, (NonAssoc, ExplicitPrec 4), [NonTerminal f], None
+ let p6 = f, (NonAssoc, ExplicitPrec 5), [Terminal lparen; NonTerminal e; Terminal rparen], None
+ let p7 = f, (NonAssoc, ExplicitPrec 6), [Terminal id], None
+
+ let prods = [p2;p3;p4;p5;p6;p7]
+ Spec(terminals,nonTerminals,prods, [e])
+
+let example2 =
+ let prods = [ "S", (NonAssoc, ExplicitPrec 1), [NonTerminal "C";NonTerminal "C"], None;
+ "C", (NonAssoc, ExplicitPrec 2), [Terminal "c";NonTerminal "C"], None ;
+ "C", (NonAssoc, ExplicitPrec 3), [Terminal "d"] , None ]in
+ Spec(["c";"d"],["S";"C"],prods, ["S"])
+
+let example3 =
+ let terminals = ["+"; "*"; "("; ")"; "id"]
+ let nonTerminals = ["E"; "Terminal"; "E'"; "F"; "Terminal'"]
+ let prods = [ "E", (NonAssoc, ExplicitPrec 1), [ NonTerminal "Terminal"; NonTerminal "E'" ], None;
+ "E'", (NonAssoc, ExplicitPrec 2), [ Terminal "+"; NonTerminal "Terminal"; NonTerminal "E'"], None;
+ "E'", (NonAssoc, ExplicitPrec 3), [ ], None;
+ "Terminal", (NonAssoc, ExplicitPrec 4), [ NonTerminal "F"; NonTerminal "Terminal'" ], None;
+ "Terminal'", (NonAssoc, ExplicitPrec 5), [ Terminal "*"; NonTerminal "F"; NonTerminal "Terminal'"], None;
+ "Terminal'", (NonAssoc, ExplicitPrec 6), [ ], None;
+ "F", (NonAssoc, ExplicitPrec 7), [ Terminal "("; NonTerminal "E"; Terminal ")"], None;
+ "F", (NonAssoc, ExplicitPrec 8), [ Terminal "id"], None ]
+ Spec(terminals,nonTerminals,prods, ["E"])
+
+let example4 =
+ let terminals = ["+"; "*"; "("; ")"; "id"]
+ let nonTerminals = ["E"]
+ let prods = [ "E", (NonAssoc, ExplicitPrec 1), [ NonTerminal "E"; Terminal "+"; NonTerminal "E" ], None;
+ "E", (NonAssoc, ExplicitPrec 2), [ NonTerminal "E"; Terminal "*"; NonTerminal "E" ], None;
+ "E", (NonAssoc, ExplicitPrec 3), [ Terminal "("; NonTerminal "E"; Terminal ")"], None;
+ "E", (NonAssoc, ExplicitPrec 8), [ Terminal "id"], None ]
+ Spec(terminals,nonTerminals,prods, ["E"])
+
+let example5 =
+ let terminals = ["+"; "*"; "("; ")"; "id"]
+ let nonTerminals = ["E"]
+ let prods = [ "E", (NonAssoc, ExplicitPrec 1), [ NonTerminal "E"; Terminal "+"; NonTerminal "E" ], None;
+ "E", (NonAssoc, ExplicitPrec 2), [ NonTerminal "E"; Terminal "*"; NonTerminal "E" ], None;
+ "E", (NonAssoc, ExplicitPrec 3), [ Terminal "("; NonTerminal "E"; Terminal ")"], None;
+ "E", (NonAssoc, ExplicitPrec 8), [ Terminal "id"], None ]
+ Spec(terminals,nonTerminals,prods, ["E"])
+
+let example6 =
+ let terminals = ["+"; "*"; "("; ")"; "id"; "-"]
+ let nonTerminals = ["E"]
+ let prods = [ "E", (RightAssoc, ExplicitPrec 1), [ NonTerminal "E"; Terminal "-"; NonTerminal "E" ], None;
+ "E", (LeftAssoc, ExplicitPrec 1), [ NonTerminal "E"; Terminal "+"; NonTerminal "E" ], None;
+ "E", (LeftAssoc, ExplicitPrec 2), [ NonTerminal "E"; Terminal "*"; NonTerminal "E" ], None;
+ "E", (NonAssoc, ExplicitPrec 3), [ Terminal "("; NonTerminal "E"; Terminal ")"], None;
+ "E", (NonAssoc, ExplicitPrec 8), [ Terminal "id"], None ]
+ Spec(terminals,nonTerminals,prods, ["E"])
+
+
+let example7 =
+ let prods = [ "S", (NonAssoc, ExplicitPrec 1), [NonTerminal "L";Terminal "="; NonTerminal "R"], None;
+ "S", (NonAssoc, ExplicitPrec 2), [NonTerminal "R"], None ;
+ "L", (NonAssoc, ExplicitPrec 3), [Terminal "*"; NonTerminal "R"], None;
+ "L", (NonAssoc, ExplicitPrec 3), [Terminal "id"], None;
+ "R", (NonAssoc, ExplicitPrec 3), [NonTerminal "L"], None; ]
+ Spec(["*";"=";"id"],["S";"L";"R"],prods, ["S"])
+
+
+
+let test ex = CompilerLalrParserSpec stdout ex
+
+(* let _ = test example2*)
+(* let _ = exit 1*)
+(* let _ = test example3
+let _ = test example1
+let _ = test example4
+let _ = test example5
+let _ = test example6 *)
+*)
diff --git a/src/buildtools/fsyacc/fsyacclex.fs b/src/buildtools/fsyacc/fsyacclex.fs
new file mode 100644
index 0000000000..a035f6fe01
--- /dev/null
+++ b/src/buildtools/fsyacc/fsyacclex.fs
@@ -0,0 +1,644 @@
+# 1 "fsyacclex.fsl"
+
+(* (c) Microsoft Corporation 2005-2008. *)
+
+module internal FsLexYacc.FsYacc.Lexer
+
+open FsLexYacc.FsYacc.AST
+open FsLexYacc.FsYacc.Parser
+open System.Text
+open Internal.Utilities.Text.Lexing
+
+let lexeme (lexbuf : LexBuffer) = new System.String(lexbuf.Lexeme)
+let newline (lexbuf:LexBuffer<_>) = lexbuf.EndPos <- lexbuf.EndPos.NextLine
+
+let unexpected_char lexbuf =
+ failwith ("Unexpected character '"+(lexeme lexbuf)+"'")
+
+let typeDepth = ref 0
+let startPos = ref Position.Empty
+let mutable str_buf = new System.Text.StringBuilder()
+
+let appendBuf (str:string) = str_buf.Append str |> ignore
+let clearBuf () = str_buf <- new System.Text.StringBuilder()
+
+
+# 26 "fsyacclex.fs"
+let trans : uint16[] array =
+ [|
+ (* State 0 *)
+ [| 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 2us; 6us; 6us; 3us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 7us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 4us; 6us; 6us; 6us; 6us; 1us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 6us; 5us; |];
+ (* 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; 11us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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; |];
+ (* State 3 *)
+ [| 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; |];
+ (* State 4 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 9us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 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; |];
+ (* State 6 *)
+ [| 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 65535us; 8us; 8us; 65535us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 65535us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 65535us; 8us; 8us; 8us; 8us; 65535us; 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; 65535us; |];
+ (* State 7 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 *)
+ [| 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 65535us; 8us; 8us; 65535us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 65535us; 8us; 8us; 8us; 8us; 8us; 8us; 8us; 65535us; 8us; 8us; 8us; 8us; 65535us; 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; 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; |];
+ (* 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; |];
+ (* 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; |];
+ (* State 12 *)
+ [| 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 17us; 15us; 19us; 19us; 16us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 17us; 19us; 14us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 19us; 13us; 19us; 19us; 19us; 19us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 17us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 19us; 18us; |];
+ (* State 13 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 22us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 22us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 14 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 15 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 16 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 21us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 17 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 20us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 20us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 18 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 19 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 20 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 20us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 20us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 20us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 21 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 22 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 23 *)
+ [| 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 30us; 26us; 33us; 33us; 27us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 30us; 33us; 29us; 33us; 33us; 33us; 33us; 28us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 31us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 33us; 33us; 33us; 33us; 33us; 33us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 30us; 25us; 33us; 24us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 33us; 32us; |];
+ (* State 24 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 25 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 26 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 27 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 41us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 28 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 37us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 38us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 29 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 30 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 36us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 36us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 31 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 34us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 32 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 33 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 34 *)
+ [| 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 65535us; 35us; 35us; 65535us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 65535us; |];
+ (* State 35 *)
+ [| 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 65535us; 35us; 35us; 65535us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 35us; 65535us; |];
+ (* State 36 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 36us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 36us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 36us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 37 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 40us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 38 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 39us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 39 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 40us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 40 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 41 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 42 *)
+ [| 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 46us; 44us; 51us; 51us; 45us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 46us; 51us; 49us; 51us; 51us; 43us; 51us; 48us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 47us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 51us; 51us; 51us; 51us; 51us; 51us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 46us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 51us; 50us; |];
+ (* State 43 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 60us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 44 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 45 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 59us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 46 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 47 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 56us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 48 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 52us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 53us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 49 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 50 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 51 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 52 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 53 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 54us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 54 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 55 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 56 *)
+ [| 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 65535us; 57us; 57us; 65535us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 65535us; |];
+ (* State 57 *)
+ [| 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 65535us; 57us; 57us; 65535us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 57us; 65535us; |];
+ (* State 58 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 58us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 59 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 60 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 61 *)
+ [| 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 62us; 64us; 63us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 64us; 65535us; |];
+ (* State 62 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 63 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 64 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 65 *)
+ [| 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 72us; 73us; 79us; 79us; 74us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 72us; 79us; 79us; 79us; 79us; 66us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 77us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 78us; 70us; 68us; 79us; 69us; 79us; 79us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 79us; 79us; 79us; 79us; 79us; 79us; 75us; 75us; 75us; 75us; 67us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 75us; 71us; 76us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 79us; 80us; |];
+ (* State 66 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 92us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 96us; 65535us; 98us; 65535us; 95us; 65535us; 97us; 94us; 93us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 91us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 67 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 84us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 65535us; 65535us; 65535us; 65535us; 84us; 65535us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 87us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 68 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 69 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 70 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 71 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 72 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 86us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 86us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 73 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 74 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 85us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 75 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 84us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 65535us; 65535us; 65535us; 65535us; 84us; 65535us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 76 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 77 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 81us; 65535us; 65535us; 65535us; 65535us; 82us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 78 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 79 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 80 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 81 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 82 *)
+ [| 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 65535us; 83us; 83us; 65535us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 65535us; |];
+ (* State 83 *)
+ [| 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 65535us; 83us; 83us; 65535us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 83us; 65535us; |];
+ (* State 84 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 84us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 65535us; 65535us; 65535us; 65535us; 84us; 65535us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 85 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 86 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 86us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 86us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 87 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 84us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 65535us; 65535us; 65535us; 65535us; 84us; 65535us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 88us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 88 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 84us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 65535us; 65535us; 65535us; 65535us; 84us; 65535us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 89us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 89 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 84us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 65535us; 65535us; 65535us; 65535us; 84us; 65535us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 90us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 90 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 84us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 65535us; 65535us; 65535us; 65535us; 84us; 65535us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 84us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 91 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 92 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 93 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 120us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 121us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 94 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 116us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 95 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 113us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 96 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 110us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 97 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 106us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 98 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 99us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 99 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 100us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 100 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 101us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 101 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 102us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 102 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 103us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 103 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 104us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 104 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 105us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 105 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 106 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 107us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 107 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 108us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 108 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 109us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 109 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 110 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 111us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 111 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 112us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 112 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 113 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 114us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 114 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 115us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 115 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 116 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 117us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 117 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 118us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 118 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 119us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 119 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 120 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 126us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 121 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 122us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 122 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 123us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 123 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 125us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 125us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 124us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 124 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 125 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 125us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 125us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 124us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 126 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 127us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 127 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 128us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 128 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 130us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 130us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 129us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 129 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 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 130 *)
+ [| 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 130us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 130us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 129us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; |];
+ |]
+let actions : uint16[] = [|65535us; 5us; 1us; 5us; 5us; 3us; 4us; 5us; 4us; 2us; 1us; 0us; 65535us; 5us; 1us; 2us; 5us; 3us; 4us; 5us; 3us; 2us; 0us; 65535us; 0us; 1us; 2us; 8us; 8us; 4us; 5us; 8us; 7us; 8us; 6us; 6us; 5us; 65535us; 65535us; 65535us; 3us; 2us; 65535us; 7us; 1us; 7us; 2us; 7us; 7us; 5us; 6us; 7us; 65535us; 65535us; 65535us; 4us; 3us; 3us; 2us; 1us; 0us; 65535us; 0us; 1us; 2us; 65535us; 22us; 17us; 11us; 12us; 13us; 14us; 15us; 16us; 22us; 17us; 18us; 22us; 21us; 22us; 23us; 19us; 20us; 20us; 17us; 16us; 15us; 17us; 17us; 17us; 10us; 0us; 1us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 9us; 65535us; 65535us; 65535us; 8us; 65535us; 65535us; 7us; 65535us; 65535us; 5us; 65535us; 65535us; 65535us; 4us; 65535us; 65535us; 65535us; 65535us; 6us; 65535us; 65535us; 65535us; 3us; 2us; 65535us; |]
+let _fslex_tables = Internal.Utilities.Text.Lexing.UnicodeTables.Create(trans,actions)
+let rec _fslex_dummy () = _fslex_dummy()
+(* Rule token *)
+and token (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_token 65 lexbuf
+(* Rule fs_type *)
+and fs_type (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_fs_type 61 lexbuf
+(* Rule header *)
+and header p buff (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_header p buff 42 lexbuf
+(* Rule code *)
+and code p buff (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_code p buff 23 lexbuf
+(* Rule codestring *)
+and codestring buff (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_codestring buff 12 lexbuf
+(* Rule comment *)
+and comment (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_comment 0 lexbuf
+(* Rule token *)
+and _fslex_token _fslex_state lexbuf =
+ match _fslex_tables.Interpret(_fslex_state,lexbuf) with
+ | 0 -> (
+# 35 "fsyacclex.fsl"
+ let p = lexbuf.StartPos in header p (new StringBuilder 100) lexbuf
+# 313 "fsyacclex.fs"
+ )
+ | 1 -> (
+# 36 "fsyacclex.fsl"
+ PERCENT_PERCENT
+# 318 "fsyacclex.fs"
+ )
+ | 2 -> (
+# 37 "fsyacclex.fsl"
+ typeDepth := 1; startPos := lexbuf.StartPos; clearBuf(); TOKEN (fs_type lexbuf)
+# 323 "fsyacclex.fs"
+ )
+ | 3 -> (
+# 38 "fsyacclex.fsl"
+ TOKEN (None)
+# 328 "fsyacclex.fs"
+ )
+ | 4 -> (
+# 39 "fsyacclex.fsl"
+ START
+# 333 "fsyacclex.fs"
+ )
+ | 5 -> (
+# 40 "fsyacclex.fsl"
+ PREC
+# 338 "fsyacclex.fs"
+ )
+ | 6 -> (
+# 41 "fsyacclex.fsl"
+ typeDepth := 1; startPos := lexbuf.StartPos; clearBuf(); TYPE (match fs_type lexbuf with Some x -> x | None -> failwith "gettype")
+# 343 "fsyacclex.fs"
+ )
+ | 7 -> (
+# 42 "fsyacclex.fsl"
+ LEFT
+# 348 "fsyacclex.fs"
+ )
+ | 8 -> (
+# 43 "fsyacclex.fsl"
+ RIGHT
+# 353 "fsyacclex.fs"
+ )
+ | 9 -> (
+# 44 "fsyacclex.fsl"
+ NONASSOC
+# 358 "fsyacclex.fs"
+ )
+ | 10 -> (
+# 45 "fsyacclex.fsl"
+ ERROR
+# 363 "fsyacclex.fs"
+ )
+ | 11 -> (
+# 46 "fsyacclex.fsl"
+ LESS
+# 368 "fsyacclex.fs"
+ )
+ | 12 -> (
+# 47 "fsyacclex.fsl"
+ GREATER
+# 373 "fsyacclex.fs"
+ )
+ | 13 -> (
+# 48 "fsyacclex.fsl"
+ SEMI
+# 378 "fsyacclex.fs"
+ )
+ | 14 -> (
+# 49 "fsyacclex.fsl"
+ let p = lexbuf.StartPos in
+ let buff = (new StringBuilder 100) in
+ // adjust the first line to get even indentation for all lines w.r.t. the left hand margin
+ buff.Append (String.replicate (lexbuf.StartPos.Column+1) " ") |> ignore;
+ code p buff lexbuf
+# 387 "fsyacclex.fs"
+ )
+ | 15 -> (
+# 54 "fsyacclex.fsl"
+ token lexbuf
+# 392 "fsyacclex.fs"
+ )
+ | 16 -> (
+# 55 "fsyacclex.fsl"
+ newline lexbuf; token lexbuf
+# 397 "fsyacclex.fs"
+ )
+ | 17 -> (
+# 56 "fsyacclex.fsl"
+ IDENT (lexeme lexbuf)
+# 402 "fsyacclex.fs"
+ )
+ | 18 -> (
+# 57 "fsyacclex.fsl"
+ BAR
+# 407 "fsyacclex.fs"
+ )
+ | 19 -> (
+# 58 "fsyacclex.fsl"
+ ignore(comment lexbuf); token lexbuf
+# 412 "fsyacclex.fs"
+ )
+ | 20 -> (
+# 59 "fsyacclex.fsl"
+ token lexbuf
+# 417 "fsyacclex.fs"
+ )
+ | 21 -> (
+# 60 "fsyacclex.fsl"
+ COLON
+# 422 "fsyacclex.fs"
+ )
+ | 22 -> (
+# 61 "fsyacclex.fsl"
+ unexpected_char lexbuf
+# 427 "fsyacclex.fs"
+ )
+ | 23 -> (
+# 62 "fsyacclex.fsl"
+ EOF
+# 432 "fsyacclex.fs"
+ )
+ | _ -> failwith "token"
+(* Rule fs_type *)
+and _fslex_fs_type _fslex_state lexbuf =
+ match _fslex_tables.Interpret(_fslex_state,lexbuf) with
+ | 0 -> (
+# 65 "fsyacclex.fsl"
+ incr typeDepth; appendBuf(lexeme lexbuf); fs_type lexbuf
+# 441 "fsyacclex.fs"
+ )
+ | 1 -> (
+# 67 "fsyacclex.fsl"
+ decr typeDepth;
+ if !typeDepth = 0
+ then Some(string str_buf)
+ else appendBuf(lexeme lexbuf); fs_type lexbuf
+# 449 "fsyacclex.fs"
+ )
+ | 2 -> (
+# 71 "fsyacclex.fsl"
+ appendBuf(lexeme lexbuf); fs_type lexbuf
+# 454 "fsyacclex.fs"
+ )
+ | _ -> failwith "fs_type"
+(* Rule header *)
+and _fslex_header p buff _fslex_state lexbuf =
+ match _fslex_tables.Interpret(_fslex_state,lexbuf) with
+ | 0 -> (
+# 74 "fsyacclex.fsl"
+ HEADER (buff.ToString(), p)
+# 463 "fsyacclex.fs"
+ )
+ | 1 -> (
+# 75 "fsyacclex.fsl"
+ newline lexbuf;
+ ignore <| buff.Append System.Environment.NewLine;
+ header p buff lexbuf
+# 470 "fsyacclex.fs"
+ )
+ | 2 -> (
+# 79 "fsyacclex.fsl"
+ ignore <| buff.Append (lexeme lexbuf);
+ header p buff lexbuf
+# 476 "fsyacclex.fs"
+ )
+ | 3 -> (
+# 82 "fsyacclex.fsl"
+ ignore <| buff.Append (lexeme lexbuf);
+ header p buff lexbuf
+# 482 "fsyacclex.fs"
+ )
+ | 4 -> (
+# 85 "fsyacclex.fsl"
+ ignore <| buff.Append (lexeme lexbuf);
+ header p buff lexbuf
+# 488 "fsyacclex.fs"
+ )
+ | 5 -> (
+# 88 "fsyacclex.fsl"
+ ignore <| buff.Append (lexeme lexbuf);
+ ignore(codestring buff lexbuf);
+ header p buff lexbuf
+# 495 "fsyacclex.fs"
+ )
+ | 6 -> (
+# 91 "fsyacclex.fsl"
+ EOF
+# 500 "fsyacclex.fs"
+ )
+ | 7 -> (
+# 92 "fsyacclex.fsl"
+ ignore <| buff.Append(lexeme lexbuf).[0];
+ header p buff lexbuf
+# 506 "fsyacclex.fs"
+ )
+ | _ -> failwith "header"
+(* Rule code *)
+and _fslex_code p buff _fslex_state lexbuf =
+ match _fslex_tables.Interpret(_fslex_state,lexbuf) with
+ | 0 -> (
+# 95 "fsyacclex.fsl"
+ CODE (buff.ToString(), p)
+# 515 "fsyacclex.fs"
+ )
+ | 1 -> (
+# 96 "fsyacclex.fsl"
+ ignore <| buff.Append (lexeme lexbuf);
+ ignore(code p buff lexbuf);
+ ignore <| buff.Append "}";
+ code p buff lexbuf
+# 523 "fsyacclex.fs"
+ )
+ | 2 -> (
+# 100 "fsyacclex.fsl"
+ newline lexbuf;
+ ignore <| buff.Append System.Environment.NewLine;
+ code p buff lexbuf
+# 530 "fsyacclex.fs"
+ )
+ | 3 -> (
+# 104 "fsyacclex.fsl"
+ ignore <| buff.Append (lexeme lexbuf);
+ code p buff lexbuf
+# 536 "fsyacclex.fs"
+ )
+ | 4 -> (
+# 106 "fsyacclex.fsl"
+ ignore <| buff.Append (lexeme lexbuf);
+ ignore(codestring buff lexbuf);
+ code p buff lexbuf
+# 543 "fsyacclex.fs"
+ )
+ | 5 -> (
+# 110 "fsyacclex.fsl"
+ ignore <| buff.Append (lexeme lexbuf);
+ code p buff lexbuf
+# 549 "fsyacclex.fs"
+ )
+ | 6 -> (
+# 113 "fsyacclex.fsl"
+ ignore <| buff.Append (lexeme lexbuf);
+ code p buff lexbuf
+# 555 "fsyacclex.fs"
+ )
+ | 7 -> (
+# 115 "fsyacclex.fsl"
+ EOF
+# 560 "fsyacclex.fs"
+ )
+ | 8 -> (
+# 116 "fsyacclex.fsl"
+ ignore <| buff.Append(lexeme lexbuf).[0];
+ code p buff lexbuf
+# 566 "fsyacclex.fs"
+ )
+ | _ -> failwith "code"
+(* Rule codestring *)
+and _fslex_codestring buff _fslex_state lexbuf =
+ match _fslex_tables.Interpret(_fslex_state,lexbuf) with
+ | 0 -> (
+# 122 "fsyacclex.fsl"
+ ignore <| buff.Append (lexeme lexbuf);
+ codestring buff lexbuf
+# 576 "fsyacclex.fs"
+ )
+ | 1 -> (
+# 124 "fsyacclex.fsl"
+ ignore <| buff.Append (lexeme lexbuf);
+ buff.ToString()
+# 582 "fsyacclex.fs"
+ )
+ | 2 -> (
+# 126 "fsyacclex.fsl"
+ newline lexbuf;
+ ignore <| buff.Append System.Environment.NewLine;
+ codestring buff lexbuf
+# 589 "fsyacclex.fs"
+ )
+ | 3 -> (
+# 130 "fsyacclex.fsl"
+ ignore <| buff.Append (lexeme lexbuf);
+ codestring buff lexbuf
+# 595 "fsyacclex.fs"
+ )
+ | 4 -> (
+# 132 "fsyacclex.fsl"
+ failwith "unterminated string in code"
+# 600 "fsyacclex.fs"
+ )
+ | 5 -> (
+# 133 "fsyacclex.fsl"
+ ignore <| buff.Append(lexeme lexbuf).[0];
+ codestring buff lexbuf
+# 606 "fsyacclex.fs"
+ )
+ | _ -> failwith "codestring"
+(* Rule comment *)
+and _fslex_comment _fslex_state lexbuf =
+ match _fslex_tables.Interpret(_fslex_state,lexbuf) with
+ | 0 -> (
+# 138 "fsyacclex.fsl"
+ ignore(comment lexbuf); comment lexbuf
+# 615 "fsyacclex.fs"
+ )
+ | 1 -> (
+# 139 "fsyacclex.fsl"
+ newline lexbuf; comment lexbuf
+# 620 "fsyacclex.fs"
+ )
+ | 2 -> (
+# 140 "fsyacclex.fsl"
+ ()
+# 625 "fsyacclex.fs"
+ )
+ | 3 -> (
+# 141 "fsyacclex.fsl"
+ failwith "end of file in comment"
+# 630 "fsyacclex.fs"
+ )
+ | 4 -> (
+# 142 "fsyacclex.fsl"
+ comment lexbuf
+# 635 "fsyacclex.fs"
+ )
+ | 5 -> (
+# 143 "fsyacclex.fsl"
+ comment lexbuf
+# 640 "fsyacclex.fs"
+ )
+ | _ -> failwith "comment"
+
+# 3000000 "fsyacclex.fs"
diff --git a/src/buildtools/fsyacc/fsyaccpars.fs b/src/buildtools/fsyacc/fsyaccpars.fs
new file mode 100644
index 0000000000..c6d614f269
--- /dev/null
+++ b/src/buildtools/fsyacc/fsyaccpars.fs
@@ -0,0 +1,562 @@
+// Implementation file for parser generated by fsyacc
+module internal FsLexYacc.FsYacc.Parser
+#nowarn "64";; // turn off warnings that type variables used in production annotations are instantiated to concrete type
+open Internal.Utilities.Text.Lexing
+open Internal.Utilities.Text.Parsing.ParseHelpers
+# 1 "fsyaccpars.fsy"
+
+(* (c) Microsoft Corporation 2005-2008. *)
+
+// FsLexYacc.FsYacc.Parser
+
+open FsLexYacc.FsYacc
+open FsLexYacc.FsYacc.AST
+
+#nowarn "62" // This construct is for ML compatibility
+
+
+# 18 "fsyaccpars.fs"
+// This type is the type of tokens accepted by the parser
+type token =
+ | TOKEN of (string option)
+ | TYPE of (string)
+ | BAR
+ | PERCENT_PERCENT
+ | START
+ | LEFT
+ | RIGHT
+ | NONASSOC
+ | LESS
+ | GREATER
+ | COLON
+ | PREC
+ | SEMI
+ | EOF
+ | ERROR
+ | HEADER of (AST.Code)
+ | CODE of (AST.Code)
+ | IDENT of (string)
+// This type is used to give symbolic names to token indexes, useful for error messages
+type tokenId =
+ | TOKEN_TOKEN
+ | TOKEN_TYPE
+ | TOKEN_BAR
+ | TOKEN_PERCENT_PERCENT
+ | TOKEN_START
+ | TOKEN_LEFT
+ | TOKEN_RIGHT
+ | TOKEN_NONASSOC
+ | TOKEN_LESS
+ | TOKEN_GREATER
+ | TOKEN_COLON
+ | TOKEN_PREC
+ | TOKEN_SEMI
+ | TOKEN_EOF
+ | TOKEN_ERROR
+ | TOKEN_HEADER
+ | TOKEN_CODE
+ | TOKEN_IDENT
+ | TOKEN_end_of_input
+ | TOKEN_error
+// This type is used to give symbolic names to token indexes, useful for error messages
+type nonTerminalId =
+ | NONTERM__startspec
+ | NONTERM_spec
+ | NONTERM_headeropt
+ | NONTERM_decls
+ | NONTERM_decl
+ | NONTERM_idents
+ | NONTERM_rules
+ | NONTERM_rule
+ | NONTERM_optbar
+ | NONTERM_optsemi
+ | NONTERM_clauses
+ | NONTERM_clause
+ | NONTERM_syms
+ | NONTERM_optprec
+
+// This function maps tokens to integer indexes
+let tagOfToken (t:token) =
+ match t with
+ | TOKEN _ -> 0
+ | TYPE _ -> 1
+ | BAR -> 2
+ | PERCENT_PERCENT -> 3
+ | START -> 4
+ | LEFT -> 5
+ | RIGHT -> 6
+ | NONASSOC -> 7
+ | LESS -> 8
+ | GREATER -> 9
+ | COLON -> 10
+ | PREC -> 11
+ | SEMI -> 12
+ | EOF -> 13
+ | ERROR -> 14
+ | HEADER _ -> 15
+ | CODE _ -> 16
+ | IDENT _ -> 17
+
+// This function maps integer indexes to symbolic token ids
+let tokenTagToTokenId (tokenIdx:int) =
+ match tokenIdx with
+ | 0 -> TOKEN_TOKEN
+ | 1 -> TOKEN_TYPE
+ | 2 -> TOKEN_BAR
+ | 3 -> TOKEN_PERCENT_PERCENT
+ | 4 -> TOKEN_START
+ | 5 -> TOKEN_LEFT
+ | 6 -> TOKEN_RIGHT
+ | 7 -> TOKEN_NONASSOC
+ | 8 -> TOKEN_LESS
+ | 9 -> TOKEN_GREATER
+ | 10 -> TOKEN_COLON
+ | 11 -> TOKEN_PREC
+ | 12 -> TOKEN_SEMI
+ | 13 -> TOKEN_EOF
+ | 14 -> TOKEN_ERROR
+ | 15 -> TOKEN_HEADER
+ | 16 -> TOKEN_CODE
+ | 17 -> TOKEN_IDENT
+ | 20 -> TOKEN_end_of_input
+ | 18 -> TOKEN_error
+ | _ -> failwith "tokenTagToTokenId: bad token"
+
+/// This function maps production indexes returned in syntax errors to strings representing the non terminal that would be produced by that production
+let prodIdxToNonTerminal (prodIdx:int) =
+ match prodIdx with
+ | 0 -> NONTERM__startspec
+ | 1 -> NONTERM_spec
+ | 2 -> NONTERM_headeropt
+ | 3 -> NONTERM_headeropt
+ | 4 -> NONTERM_decls
+ | 5 -> NONTERM_decls
+ | 6 -> NONTERM_decl
+ | 7 -> NONTERM_decl
+ | 8 -> NONTERM_decl
+ | 9 -> NONTERM_decl
+ | 10 -> NONTERM_decl
+ | 11 -> NONTERM_decl
+ | 12 -> NONTERM_idents
+ | 13 -> NONTERM_idents
+ | 14 -> NONTERM_rules
+ | 15 -> NONTERM_rules
+ | 16 -> NONTERM_rule
+ | 17 -> NONTERM_optbar
+ | 18 -> NONTERM_optbar
+ | 19 -> NONTERM_optsemi
+ | 20 -> NONTERM_optsemi
+ | 21 -> NONTERM_clauses
+ | 22 -> NONTERM_clauses
+ | 23 -> NONTERM_clause
+ | 24 -> NONTERM_syms
+ | 25 -> NONTERM_syms
+ | 26 -> NONTERM_syms
+ | 27 -> NONTERM_optprec
+ | 28 -> NONTERM_optprec
+ | _ -> failwith "prodIdxToNonTerminal: bad production index"
+
+let _fsyacc_endOfInputTag = 20
+let _fsyacc_tagOfErrorTerminal = 18
+
+// This function gets the name of a token as a string
+let token_to_string (t:token) =
+ match t with
+ | TOKEN _ -> "TOKEN"
+ | TYPE _ -> "TYPE"
+ | BAR -> "BAR"
+ | PERCENT_PERCENT -> "PERCENT_PERCENT"
+ | START -> "START"
+ | LEFT -> "LEFT"
+ | RIGHT -> "RIGHT"
+ | NONASSOC -> "NONASSOC"
+ | LESS -> "LESS"
+ | GREATER -> "GREATER"
+ | COLON -> "COLON"
+ | PREC -> "PREC"
+ | SEMI -> "SEMI"
+ | EOF -> "EOF"
+ | ERROR -> "ERROR"
+ | HEADER _ -> "HEADER"
+ | CODE _ -> "CODE"
+ | IDENT _ -> "IDENT"
+
+// This function gets the data carried by a token as an object
+let _fsyacc_dataOfToken (t:token) =
+ match t with
+ | TOKEN _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x
+ | TYPE _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x
+ | BAR -> (null : System.Object)
+ | PERCENT_PERCENT -> (null : System.Object)
+ | START -> (null : System.Object)
+ | LEFT -> (null : System.Object)
+ | RIGHT -> (null : System.Object)
+ | NONASSOC -> (null : System.Object)
+ | LESS -> (null : System.Object)
+ | GREATER -> (null : System.Object)
+ | COLON -> (null : System.Object)
+ | PREC -> (null : System.Object)
+ | SEMI -> (null : System.Object)
+ | EOF -> (null : System.Object)
+ | ERROR -> (null : System.Object)
+ | HEADER _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x
+ | CODE _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x
+ | IDENT _fsyacc_x -> Microsoft.FSharp.Core.Operators.box _fsyacc_x
+let _fsyacc_gotos = [| 0us; 65535us; 1us; 65535us; 0us; 1us; 1us; 65535us; 0us; 2us; 2us; 65535us; 2us; 3us; 7us; 8us; 2us; 65535us; 2us; 7us; 7us; 7us; 7us; 65535us; 9us; 10us; 11us; 12us; 13us; 14us; 15us; 16us; 17us; 18us; 19us; 20us; 21us; 22us; 2us; 65535us; 4us; 5us; 23us; 24us; 2us; 65535us; 4us; 23us; 23us; 23us; 1us; 65535us; 26us; 27us; 1us; 65535us; 28us; 29us; 2us; 65535us; 27us; 28us; 33us; 34us; 2us; 65535us; 27us; 32us; 33us; 32us; 4us; 65535us; 27us; 35us; 33us; 35us; 38us; 39us; 40us; 41us; 1us; 65535us; 35us; 36us; |]
+let _fsyacc_sparseGotoTableRowOffsets = [|0us; 1us; 3us; 5us; 8us; 11us; 19us; 22us; 25us; 27us; 29us; 32us; 35us; 40us; |]
+let _fsyacc_stateToProdIdxsTableElements = [| 1us; 0us; 1us; 0us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 1us; 2us; 1us; 5us; 1us; 5us; 1us; 6us; 1us; 6us; 1us; 7us; 1us; 7us; 1us; 8us; 1us; 8us; 1us; 9us; 1us; 9us; 1us; 10us; 1us; 10us; 1us; 11us; 1us; 11us; 1us; 12us; 1us; 12us; 2us; 14us; 15us; 1us; 14us; 1us; 16us; 1us; 16us; 1us; 16us; 1us; 16us; 1us; 16us; 1us; 18us; 1us; 20us; 2us; 21us; 22us; 1us; 21us; 1us; 21us; 1us; 23us; 1us; 23us; 1us; 23us; 1us; 24us; 1us; 24us; 1us; 25us; 1us; 25us; 1us; 28us; 1us; 28us; |]
+let _fsyacc_stateToProdIdxsTableRowOffsets = [|0us; 2us; 4us; 6us; 8us; 10us; 12us; 14us; 16us; 18us; 20us; 22us; 24us; 26us; 28us; 30us; 32us; 34us; 36us; 38us; 40us; 42us; 44us; 46us; 49us; 51us; 53us; 55us; 57us; 59us; 61us; 63us; 65us; 68us; 70us; 72us; 74us; 76us; 78us; 80us; 82us; 84us; 86us; 88us; |]
+let _fsyacc_action_rows = 44
+let _fsyacc_actionTableElements = [|1us; 16387us; 15us; 6us; 0us; 49152us; 6us; 16388us; 0us; 9us; 1us; 11us; 4us; 13us; 5us; 15us; 6us; 17us; 7us; 19us; 1us; 32768us; 3us; 4us; 1us; 32768us; 17us; 25us; 0us; 16385us; 0us; 16386us; 6us; 16388us; 0us; 9us; 1us; 11us; 4us; 13us; 5us; 15us; 6us; 17us; 7us; 19us; 0us; 16389us; 1us; 16397us; 17us; 21us; 0us; 16390us; 1us; 16397us; 17us; 21us; 0us; 16391us; 1us; 16397us; 17us; 21us; 0us; 16392us; 1us; 16397us; 17us; 21us; 0us; 16393us; 1us; 16397us; 17us; 21us; 0us; 16394us; 1us; 16397us; 17us; 21us; 0us; 16395us; 1us; 16397us; 17us; 21us; 0us; 16396us; 1us; 16399us; 17us; 25us; 0us; 16398us; 1us; 32768us; 10us; 26us; 1us; 16401us; 2us; 30us; 2us; 16410us; 14us; 40us; 17us; 38us; 1us; 16403us; 12us; 31us; 0us; 16400us; 0us; 16402us; 0us; 16404us; 1us; 16406us; 2us; 33us; 2us; 16410us; 14us; 40us; 17us; 38us; 0us; 16405us; 1us; 16411us; 11us; 42us; 1us; 32768us; 16us; 37us; 0us; 16407us; 2us; 16410us; 14us; 40us; 17us; 38us; 0us; 16408us; 2us; 16410us; 14us; 40us; 17us; 38us; 0us; 16409us; 1us; 32768us; 17us; 43us; 0us; 16412us; |]
+let _fsyacc_actionTableRowOffsets = [|0us; 2us; 3us; 10us; 12us; 14us; 15us; 16us; 23us; 24us; 26us; 27us; 29us; 30us; 32us; 33us; 35us; 36us; 38us; 39us; 41us; 42us; 44us; 45us; 47us; 48us; 50us; 52us; 55us; 57us; 58us; 59us; 60us; 62us; 65us; 66us; 68us; 70us; 71us; 74us; 75us; 78us; 79us; 81us; |]
+let _fsyacc_reductionSymbolCounts = [|1us; 4us; 1us; 0us; 0us; 2us; 2us; 2us; 2us; 2us; 2us; 2us; 2us; 0us; 2us; 1us; 5us; 0us; 1us; 0us; 1us; 3us; 1us; 3us; 2us; 2us; 0us; 0us; 2us; |]
+let _fsyacc_productionToNonTerminalTable = [|0us; 1us; 2us; 2us; 3us; 3us; 4us; 4us; 4us; 4us; 4us; 4us; 5us; 5us; 6us; 6us; 7us; 8us; 8us; 9us; 9us; 10us; 10us; 11us; 12us; 12us; 12us; 13us; 13us; |]
+let _fsyacc_immediateActions = [|65535us; 49152us; 65535us; 65535us; 65535us; 16385us; 16386us; 65535us; 16389us; 65535us; 16390us; 65535us; 16391us; 65535us; 16392us; 65535us; 16393us; 65535us; 16394us; 65535us; 16395us; 65535us; 16396us; 65535us; 16398us; 65535us; 65535us; 65535us; 65535us; 16400us; 16402us; 16404us; 65535us; 65535us; 16405us; 65535us; 65535us; 16407us; 65535us; 16408us; 65535us; 16409us; 65535us; 16412us; |]
+let _fsyacc_reductions () = [|
+# 216 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : AST.ParserSpec)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+ raise (Internal.Utilities.Text.Parsing.Accept(Microsoft.FSharp.Core.Operators.box _1))
+ )
+ : '_startspec));
+# 225 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'headeropt)) in
+ let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'decls)) in
+ let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'rules)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 25 "fsyaccpars.fsy"
+ List.foldBack (fun f x -> f x) _2 { Header=_1;Tokens=[];Types=[];Associativities=[];StartSymbols=[];Rules=_4 }
+ )
+# 25 "fsyaccpars.fsy"
+ : AST.ParserSpec));
+# 238 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : AST.Code)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 29 "fsyaccpars.fsy"
+ _1
+ )
+# 29 "fsyaccpars.fsy"
+ : 'headeropt));
+# 249 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 31 "fsyaccpars.fsy"
+ "", (parseState.ResultRange |> fst)
+ )
+# 31 "fsyaccpars.fsy"
+ : 'headeropt));
+# 259 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 34 "fsyaccpars.fsy"
+ []
+ )
+# 34 "fsyaccpars.fsy"
+ : 'decls));
+# 269 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'decl)) in
+ let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'decls)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 35 "fsyaccpars.fsy"
+ _1 :: _2
+ )
+# 35 "fsyaccpars.fsy"
+ : 'decls));
+# 281 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string option)) in
+ let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'idents)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 38 "fsyaccpars.fsy"
+ (fun x -> {x with Tokens = x.Tokens @ (List.map (fun x -> (x,_1)) _2)})
+ )
+# 38 "fsyaccpars.fsy"
+ : 'decl));
+# 293 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in
+ let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'idents)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 39 "fsyaccpars.fsy"
+ (fun x -> {x with Types = x.Types @ (List.map (fun x -> (x,_1)) _2)} )
+ )
+# 39 "fsyaccpars.fsy"
+ : 'decl));
+# 305 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'idents)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 40 "fsyaccpars.fsy"
+ (fun x -> {x with StartSymbols = x.StartSymbols @ _2} )
+ )
+# 40 "fsyaccpars.fsy"
+ : 'decl));
+# 316 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'idents)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 41 "fsyaccpars.fsy"
+ (fun x -> {x with Associativities = x.Associativities @ [(List.map (fun x -> (x,LeftAssoc)) _2)]} )
+ )
+# 41 "fsyaccpars.fsy"
+ : 'decl));
+# 327 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'idents)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 42 "fsyaccpars.fsy"
+ (fun x -> {x with Associativities = x.Associativities @ [(List.map (fun x -> (x,RightAssoc)) _2)]} )
+ )
+# 42 "fsyaccpars.fsy"
+ : 'decl));
+# 338 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'idents)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 43 "fsyaccpars.fsy"
+ (fun x -> {x with Associativities = x.Associativities @ [(List.map (fun x -> (x,NonAssoc)) _2)]} )
+ )
+# 43 "fsyaccpars.fsy"
+ : 'decl));
+# 349 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in
+ let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'idents)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 45 "fsyaccpars.fsy"
+ _1 :: _2
+ )
+# 45 "fsyaccpars.fsy"
+ : 'idents));
+# 361 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 45 "fsyaccpars.fsy"
+ []
+ )
+# 45 "fsyaccpars.fsy"
+ : 'idents));
+# 371 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'rule)) in
+ let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'rules)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 46 "fsyaccpars.fsy"
+ _1 :: _2
+ )
+# 46 "fsyaccpars.fsy"
+ : 'rules));
+# 383 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'rule)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 46 "fsyaccpars.fsy"
+ [_1]
+ )
+# 46 "fsyaccpars.fsy"
+ : 'rules));
+# 394 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in
+ let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'optbar)) in
+ let _4 = (let data = parseState.GetInput(4) in (Microsoft.FSharp.Core.Operators.unbox data : 'clauses)) in
+ let _5 = (let data = parseState.GetInput(5) in (Microsoft.FSharp.Core.Operators.unbox data : 'optsemi)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 47 "fsyaccpars.fsy"
+ (_1,_4)
+ )
+# 47 "fsyaccpars.fsy"
+ : 'rule));
+# 408 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 48 "fsyaccpars.fsy"
+
+ )
+# 48 "fsyaccpars.fsy"
+ : 'optbar));
+# 418 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 48 "fsyaccpars.fsy"
+
+ )
+# 48 "fsyaccpars.fsy"
+ : 'optbar));
+# 428 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 49 "fsyaccpars.fsy"
+
+ )
+# 49 "fsyaccpars.fsy"
+ : 'optsemi));
+# 438 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 49 "fsyaccpars.fsy"
+
+ )
+# 49 "fsyaccpars.fsy"
+ : 'optsemi));
+# 448 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'clause)) in
+ let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : 'clauses)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 50 "fsyaccpars.fsy"
+ _1 :: _3
+ )
+# 50 "fsyaccpars.fsy"
+ : 'clauses));
+# 460 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'clause)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 50 "fsyaccpars.fsy"
+ [_1]
+ )
+# 50 "fsyaccpars.fsy"
+ : 'clauses));
+# 471 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : 'syms)) in
+ let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'optprec)) in
+ let _3 = (let data = parseState.GetInput(3) in (Microsoft.FSharp.Core.Operators.unbox data : AST.Code)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 51 "fsyaccpars.fsy"
+ Rule(_1,_2,Some _3)
+ )
+# 51 "fsyaccpars.fsy"
+ : 'clause));
+# 484 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _1 = (let data = parseState.GetInput(1) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in
+ let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'syms)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 52 "fsyaccpars.fsy"
+ _1 :: _2
+ )
+# 52 "fsyaccpars.fsy"
+ : 'syms));
+# 496 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : 'syms)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 52 "fsyaccpars.fsy"
+ "error" :: _2
+ )
+# 52 "fsyaccpars.fsy"
+ : 'syms));
+# 507 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 52 "fsyaccpars.fsy"
+ []
+ )
+# 52 "fsyaccpars.fsy"
+ : 'syms));
+# 517 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 53 "fsyaccpars.fsy"
+ None
+ )
+# 53 "fsyaccpars.fsy"
+ : 'optprec));
+# 527 "fsyaccpars.fs"
+ (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) ->
+ let _2 = (let data = parseState.GetInput(2) in (Microsoft.FSharp.Core.Operators.unbox data : string)) in
+ Microsoft.FSharp.Core.Operators.box
+ (
+ (
+# 53 "fsyaccpars.fsy"
+ Some _2
+ )
+# 53 "fsyaccpars.fsy"
+ : 'optprec));
+|]
+# 539 "fsyaccpars.fs"
+let tables () : Internal.Utilities.Text.Parsing.Tables<_> =
+ { reductions= _fsyacc_reductions ();
+ endOfInputTag = _fsyacc_endOfInputTag;
+ tagOfToken = tagOfToken;
+ dataOfToken = _fsyacc_dataOfToken;
+ actionTableElements = _fsyacc_actionTableElements;
+ actionTableRowOffsets = _fsyacc_actionTableRowOffsets;
+ stateToProdIdxsTableElements = _fsyacc_stateToProdIdxsTableElements;
+ stateToProdIdxsTableRowOffsets = _fsyacc_stateToProdIdxsTableRowOffsets;
+ reductionSymbolCounts = _fsyacc_reductionSymbolCounts;
+ immediateActions = _fsyacc_immediateActions;
+ gotos = _fsyacc_gotos;
+ sparseGotoTableRowOffsets = _fsyacc_sparseGotoTableRowOffsets;
+ tagOfErrorTerminal = _fsyacc_tagOfErrorTerminal;
+ parseError = (fun (ctxt:Internal.Utilities.Text.Parsing.ParseErrorContext<_>) ->
+ match parse_error_rich with
+ | Some f -> f ctxt
+ | None -> parse_error ctxt.Message);
+ numTerminals = 21;
+ productionToNonTerminalTable = _fsyacc_productionToNonTerminalTable }
+let engine lexer lexbuf startState = (tables ()).Interpret(lexer, lexbuf, startState)
+let spec lexer lexbuf : AST.ParserSpec =
+ Microsoft.FSharp.Core.Operators.unbox ((tables ()).Interpret(lexer, lexbuf, 0))
diff --git a/src/fsharp/AccessibilityLogic.fs b/src/fsharp/AccessibilityLogic.fs
index 7e2e2ef5d9..dcd8d5d801 100644
--- a/src/fsharp/AccessibilityLogic.fs
+++ b/src/fsharp/AccessibilityLogic.fs
@@ -194,9 +194,10 @@ let CheckTyconReprAccessible amap m ad tcref =
/// Indicates if a type is accessible (both definition and instantiation)
let rec IsTypeAccessible g amap m ad ty =
- not (isAppTy g ty) ||
- let tcref, tinst = destAppTy g ty
- IsEntityAccessible amap m ad tcref && IsTypeInstAccessible g amap m ad tinst
+ match tryAppTy g ty with
+ | ValueNone -> true
+ | ValueSome(tcref, tinst) ->
+ IsEntityAccessible amap m ad tcref && IsTypeInstAccessible g amap m ad tinst
and IsTypeInstAccessible g amap m ad tinst =
match tinst with
@@ -210,7 +211,7 @@ let IsProvidedMemberAccessible (amap:Import.ImportMap) m ad ty access =
if not isTyAccessible then false
else
not (isAppTy g ty) ||
- let tcrefOfViewedItem, _ = destAppTy g ty
+ let tcrefOfViewedItem = tcrefOfAppTy g ty
IsILMemberAccessible g amap m tcrefOfViewedItem ad access
/// Compute the accessibility of a provided member
diff --git a/src/fsharp/AttributeChecking.fs b/src/fsharp/AttributeChecking.fs
index 3be4a3a070..a28598d970 100644
--- a/src/fsharp/AttributeChecking.fs
+++ b/src/fsharp/AttributeChecking.fs
@@ -449,8 +449,8 @@ let MethInfoIsUnseen g m ty minfo =
// We are only interested in filtering out the method on System.Object, so it is sufficient
// just to look at the attributes on IL methods.
if tcref.IsILTycon then
- tcref.ILTyconRawMetadata.CustomAttrs.AsList
- |> List.exists (fun attr -> attr.Method.DeclaringType.TypeSpec.Name = typeof.FullName)
+ tcref.ILTyconRawMetadata.CustomAttrs.AsArray
+ |> Array.exists (fun attr -> attr.Method.DeclaringType.TypeSpec.Name = typeof.FullName)
else
false
#else
diff --git a/src/fsharp/CheckFormatStrings.fs b/src/fsharp/CheckFormatStrings.fs
index 4d532904a1..9d7fd72d7a 100755
--- a/src/fsharp/CheckFormatStrings.fs
+++ b/src/fsharp/CheckFormatStrings.fs
@@ -54,15 +54,15 @@ let parseFormatStringInternal (m:range) (g: TcGlobals) (context: FormatStringChe
let (offset, fmt) =
match context with
| Some context ->
- let length = context.NormalizedSource.Length
- if m.EndLine < context.LineEndPositions.Length then
- let startIndex = context.LineEndPositions.[m.StartLine-1] + m.StartColumn
- let endIndex = context.LineEndPositions.[m.EndLine-1] + m.EndColumn - 1
- if startIndex < length-3 && context.NormalizedSource.[startIndex..startIndex+2] = "\"\"\"" then
- (3, context.NormalizedSource.[startIndex+3..endIndex-3])
- elif startIndex < length-2 && context.NormalizedSource.[startIndex..startIndex+1] = "@\"" then
- (2, context.NormalizedSource.[startIndex+2..endIndex-1])
- else (1, context.NormalizedSource.[startIndex+1..endIndex-1])
+ let length = context.Source.Length
+ if m.EndLine < context.LineStartPositions.Length then
+ let startIndex = context.LineStartPositions.[m.StartLine-1] + m.StartColumn
+ let endIndex = context.LineStartPositions.[m.EndLine-1] + m.EndColumn - 1
+ if startIndex < length-3 && context.Source.[startIndex..startIndex+2] = "\"\"\"" then
+ (3, context.Source.[startIndex+3..endIndex-3])
+ elif startIndex < length-2 && context.Source.[startIndex..startIndex+1] = "@\"" then
+ (2, context.Source.[startIndex+2..endIndex-1])
+ else (1, context.Source.[startIndex+1..endIndex-1])
else (1, fmt)
| None -> (1, fmt)
diff --git a/src/fsharp/CompileOps.fs b/src/fsharp/CompileOps.fs
index d54373c554..830a08bf2f 100755
--- a/src/fsharp/CompileOps.fs
+++ b/src/fsharp/CompileOps.fs
@@ -960,12 +960,12 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) =
| Parser.TOKEN_RPAREN | Parser.TOKEN_RPAREN_COMING_SOON | Parser.TOKEN_RPAREN_IS_HERE -> getErrorString("Parser.TOKEN.RPAREN")
| Parser.TOKEN_LQUOTE -> getErrorString("Parser.TOKEN.LQUOTE")
| Parser.TOKEN_LBRACK -> getErrorString("Parser.TOKEN.LBRACK")
+ | Parser.TOKEN_LBRACE_BAR -> getErrorString("Parser.TOKEN.LBRACE.BAR")
| Parser.TOKEN_LBRACK_BAR -> getErrorString("Parser.TOKEN.LBRACK.BAR")
| Parser.TOKEN_LBRACK_LESS -> getErrorString("Parser.TOKEN.LBRACK.LESS")
| Parser.TOKEN_LBRACE -> getErrorString("Parser.TOKEN.LBRACE")
- | Parser.TOKEN_LBRACE_LESS-> getErrorString("Parser.TOKEN.LBRACE.LESS")
| Parser.TOKEN_BAR_RBRACK -> getErrorString("Parser.TOKEN.BAR.RBRACK")
- | Parser.TOKEN_GREATER_RBRACE -> getErrorString("Parser.TOKEN.GREATER.RBRACE")
+ | Parser.TOKEN_BAR_RBRACE -> getErrorString("Parser.TOKEN.BAR.RBRACE")
| Parser.TOKEN_GREATER_RBRACK -> getErrorString("Parser.TOKEN.GREATER.RBRACK")
| Parser.TOKEN_RQUOTE_DOT _
| Parser.TOKEN_RQUOTE -> getErrorString("Parser.TOKEN.RQUOTE")
@@ -1096,7 +1096,7 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) =
(* Merge a bunch of expression non terminals *)
let (|NONTERM_Category_Expr|_|) = function
| Parser.NONTERM_argExpr|Parser.NONTERM_minusExpr|Parser.NONTERM_parenExpr|Parser.NONTERM_atomicExpr
- | Parser.NONTERM_appExpr|Parser.NONTERM_tupleExpr|Parser.NONTERM_declExpr|Parser.NONTERM_braceExpr
+ | Parser.NONTERM_appExpr|Parser.NONTERM_tupleExpr|Parser.NONTERM_declExpr|Parser.NONTERM_braceExpr|Parser.NONTERM_braceBarExpr
| Parser.NONTERM_typedSeqExprBlock
| Parser.NONTERM_interactiveExpr -> Some()
| _ -> None
@@ -1825,6 +1825,7 @@ let DefaultReferencesForScriptsAndOutOfProjectSources(assumeDotNetFramework) =
yield "System.Data"
yield "System.Drawing"
yield "System.Core"
+
// These are the Portable-profile and .NET Standard 1.6 dependencies of FSharp.Core.dll. These are needed
// when an F# sript references an F# profile 7, 78, 259 or .NET Standard 1.6 component which in turn refers
// to FSharp.Core for profile 7, 78, 259 or .NET Standard.
@@ -1850,17 +1851,24 @@ let DefaultReferencesForScriptsAndOutOfProjectSources(assumeDotNetFramework) =
yield "System.Windows.Forms"
yield "System.Numerics"
else
- yield Path.Combine(Path.GetDirectoryName(typeof.Assembly.Location), "mscorlib.dll"); // mscorlib
- yield typeof.Assembly.Location; // System.Console
- yield typeof.Assembly.Location; // System.Runtime
- yield typeof.Assembly.Location; // System.ObjectModel
- yield typeof.Assembly.Location; // System.IO
- yield typeof.Assembly.Location; // System.Linq
- //yield typeof.Assembly.Location; // System.Xml.Linq
- yield typeof.Assembly.Location; // System.Net.Requests
- yield typeof.Assembly.Location; // System.Runtime.Numerics
- yield typeof.Assembly.Location; // System.Threading.Tasks
- yield typeof.Assembly.Location; // FSharp.Core
+ yield Path.Combine(Path.GetDirectoryName(typeof.Assembly.Location), "mscorlib.dll") // mscorlib
+ yield typeof.Assembly.Location // System.Console
+ yield typeof.Assembly.Location // System.Collections
+ yield typeof.Assembly.Location // System.Data.SqlClient
+ yield typeof.Assembly.Location // System.ObjectModel
+ yield typeof.Assembly.Location // System.IO.FileSystem
+ yield typeof.Assembly.Location // System.IO
+ yield typeof.Assembly.Location // System.Linq
+ yield typeof.Assembly.Location // System.Xml
+ yield typeof.Assembly.Location // System.Xml.Linq
+ yield typeof.Assembly.Location // System.Net.Requests
+ yield typeof.Assembly.Location // System.Runtime.Numerics
+ yield typeof.Assembly.Location // System.Net.Security
+ yield typeof.Assembly.Location // System.Security.Claims
+ yield typeof.Assembly.Location // System.Text.RegularExpressions.Regex
+ yield typeof.Assembly.Location // System.Threading.Tasks
+ yield typeof.Assembly.Location // System.Threading
+ yield typeof.Assembly.Location // FSharp.Core
]
@@ -2348,6 +2356,8 @@ type TcConfigBuilder =
mutable tryGetMetadataSnapshot : ILReaderTryGetMetadataSnapshot
mutable internalTestSpanStackReferring : bool
+
+ mutable noConditionalErasure : bool
}
static member Initial =
@@ -2485,6 +2495,7 @@ type TcConfigBuilder =
shadowCopyReferences = false
tryGetMetadataSnapshot = (fun _ -> None)
internalTestSpanStackReferring = false
+ noConditionalErasure = false
}
static member CreateNew(legacyReferenceResolver, defaultFSharpBinariesDir, reduceMemoryUsage, implicitIncludeDir,
@@ -2609,13 +2620,13 @@ type TcConfigBuilder =
member tcConfigB.RemoveReferencedAssemblyByPath (m, path) =
tcConfigB.referencedDLLs <- tcConfigB.referencedDLLs |> List.filter (fun ar-> ar.Range <> m || ar.Text <> path)
- static member SplitCommandLineResourceInfo ri =
- if String.contains ri ',' then
- let p = String.index ri ','
+ static member SplitCommandLineResourceInfo (ri:string) =
+ let p = ri.IndexOf ','
+ if p <> -1 then
let file = String.sub ri 0 p
let rest = String.sub ri (p+1) (String.length ri - p - 1)
- if String.contains rest ',' then
- let p = String.index rest ','
+ let p = rest.IndexOf ','
+ if p <> -1 then
let name = String.sub rest 0 p+".resources"
let pubpri = String.sub rest (p+1) (rest.Length - p - 1)
if pubpri = "public" then file, name, ILResourceAccess.Public
@@ -2674,9 +2685,9 @@ type AssemblyResolution =
member this.GetILAssemblyRef(ctok, reduceMemoryUsage, tryGetMetadataSnapshot) =
cancellable {
match !this.ilAssemblyRef with
- | Some(assref) -> return assref
+ | Some(assemblyRef) -> return assemblyRef
| None ->
- let! assRefOpt =
+ let! assemblyRefOpt =
cancellable {
match this.ProjectReference with
| Some r ->
@@ -2689,8 +2700,8 @@ type AssemblyResolution =
| _ -> return None
| None -> return None
}
- let assRef =
- match assRefOpt with
+ let assemblyRef =
+ match assemblyRefOpt with
| Some aref -> aref
| None ->
let readerSettings : ILReaderOptions =
@@ -2701,8 +2712,8 @@ type AssemblyResolution =
tryGetMetadataSnapshot = tryGetMetadataSnapshot }
use reader = OpenILModuleReader this.resolvedPath readerSettings
mkRefToILAssembly reader.ILModuleDef.ManifestOfAssembly
- this.ilAssemblyRef := Some(assRef)
- return assRef
+ this.ilAssemblyRef := Some(assemblyRef)
+ return assemblyRef
}
//----------------------------------------------------------------------------
@@ -2946,6 +2957,8 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) =
member x.shadowCopyReferences = data.shadowCopyReferences
member x.tryGetMetadataSnapshot = data.tryGetMetadataSnapshot
member x.internalTestSpanStackReferring = data.internalTestSpanStackReferring
+ member x.noConditionalErasure = data.noConditionalErasure
+
static member Create(builder, validate) =
use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parameter
TcConfig(builder, validate)
@@ -3376,14 +3389,14 @@ let ComputeQualifiedNameOfFileFromUniquePath (m, p: string list) = QualifiedName
let QualFileNameOfSpecs filename specs =
match specs with
- | [SynModuleOrNamespaceSig(modname, _, true, _, _, _, _, m)] -> QualFileNameOfModuleName m filename modname
- | [SynModuleOrNamespaceSig(_, _, false, _, _, _, _, m)] -> QualFileNameOfFilename m filename
+ | [SynModuleOrNamespaceSig(modname, _, kind, _, _, _, _, m)] when kind.IsModule -> QualFileNameOfModuleName m filename modname
+ | [SynModuleOrNamespaceSig(_, _, kind, _, _, _, _, m)] when not kind.IsModule -> QualFileNameOfFilename m filename
| _ -> QualFileNameOfFilename (mkRange filename pos0 pos0) filename
let QualFileNameOfImpls filename specs =
match specs with
- | [SynModuleOrNamespace(modname, _, true, _, _, _, _, m)] -> QualFileNameOfModuleName m filename modname
- | [SynModuleOrNamespace(_, _, false, _, _, _, _, m)] -> QualFileNameOfFilename m filename
+ | [SynModuleOrNamespace(modname, _, kind, _, _, _, _, m)] when kind.IsModule -> QualFileNameOfModuleName m filename modname
+ | [SynModuleOrNamespace(_, _, kind, _, _, _, _, m)] when not kind.IsModule -> QualFileNameOfFilename m filename
| _ -> QualFileNameOfFilename (mkRange filename pos0 pos0) filename
let PrepandPathToQualFileName x (QualifiedNameOfFile(q)) = ComputeQualifiedNameOfFileFromUniquePath (q.idRange, pathOfLid x@[q.idText])
@@ -3412,13 +3425,14 @@ let ComputeAnonModuleName check defaultNamespace filename (m: range) =
let PostParseModuleImpl (_i, defaultNamespace, isLastCompiland, filename, impl) =
match impl with
- | ParsedImplFileFragment.NamedModule(SynModuleOrNamespace(lid, isRec, isModule, decls, xmlDoc, attribs, access, m)) ->
+ | ParsedImplFileFragment.NamedModule(SynModuleOrNamespace(lid, isRec, kind, decls, xmlDoc, attribs, access, m)) ->
let lid =
match lid with
- | [id] when isModule && id.idText = MangledGlobalName -> error(Error(FSComp.SR.buildInvalidModuleOrNamespaceName(), id.idRange))
+ | [id] when kind.IsModule && id.idText = MangledGlobalName ->
+ error(Error(FSComp.SR.buildInvalidModuleOrNamespaceName(), id.idRange))
| id :: rest when id.idText = MangledGlobalName -> rest
| _ -> lid
- SynModuleOrNamespace(lid, isRec, isModule, decls, xmlDoc, attribs, access, m)
+ SynModuleOrNamespace(lid, isRec, kind, decls, xmlDoc, attribs, access, m)
| ParsedImplFileFragment.AnonModule (defs, m)->
let isLast, isExe = isLastCompiland
@@ -3429,24 +3443,26 @@ let PostParseModuleImpl (_i, defaultNamespace, isLastCompiland, filename, impl)
| _ -> errorR(Error(FSComp.SR.buildMultiFileRequiresNamespaceOrModule(), trimRangeToLine m))
let modname = ComputeAnonModuleName (not (isNil defs)) defaultNamespace filename (trimRangeToLine m)
- SynModuleOrNamespace(modname, false, true, defs, PreXmlDoc.Empty, [], None, m)
+ SynModuleOrNamespace(modname, false, AnonModule, defs, PreXmlDoc.Empty, [], None, m)
- | ParsedImplFileFragment.NamespaceFragment (lid, a, b, c, d, e, m)->
- let lid =
+ | ParsedImplFileFragment.NamespaceFragment (lid, a, kind, c, d, e, m)->
+ let lid, kind =
match lid with
- | id :: rest when id.idText = MangledGlobalName -> rest
- | _ -> lid
- SynModuleOrNamespace(lid, a, b, c, d, e, None, m)
+ | id :: rest when id.idText = MangledGlobalName ->
+ rest, if List.isEmpty rest then GlobalNamespace else kind
+ | _ -> lid, kind
+ SynModuleOrNamespace(lid, a, kind, c, d, e, None, m)
let PostParseModuleSpec (_i, defaultNamespace, isLastCompiland, filename, intf) =
match intf with
- | ParsedSigFileFragment.NamedModule(SynModuleOrNamespaceSig(lid, isRec, isModule, decls, xmlDoc, attribs, access, m)) ->
+ | ParsedSigFileFragment.NamedModule(SynModuleOrNamespaceSig(lid, isRec, kind, decls, xmlDoc, attribs, access, m)) ->
let lid =
match lid with
- | [id] when isModule && id.idText = MangledGlobalName -> error(Error(FSComp.SR.buildInvalidModuleOrNamespaceName(), id.idRange))
+ | [id] when kind.IsModule && id.idText = MangledGlobalName ->
+ error(Error(FSComp.SR.buildInvalidModuleOrNamespaceName(), id.idRange))
| id :: rest when id.idText = MangledGlobalName -> rest
| _ -> lid
- SynModuleOrNamespaceSig(lid, isRec, isModule, decls, xmlDoc, attribs, access, m)
+ SynModuleOrNamespaceSig(lid, isRec, NamedModule, decls, xmlDoc, attribs, access, m)
| ParsedSigFileFragment.AnonModule (defs, m) ->
let isLast, isExe = isLastCompiland
@@ -3457,14 +3473,15 @@ let PostParseModuleSpec (_i, defaultNamespace, isLastCompiland, filename, intf)
| _ -> errorR(Error(FSComp.SR.buildMultiFileRequiresNamespaceOrModule(), m))
let modname = ComputeAnonModuleName (not (isNil defs)) defaultNamespace filename (trimRangeToLine m)
- SynModuleOrNamespaceSig(modname, false, true, defs, PreXmlDoc.Empty, [], None, m)
+ SynModuleOrNamespaceSig(modname, false, AnonModule, defs, PreXmlDoc.Empty, [], None, m)
- | ParsedSigFileFragment.NamespaceFragment (lid, a, b, c, d, e, m)->
- let lid =
+ | ParsedSigFileFragment.NamespaceFragment (lid, a, kind, c, d, e, m)->
+ let lid, kind =
match lid with
- | id :: rest when id.idText = MangledGlobalName -> rest
- | _ -> lid
- SynModuleOrNamespaceSig(lid, a, b, c, d, e, None, m)
+ | id :: rest when id.idText = MangledGlobalName ->
+ rest, if List.isEmpty rest then GlobalNamespace else kind
+ | _ -> lid, kind
+ SynModuleOrNamespaceSig(lid, a, kind, c, d, e, None, m)
@@ -3508,34 +3525,37 @@ let PostParseModuleSpecs (defaultNamespace, filename, isLastCompiland, ParsedSig
ParsedInput.SigFile(ParsedSigFileInput(filename, qualName, scopedPragmas, hashDirectives, specs))
+type ModuleNamesDict = Map>
+
/// Checks if a module name is already given and deduplicates the name if needed.
-let DeduplicateModuleName (moduleNamesDict:IDictionary>) (paths: Set) path (qualifiedNameOfFile: QualifiedNameOfFile) =
- let count = if paths.Contains path then paths.Count else paths.Count + 1
- moduleNamesDict.[qualifiedNameOfFile.Text] <- Set.add path paths
- let id = qualifiedNameOfFile.Id
- if count = 1 then qualifiedNameOfFile else QualifiedNameOfFile(Ident(id.idText + "___" + count.ToString(), id.idRange))
+let DeduplicateModuleName (moduleNamesDict:ModuleNamesDict) fileName (qualNameOfFile: QualifiedNameOfFile) =
+ let path = Path.GetDirectoryName fileName
+ let path = if FileSystem.IsPathRootedShim path then try FileSystem.GetFullPathShim path with _ -> path else path
+ match moduleNamesDict.TryGetValue qualNameOfFile.Text with
+ | true, paths ->
+ if paths.ContainsKey path then
+ paths.[path], moduleNamesDict
+ else
+ let count = paths.Count + 1
+ let id = qualNameOfFile.Id
+ let qualNameOfFileT = if count = 1 then qualNameOfFile else QualifiedNameOfFile(Ident(id.idText + "___" + count.ToString(), id.idRange))
+ let moduleNamesDictT = moduleNamesDict.Add(qualNameOfFile.Text, paths.Add(path, qualNameOfFileT))
+ qualNameOfFileT, moduleNamesDictT
+ | _ ->
+ let moduleNamesDictT = moduleNamesDict.Add(qualNameOfFile.Text, Map.empty.Add(path, qualNameOfFile))
+ qualNameOfFile, moduleNamesDictT
/// Checks if a ParsedInput is using a module name that was already given and deduplicates the name if needed.
-let DeduplicateParsedInputModuleName (moduleNamesDict:IDictionary>) input =
+let DeduplicateParsedInputModuleName (moduleNamesDict: ModuleNamesDict) input =
match input with
- | ParsedInput.ImplFile (ParsedImplFileInput.ParsedImplFileInput(fileName, isScript, qualifiedNameOfFile, scopedPragmas, hashDirectives, modules, (isLastCompiland, isExe))) ->
- let path = Path.GetDirectoryName fileName
- match moduleNamesDict.TryGetValue qualifiedNameOfFile.Text with
- | true, paths ->
- let qualifiedNameOfFile = DeduplicateModuleName moduleNamesDict paths path qualifiedNameOfFile
- ParsedInput.ImplFile(ParsedImplFileInput.ParsedImplFileInput(fileName, isScript, qualifiedNameOfFile, scopedPragmas, hashDirectives, modules, (isLastCompiland, isExe)))
- | _ ->
- moduleNamesDict.[qualifiedNameOfFile.Text] <- Set.singleton path
- input
- | ParsedInput.SigFile (ParsedSigFileInput.ParsedSigFileInput(fileName, qualifiedNameOfFile, scopedPragmas, hashDirectives, modules)) ->
- let path = Path.GetDirectoryName fileName
- match moduleNamesDict.TryGetValue qualifiedNameOfFile.Text with
- | true, paths ->
- let qualifiedNameOfFile = DeduplicateModuleName moduleNamesDict paths path qualifiedNameOfFile
- ParsedInput.SigFile (ParsedSigFileInput.ParsedSigFileInput(fileName, qualifiedNameOfFile, scopedPragmas, hashDirectives, modules))
- | _ ->
- moduleNamesDict.[qualifiedNameOfFile.Text] <- Set.singleton path
- input
+ | ParsedInput.ImplFile (ParsedImplFileInput.ParsedImplFileInput(fileName, isScript, qualNameOfFile, scopedPragmas, hashDirectives, modules, (isLastCompiland, isExe))) ->
+ let qualNameOfFileT, moduleNamesDictT = DeduplicateModuleName moduleNamesDict fileName qualNameOfFile
+ let inputT = ParsedInput.ImplFile(ParsedImplFileInput.ParsedImplFileInput(fileName, isScript, qualNameOfFileT, scopedPragmas, hashDirectives, modules, (isLastCompiland, isExe)))
+ inputT, moduleNamesDictT
+ | ParsedInput.SigFile (ParsedSigFileInput.ParsedSigFileInput(fileName, qualNameOfFile, scopedPragmas, hashDirectives, modules)) ->
+ let qualNameOfFileT, moduleNamesDictT = DeduplicateModuleName moduleNamesDict fileName qualNameOfFile
+ let inputT = ParsedInput.SigFile (ParsedSigFileInput.ParsedSigFileInput(fileName, qualNameOfFileT, scopedPragmas, hashDirectives, modules))
+ inputT, moduleNamesDictT
let ParseInput (lexer, errorLogger:ErrorLogger, lexbuf:UnicodeLexing.Lexbuf, defaultNamespace, filename, isLastCompiland) =
// The assert below is almost ok, but it fires in two cases:
@@ -3655,10 +3675,10 @@ type TcAssemblyResolutions(tcConfig: TcConfig, results: AssemblyResolution list,
member tcResolutions.TryFindByOriginalReference(assemblyReference:AssemblyReference) = originalReferenceToResolution.TryFind assemblyReference.Text
/// This doesn't need to be cancellable, it is only used by F# Interactive
- member tcResolution.TryFindByExactILAssemblyRef (ctok, assref) =
+ member tcResolution.TryFindByExactILAssemblyRef (ctok, assemblyRef) =
results |> List.tryFind (fun ar->
let r = ar.GetILAssemblyRef(ctok, tcConfig.reduceMemoryUsage, tcConfig.tryGetMetadataSnapshot) |> Cancellable.runWithoutCancellation
- r = assref)
+ r = assemblyRef)
/// This doesn't need to be cancellable, it is only used by F# Interactive
member tcResolution.TryFindBySimpleAssemblyName (ctok, simpleAssemName) =
@@ -4026,11 +4046,11 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti
| ResolvedImportedAssembly(importedAssembly) -> ResolvedCcu(importedAssembly.FSharpViewOfMetadata)
| UnresolvedImportedAssembly(assemblyName) -> UnresolvedCcu(assemblyName)
- member tcImports.FindCcuFromAssemblyRef(ctok, m, assref:ILAssemblyRef) =
+ member tcImports.FindCcuFromAssemblyRef(ctok, m, assemblyRef:ILAssemblyRef) =
CheckDisposed()
- match tcImports.FindCcuInfo(ctok, m, assref.Name, lookupOnly=false) with
+ match tcImports.FindCcuInfo(ctok, m, assemblyRef.Name, lookupOnly=false) with
| ResolvedImportedAssembly(importedAssembly) -> ResolvedCcu(importedAssembly.FSharpViewOfMetadata)
- | UnresolvedImportedAssembly _ -> UnresolvedCcu(assref.QualifiedName)
+ | UnresolvedImportedAssembly _ -> UnresolvedCcu(assemblyRef.QualifiedName)
#if !NO_EXTENSIONTYPING
@@ -4641,8 +4661,8 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti
resolutions.TryFindBySimpleAssemblyName (ctok, simpleAssemName) |> Option.map (fun r -> r.resolvedPath)
/// This doesn't need to be cancellable, it is only used by F# Interactive
- member tcImports.TryFindExistingFullyQualifiedPathByExactAssemblyRef(ctok, assref:ILAssemblyRef) : string option =
- resolutions.TryFindByExactILAssemblyRef (ctok, assref) |> Option.map (fun r -> r.resolvedPath)
+ member tcImports.TryFindExistingFullyQualifiedPathByExactAssemblyRef(ctok, assemblyRef:ILAssemblyRef) : string option =
+ resolutions.TryFindByExactILAssemblyRef (ctok, assemblyRef) |> Option.map (fun r -> r.resolvedPath)
member tcImports.TryResolveAssemblyReference(ctok, assemblyReference:AssemblyReference, mode:ResolveAssemblyReferenceMode) : OperationResult =
let tcConfig = tcConfigP.Get(ctok)
@@ -5432,9 +5452,12 @@ let TypeCheckOneInputEventually (checkForErrors, tcConfig:TcConfig, tcImports:Tc
if Zset.contains qualNameOfFile tcState.tcsRootImpls then
errorR(Error(FSComp.SR.buildImplementationAlreadyGivenDetail(qualNameOfFile.Text), m))
+ let conditionalDefines =
+ if tcConfig.noConditionalErasure then None else Some (tcConfig.conditionalCompilationDefines)
+
// Typecheck the signature file
let! (tcEnv, sigFileType, createsGeneratedProvidedTypes) =
- TypeCheckOneSigFile (tcGlobals, tcState.tcsNiceNameGen, amap, tcState.tcsCcu, checkForErrors, tcConfig.conditionalCompilationDefines, tcSink, tcConfig.internalTestSpanStackReferring) tcState.tcsTcSigEnv file
+ TypeCheckOneSigFile (tcGlobals, tcState.tcsNiceNameGen, amap, tcState.tcsCcu, checkForErrors, conditionalDefines, tcSink, tcConfig.internalTestSpanStackReferring) tcState.tcsTcSigEnv file
let rootSigs = Zmap.add qualNameOfFile sigFileType tcState.tcsRootSigs
@@ -5469,9 +5492,12 @@ let TypeCheckOneInputEventually (checkForErrors, tcConfig:TcConfig, tcImports:Tc
let tcImplEnv = tcState.tcsTcImplEnv
+ let conditionalDefines =
+ if tcConfig.noConditionalErasure then None else Some (tcConfig.conditionalCompilationDefines)
+
// Typecheck the implementation file
let! topAttrs, implFile, _implFileHiddenType, tcEnvAtEnd, createsGeneratedProvidedTypes =
- TypeCheckOneImplFile (tcGlobals, tcState.tcsNiceNameGen, amap, tcState.tcsCcu, checkForErrors, tcConfig.conditionalCompilationDefines, tcSink, tcConfig.internalTestSpanStackReferring) tcImplEnv rootSigOpt file
+ TypeCheckOneImplFile (tcGlobals, tcState.tcsNiceNameGen, amap, tcState.tcsCcu, checkForErrors, conditionalDefines, tcSink, tcConfig.internalTestSpanStackReferring) tcImplEnv rootSigOpt file
let hadSig = rootSigOpt.IsSome
let implFileSigType = SigTypeOfImplFile implFile
diff --git a/src/fsharp/CompileOps.fsi b/src/fsharp/CompileOps.fsi
index eb371fa592..9ee74ee993 100755
--- a/src/fsharp/CompileOps.fsi
+++ b/src/fsharp/CompileOps.fsi
@@ -59,12 +59,13 @@ val ComputeQualifiedNameOfFileFromUniquePath: range * string list -> Ast.Qualifi
val PrependPathToInput: Ast.Ident list -> Ast.ParsedInput -> Ast.ParsedInput
-/// Checks if a module name is already given and deduplicates the name if needed.
-val DeduplicateModuleName: IDictionary> -> Set -> string -> Ast.QualifiedNameOfFile -> Ast.QualifiedNameOfFile
+/// State used to de-deuplicate module names along a list of file names
+type ModuleNamesDict = Map>
/// Checks if a ParsedInput is using a module name that was already given and deduplicates the name if needed.
-val DeduplicateParsedInputModuleName: IDictionary> -> Ast.ParsedInput -> Ast.ParsedInput
+val DeduplicateParsedInputModuleName: ModuleNamesDict -> Ast.ParsedInput -> Ast.ParsedInput * ModuleNamesDict
+/// Parse a single input (A signature file or implementation file)
val ParseInput: (UnicodeLexing.Lexbuf -> Parser.token) * ErrorLogger * UnicodeLexing.Lexbuf * string option * string * isLastCompiland:(bool * bool) -> Ast.ParsedInput
//----------------------------------------------------------------------------
@@ -366,6 +367,9 @@ type TcConfigBuilder =
/// if true - 'let mutable x = Span.Empty', the value 'x' is a stack referring span. Used for internal testing purposes only until we get true stack spans.
mutable internalTestSpanStackReferring : bool
+
+ /// Prevent erasure of conditional attributes and methods so tooling is able analyse them.
+ mutable noConditionalErasure: bool
}
static member Initial: TcConfigBuilder
diff --git a/src/fsharp/CompileOptions.fs b/src/fsharp/CompileOptions.fs
index 6ae18644de..344c0e1412 100755
--- a/src/fsharp/CompileOptions.fs
+++ b/src/fsharp/CompileOptions.fs
@@ -848,8 +848,8 @@ let testFlag tcConfigB =
| str -> warning(Error(FSComp.SR.optsUnknownArgumentToTheTestSwitch(str),rangeCmdArgs))), None,
None)
-// not shown in fsc.exe help, no warning on use, motivation is for use from VS
-let vsSpecificFlags (tcConfigB: TcConfigBuilder) =
+// Not shown in fsc.exe help, no warning on use, motivation is for use from tooling.
+let editorSpecificFlags (tcConfigB: TcConfigBuilder) =
[ CompilerOption("vserrors", tagNone, OptionUnit (fun () -> tcConfigB.errorStyle <- ErrorStyle.VSErrors), None, None)
CompilerOption("validate-type-providers", tagNone, OptionUnit (id), None, None) // preserved for compatibility's sake, no longer has any effect
CompilerOption("LCID", tagInt, OptionInt ignore, None, None)
@@ -857,7 +857,8 @@ let vsSpecificFlags (tcConfigB: TcConfigBuilder) =
CompilerOption("sqmsessionguid", tagNone, OptionString ignore, None, None)
CompilerOption("gccerrors", tagNone, OptionUnit (fun () -> tcConfigB.errorStyle <- ErrorStyle.GccErrors), None, None)
CompilerOption("exename", tagNone, OptionString (fun s -> tcConfigB.exename <- Some(s)), None, None)
- CompilerOption("maxerrors", tagInt, OptionInt (fun n -> tcConfigB.maxErrors <- n), None, None) ]
+ CompilerOption("maxerrors", tagInt, OptionInt (fun n -> tcConfigB.maxErrors <- n), None, None)
+ CompilerOption("noconditionalerasure", tagNone, OptionUnit (fun () -> tcConfigB.noConditionalErasure <- true), None, None) ]
let internalFlags (tcConfigB:TcConfigBuilder) =
[
@@ -896,7 +897,7 @@ let internalFlags (tcConfigB:TcConfigBuilder) =
CompilerOption("alwayscallvirt",tagNone,OptionSwitch(callVirtSwitch tcConfigB),Some(InternalCommandLineOption("alwayscallvirt",rangeCmdArgs)), None)
CompilerOption("nodebugdata",tagNone, OptionUnit (fun () -> tcConfigB.noDebugData<-true),Some(InternalCommandLineOption("--nodebugdata",rangeCmdArgs)), None)
testFlag tcConfigB ] @
- vsSpecificFlags tcConfigB @
+ editorSpecificFlags tcConfigB @
[ CompilerOption("jit", tagNone, OptionSwitch (jitoptimizeSwitch tcConfigB), Some(InternalCommandLineOption("jit", rangeCmdArgs)), None)
CompilerOption("localoptimize", tagNone, OptionSwitch(localoptimizeSwitch tcConfigB),Some(InternalCommandLineOption("localoptimize", rangeCmdArgs)), None)
CompilerOption("splitting", tagNone, OptionSwitch(splittingSwitch tcConfigB),Some(InternalCommandLineOption("splitting", rangeCmdArgs)), None)
diff --git a/src/fsharp/ConstraintSolver.fs b/src/fsharp/ConstraintSolver.fs
index 4997c4ba59..230474a2e8 100755
--- a/src/fsharp/ConstraintSolver.fs
+++ b/src/fsharp/ConstraintSolver.fs
@@ -227,6 +227,7 @@ let rec occursCheck g un ty =
match stripTyEqns g ty with
| TType_ucase(_, l)
| TType_app (_, l)
+ | TType_anon(_, l)
| TType_tuple (_, l) -> List.exists (occursCheck g un) l
| TType_fun (d, r) -> occursCheck g un d || occursCheck g un r
| TType_var r -> typarEq un r
@@ -301,6 +302,7 @@ type TraitConstraintSolution =
| TTraitBuiltIn
| TTraitSolved of MethInfo * TypeInst
| TTraitSolvedRecdProp of RecdFieldInfo * bool
+ | TTraitSolvedAnonRecdProp of AnonRecdTypeInfo * TypeInst * int
let BakedInTraitConstraintNames =
[ "op_Division" ; "op_Multiply"; "op_Addition"
@@ -471,11 +473,14 @@ and SolveTypStaticReq (csenv:ConstraintSolverEnv) trace req ty =
match stripTyparEqns ty with
| TType_measure ms ->
let vs = ListMeasureVarOccsWithNonZeroExponents ms
- IterateD (fun ((tpr:Typar), _) -> SolveTypStaticReqTypar csenv trace req tpr) vs
+ trackErrors {
+ for (tpr, _) in vs do
+ return! SolveTypStaticReqTypar csenv trace req tpr
+ }
| _ ->
match tryAnyParTy csenv.g ty with
- | Some tpr -> SolveTypStaticReqTypar csenv trace req tpr
- | None -> CompleteD
+ | ValueSome tpr -> SolveTypStaticReqTypar csenv trace req tpr
+ | ValueNone -> CompleteD
let TransactDynamicReq (trace:OptionalTrace) (tpr:Typar) req =
let orig = tpr.DynamicReq
@@ -487,7 +492,7 @@ let SolveTypDynamicReq (csenv:ConstraintSolverEnv) trace req ty =
| TyparDynamicReq.No -> CompleteD
| TyparDynamicReq.Yes ->
match tryAnyParTy csenv.g ty with
- | Some tpr when tpr.DynamicReq <> TyparDynamicReq.Yes ->
+ | ValueSome tpr when tpr.DynamicReq <> TyparDynamicReq.Yes ->
TransactDynamicReq trace tpr TyparDynamicReq.Yes
| _ -> CompleteD
@@ -499,25 +504,27 @@ let TransactIsCompatFlex (trace:OptionalTrace) (tpr:Typar) req =
let SolveTypIsCompatFlex (csenv:ConstraintSolverEnv) trace req ty =
if req then
match tryAnyParTy csenv.g ty with
- | Some tpr when not tpr.IsCompatFlex -> TransactIsCompatFlex trace tpr req
+ | ValueSome tpr when not tpr.IsCompatFlex -> TransactIsCompatFlex trace tpr req
| _ -> CompleteD
else
CompleteD
-let SubstMeasureWarnIfRigid (csenv:ConstraintSolverEnv) trace (v:Typar) ms =
+let SubstMeasureWarnIfRigid (csenv:ConstraintSolverEnv) trace (v:Typar) ms = trackErrors {
if v.Rigidity.WarnIfUnified && not (isAnyParTy csenv.g (TType_measure ms)) then
// NOTE: we grab the name eagerly to make sure the type variable prints as a type variable
- let tpnmOpt = if v.IsCompilerGenerated then None else Some v.Name
- SolveTypStaticReq csenv trace v.StaticReq (TType_measure ms) ++ (fun () ->
+ let tpnmOpt = if v.IsCompilerGenerated then None else Some v.Name
+ do! SolveTypStaticReq csenv trace v.StaticReq (TType_measure ms)
SubstMeasure v ms
- WarnD(NonRigidTypar(csenv.DisplayEnv, tpnmOpt, v.Range, TType_measure (Measure.Var v), TType_measure ms, csenv.m)))
+ return! WarnD(NonRigidTypar(csenv.DisplayEnv, tpnmOpt, v.Range, TType_measure (Measure.Var v), TType_measure ms, csenv.m))
else
// Propagate static requirements from 'tp' to 'ty'
- SolveTypStaticReq csenv trace v.StaticReq (TType_measure ms) ++ (fun () ->
+ do! SolveTypStaticReq csenv trace v.StaticReq (TType_measure ms)
SubstMeasure v ms
if v.Rigidity = TyparRigidity.Anon && measureEquiv csenv.g ms Measure.One then
- WarnD(Error(FSComp.SR.csCodeLessGeneric(), v.Range))
- else CompleteD)
+ return! WarnD(Error(FSComp.SR.csCodeLessGeneric(), v.Range))
+ else
+ ()
+ }
/// Imperatively unify the unit-of-measure expression ms against 1.
/// There are three cases
@@ -576,6 +583,7 @@ let rec SimplifyMeasuresInType g resultFirst ((generalizable, generalized) as pa
match stripTyparEqns ty with
| TType_ucase(_, l)
| TType_app (_, l)
+ | TType_anon (_,l)
| TType_tuple (_, l) -> SimplifyMeasuresInTypes g param l
| TType_fun (d, r) -> if resultFirst then SimplifyMeasuresInTypes g param [r;d] else SimplifyMeasuresInTypes g param [d;r]
@@ -613,6 +621,7 @@ let rec GetMeasureVarGcdInType v ty =
match stripTyparEqns ty with
| TType_ucase(_, l)
| TType_app (_, l)
+ | TType_anon (_,l)
| TType_tuple (_, l) -> GetMeasureVarGcdInTypes v l
| TType_fun (d, r) -> GcdRational (GetMeasureVarGcdInType v d) (GetMeasureVarGcdInType v r)
@@ -687,8 +696,8 @@ let CheckWarnIfRigid (csenv:ConstraintSolverEnv) ty1 (r:Typar) ty =
if not r.Rigidity.WarnIfUnified then CompleteD else
let needsWarning =
match tryAnyParTy g ty with
- | None -> true
- | Some tp2 ->
+ | ValueNone -> true
+ | ValueSome tp2 ->
not tp2.IsCompilerGenerated &&
(r.IsCompilerGenerated ||
// exclude this warning for two identically named user-specified type parameters, e.g. from different mutually recursive functions or types
@@ -703,21 +712,17 @@ let CheckWarnIfRigid (csenv:ConstraintSolverEnv) ty1 (r:Typar) ty =
/// Add the constraint "ty1 = ty" to the constraint problem, where ty1 is a type variable.
/// Propagate all effects of adding this constraint, e.g. to solve other variables
-let rec SolveTyparEqualsType (csenv:ConstraintSolverEnv) ndeep m2 (trace:OptionalTrace) ty1 ty =
+let rec SolveTyparEqualsType (csenv:ConstraintSolverEnv) ndeep m2 (trace:OptionalTrace) ty1 ty = trackErrors {
let m = csenv.m
-
- DepthCheck ndeep m ++ (fun () ->
+ do! DepthCheck ndeep m
match ty1 with
| TType_var r | TType_measure (Measure.Var r) ->
// The types may still be equivalent due to abbreviations, which we are trying not to eliminate
- if typeEquiv csenv.g ty1 ty then CompleteD else
-
+ if typeEquiv csenv.g ty1 ty then () else
// The famous 'occursCheck' check to catch "infinite types" like 'a = list<'a> - see also https://github.com/Microsoft/visualfsharp/issues/1170
- if occursCheck csenv.g r ty then ErrorD (ConstraintSolverInfiniteTypes(csenv.eContextInfo, csenv.DisplayEnv, ty1, ty, m, m2)) else
-
+ if occursCheck csenv.g r ty then return! ErrorD (ConstraintSolverInfiniteTypes(csenv.eContextInfo, csenv.DisplayEnv, ty1, ty, m, m2)) else
// Note: warn _and_ continue!
- CheckWarnIfRigid csenv ty1 r ty ++ (fun () ->
-
+ do! CheckWarnIfRigid csenv ty1 r ty
// Record the solution before we solve the constraints, since
// We may need to make use of the equation when solving the constraints.
// Record a entry in the undo trace if one is provided
@@ -726,40 +731,39 @@ let rec SolveTyparEqualsType (csenv:ConstraintSolverEnv) ndeep m2 (trace:Optiona
(* dprintf "setting typar %d to type %s at %a\n" r.Stamp ((DebugPrint.showType ty)) outputRange m; *)
// Only solve constraints if this is not an error var
- if r.IsFromError then CompleteD else
-
+ if r.IsFromError then () else
// Check to see if this type variable is relevant to any trait constraints.
// If so, re-solve the relevant constraints.
- (if csenv.SolverState.ExtraCxs.ContainsKey r.Stamp then
- RepeatWhileD ndeep (fun ndeep -> SolveRelevantMemberConstraintsForTypar csenv ndeep false trace r)
- else
- CompleteD) ++ (fun _ ->
-
+ if csenv.SolverState.ExtraCxs.ContainsKey r.Stamp then
+ do! RepeatWhileD ndeep (fun ndeep -> SolveRelevantMemberConstraintsForTypar csenv ndeep false trace r)
// Re-solve the other constraints associated with this type variable
- solveTypMeetsTyparConstraints csenv ndeep m2 trace ty r))
+ return! solveTypMeetsTyparConstraints csenv ndeep m2 trace ty r
- | _ -> failwith "SolveTyparEqualsType")
+ | _ -> failwith "SolveTyparEqualsType"
+ }
/// Apply the constraints on 'typar' to the type 'ty'
-and solveTypMeetsTyparConstraints (csenv:ConstraintSolverEnv) ndeep m2 trace ty (r: Typar) =
+and solveTypMeetsTyparConstraints (csenv:ConstraintSolverEnv) ndeep m2 trace ty (r: Typar) = trackErrors {
let g = csenv.g
// Propagate compat flex requirements from 'tp' to 'ty'
- SolveTypIsCompatFlex csenv trace r.IsCompatFlex ty ++ (fun () ->
+ do! SolveTypIsCompatFlex csenv trace r.IsCompatFlex ty
// Propagate dynamic requirements from 'tp' to 'ty'
- SolveTypDynamicReq csenv trace r.DynamicReq ty ++ (fun () ->
+ do! SolveTypDynamicReq csenv trace r.DynamicReq ty
// Propagate static requirements from 'tp' to 'ty'
- SolveTypStaticReq csenv trace r.StaticReq ty ++ (fun () ->
+ do! SolveTypStaticReq csenv trace r.StaticReq ty
// Solve constraints on 'tp' w.r.t. 'ty'
- r.Constraints |> IterateD (function
+ for e in r.Constraints do
+ do!
+ match e with
| TyparConstraint.DefaultsTo (priority, dty, m) ->
if typeEquiv g ty dty then
CompleteD
else
match tryDestTyparTy g ty with
- | None -> CompleteD
- | Some destTypar ->
+ | ValueNone -> CompleteD
+ | ValueSome destTypar ->
AddConstraint csenv ndeep m2 trace destTypar (TyparConstraint.DefaultsTo(priority, dty, m))
| TyparConstraint.SupportsNull m2 -> SolveTypeSupportsNull csenv ndeep m2 trace ty
@@ -774,10 +778,18 @@ and solveTypMeetsTyparConstraints (csenv:ConstraintSolverEnv) ndeep m2 trace ty
| TyparConstraint.SimpleChoice(tys, m2) -> SolveTypeChoice csenv ndeep m2 trace ty tys
| TyparConstraint.CoercesTo(ty2, m2) -> SolveTypeSubsumesTypeKeepAbbrevs csenv ndeep m2 trace None ty2 ty
| TyparConstraint.MayResolveMember(traitInfo, m2) ->
- SolveMemberConstraint csenv false false ndeep m2 trace traitInfo ++ (fun _ -> CompleteD)
- ))))
+ SolveMemberConstraint csenv false false ndeep m2 trace traitInfo |> OperationResult.ignore
+ }
+and SolveAnonInfoEqualsAnonInfo (csenv:ConstraintSolverEnv) m2 (anonInfo1: AnonRecdTypeInfo) (anonInfo2: AnonRecdTypeInfo) =
+ if evalTupInfoIsStruct anonInfo1.TupInfo <> evalTupInfoIsStruct anonInfo2.TupInfo then ErrorD (ConstraintSolverError(FSComp.SR.tcTupleStructMismatch(), csenv.m,m2)) else
+ (match anonInfo1.Assembly, anonInfo2.Assembly with
+ | ccu1, ccu2 -> if not (ccuEq ccu1 ccu2) then ErrorD (ConstraintSolverError(FSComp.SR.tcAnonRecdCcuMismatch(ccu1.AssemblyName, ccu2.AssemblyName), csenv.m,m2)) else ResultD ()
+ ) ++ (fun () ->
+ if not (anonInfo1.SortedNames = anonInfo2.SortedNames) then ErrorD (ConstraintSolverError(FSComp.SR.tcAnonRecdFieldNameMismatch(sprintf "%A" (Array.toList anonInfo1.SortedNames), sprintf "%A" (Array.toList anonInfo2.SortedNames)), csenv.m,m2)) else
+ ResultD ())
+
/// Add the constraint "ty1 = ty2" to the constraint problem.
/// Propagate all effects of adding this constraint, e.g. to solve type variables
and SolveTypeEqualsType (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalTrace) (cxsln:(TraitConstraintInfo * TraitConstraintSln) option) ty1 ty2 =
@@ -818,6 +830,9 @@ and SolveTypeEqualsType (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalTra
| TType_tuple (tupInfo1, l1) , TType_tuple (tupInfo2, l2) ->
if evalTupInfoIsStruct tupInfo1 <> evalTupInfoIsStruct tupInfo2 then ErrorD (ConstraintSolverError(FSComp.SR.tcTupleStructMismatch(), csenv.m, m2)) else
SolveTypeEqualsTypeEqns csenv ndeep m2 trace None l1 l2
+ | TType_anon (anonInfo1, l1),TType_anon (anonInfo2, l2) ->
+ SolveAnonInfoEqualsAnonInfo csenv m2 anonInfo1 anonInfo2 ++ (fun () ->
+ SolveTypeEqualsTypeEqns csenv ndeep m2 trace None l1 l2)
| TType_fun (d1, r1) , TType_fun (d2, r2) -> SolveFunTypeEqn csenv ndeep m2 trace None d1 d2 r1 r2
| TType_measure ms1 , TType_measure ms2 -> UnifyMeasures csenv trace ms1 ms2
| TType_forall(tps1, rty1), TType_forall(tps2, rty2) ->
@@ -854,9 +869,10 @@ and SolveTypeEqualsTypeEqns csenv ndeep m2 trace cxsln origl1 origl2 =
ErrorD(ConstraintSolverTupleDiffLengths(csenv.DisplayEnv, origl1, origl2, csenv.m, m2))
loop origl1 origl2
-and SolveFunTypeEqn csenv ndeep m2 trace cxsln d1 d2 r1 r2 =
- SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln d1 d2 ++ (fun () ->
- SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln r1 r2)
+and SolveFunTypeEqn csenv ndeep m2 trace cxsln d1 d2 r1 r2 = trackErrors {
+ do! SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln d1 d2
+ return! SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln r1 r2
+ }
// ty1: expected
// ty2: actual
@@ -890,6 +906,9 @@ and SolveTypeSubsumesType (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalT
| TType_tuple (tupInfo1, l1) , TType_tuple (tupInfo2, l2) ->
if evalTupInfoIsStruct tupInfo1 <> evalTupInfoIsStruct tupInfo2 then ErrorD (ConstraintSolverError(FSComp.SR.tcTupleStructMismatch(), csenv.m, m2)) else
SolveTypeEqualsTypeEqns csenv ndeep m2 trace cxsln l1 l2 (* nb. can unify since no variance *)
+ | TType_anon (anonInfo1, l1), TType_anon (anonInfo2, l2) ->
+ SolveAnonInfoEqualsAnonInfo csenv m2 anonInfo1 anonInfo2 ++ (fun () ->
+ SolveTypeEqualsTypeEqns csenv ndeep m2 trace cxsln l1 l2) (* nb. can unify since no variance *)
| TType_fun (d1, r1) , TType_fun (d2, r2) -> SolveFunTypeEqn csenv ndeep m2 trace cxsln d1 d2 r1 r2 (* nb. can unify since no variance *)
| TType_measure ms1, TType_measure ms2 -> UnifyMeasures csenv trace ms1 ms2
@@ -902,13 +921,14 @@ and SolveTypeSubsumesType (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalT
// Special subsumption rule for byref tags
| TType_app (tc1, l1) , TType_app (tc2, l2) when tyconRefEq g tc1 tc2 && g.byref2_tcr.CanDeref && tyconRefEq g g.byref2_tcr tc1 ->
match l1, l2 with
- | [ h1; tag1 ], [ h2; tag2 ] ->
- SolveTypeEqualsType csenv ndeep m2 trace None h1 h2 ++ (fun () ->
+ | [ h1; tag1 ], [ h2; tag2 ] -> trackErrors {
+ do! SolveTypeEqualsType csenv ndeep m2 trace None h1 h2
match stripTyEqnsA csenv.g canShortcut tag1, stripTyEqnsA csenv.g canShortcut tag2 with
| TType_app(tagc1, []), TType_app(tagc2, [])
when (tyconRefEq g tagc2 g.byrefkind_InOut_tcr &&
- (tyconRefEq g tagc1 g.byrefkind_In_tcr || tyconRefEq g tagc1 g.byrefkind_Out_tcr) ) -> CompleteD
- | _ -> SolveTypeEqualsType csenv ndeep m2 trace cxsln tag1 tag2)
+ (tyconRefEq g tagc1 g.byrefkind_In_tcr || tyconRefEq g tagc1 g.byrefkind_Out_tcr) ) -> ()
+ | _ -> return! SolveTypeEqualsType csenv ndeep m2 trace cxsln tag1 tag2
+ }
| _ -> SolveTypeEqualsTypeEqns csenv ndeep m2 trace cxsln l1 l2
| TType_app (tc1, l1) , TType_app (tc2, l2) when tyconRefEq g tc1 tc2 ->
@@ -988,16 +1008,16 @@ and SolveDimensionlessNumericType (csenv:ConstraintSolverEnv) ndeep m2 trace ty
/// We pretend int and other types support a number of operators. In the actual IL for mscorlib they
/// don't, however the type-directed static optimization rules in the library code that makes use of this
/// will deal with the problem.
-and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload permitWeakResolution ndeep m2 trace (TTrait(tys, nm, memFlags, argtys, rty, sln)): OperationResult