You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/PULL_REQUEST_TEMPLATE.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Fixes # (issue, if applicable)
13
13
>
14
14
> Release notes files:
15
15
> - If anything under `src/Compiler` has been changed, please make sure to make an entry in `docs/release-notes/.FSharp.Compiler.Service/<version>.md`, where `<version>` is usually "highest" one, e.g. `42.8.200`
16
-
> - If language feature was added (i.e. `LanguageFeatures.fsi` was changed), please add it to `docs/releae-notes/.Language/preview.md`
16
+
> - If language feature was added (i.e. `LanguageFeatures.fsi` was changed), please add it to `docs/release-notes/.Language/preview.md`
17
17
> - If a change to `FSharp.Core` was made, please make sure to edit `docs/release-notes/.FSharp.Core/<version>.md` where version is "highest" one, e.g. `8.0.200`.
18
18
19
19
> Information about the release notes entries format can be found in the [documentation](https://fsharp.github.io/fsharp-compiler-docs/release-notes/About.html).
Copy file name to clipboardExpand all lines: DEVGUIDE.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -342,4 +342,4 @@ See the "Debugging The Compiler" section of this [article](https://medium.com/@w
342
342
343
343
If you are behind a proxy server, NuGet client tool must be configured to use it:
344
344
345
-
See the Nuget config file documention for use with a proxy server [https://learn.microsoft.com/nuget/reference/nuget-config-file](https://learn.microsoft.com/nuget/reference/nuget-config-file)
345
+
See the Nuget config file documentation for use with a proxy server [https://learn.microsoft.com/nuget/reference/nuget-config-file](https://learn.microsoft.com/nuget/reference/nuget-config-file)
Copy file name to clipboardExpand all lines: TESTGUIDE.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# F# Compiler, Core Library and Visual F# Tools Tests
2
2
3
-
Where this guide mentions the command `build` it means either `build.cmd` in the root folder for Windows, or `build.sh` for Linux/MacOS.
3
+
Where this guide mentions the command `build` it means either `build.cmd` in the root folder for Windows, or `build.sh` for Linux/macOS.
4
4
5
5
## In this guide
6
6
@@ -49,9 +49,9 @@ Some test groups can only be run in `CI` configuration, for that, you need to pa
49
49
50
50
To run tests, from a command prompt, use variations such as the following, depending on which test suite and build configuration you want.
51
51
52
-
### Tests that can be run on Linux and MacOS
52
+
### Tests that can be run on Linux and macOS
53
53
54
-
If you're using Linux or MacOS to develop, the group of tests that are known to succeed are all in `-testCoreClr`. Any other `-testXXX` argument will currently fail. An effort is underway to make testing and running tests easier on all systems.
54
+
If you're using Linux or macOS to develop, the group of tests that are known to succeed are all in `-testCoreClr`. Any other `-testXXX` argument will currently fail. An effort is underway to make testing and running tests easier on all systems.
55
55
56
56
### Tests that can only be run in Release mode
57
57
@@ -123,7 +123,7 @@ This is compiled using [tests\fsharp\FSharp.Tests.FSharpSuite.fsproj](tests/fsha
123
123
Tests are grouped in folders per area. Each test compiles and executes a `test.fsx|fs` file in its folder using some combination of compiler or FSI flags specified in the FSharpSuite test project.
124
124
If the compilation and execution encounter no errors, the test is considered to have passed.
125
125
126
-
There are also negative tests checking code expected to fail compilation. See note about baseline under "Other Tips" bellow for tests checking expectations against "baseline" (.bsl) files.
126
+
There are also negative tests checking code expected to fail compilation. See note about baseline under "Other Tips" below for tests checking expectations against "baseline" (.bsl) files.
127
127
128
128
### FSharpQA Suite
129
129
@@ -174,7 +174,7 @@ All test execution logs and result files will be dropped into the `tests\TestRes
174
174
### Working with baseline tests
175
175
176
176
FSharp Test Suite works with a couple of `.bsl` (or `.bslpp`) files describing "expected test results" and are called the _Baseline Tests_. Those are matched against the actual output that resides under `.err` or `.vserr` files of the same name during test execution.
177
-
When doing so keep in mind to carefully review the diff before comitting updated baseline files.
177
+
When doing so keep in mind to carefully review the diff before committing updated baseline files.
178
178
179
179
The `.bslpp` (for: baseline pre-process) files are specially designed to enable substitution of certain tokens to generate the `.bsl` file. You can look further about the pre-processing logic under [tests/fsharp/TypeProviderTests.fs](tests/fsharp/TypeProviderTests.fs), this is used only for type provider tests for now.
Copy file name to clipboardExpand all lines: buildtools/README-fslexyacc.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ That means we have to build up FsLex and FsYacc from scratch, _including_ their
15
15
We can't pick up the source from "packages" because in a build-from-source scenario we can't even fetch those
16
16
packages - we really have to build from just our source tree and .NET SDK.
17
17
18
-
Please do _not_ modify the code in these directories except by copying over from an upgraded FsLexYacc pacakge.
18
+
Please do _not_ modify the code in these directories except by copying over from an upgraded FsLexYacc package.
19
19
Without the testing and documentation in the `FsLexYacc` repo, this copied code is just a bunch of untested, undocumented and
20
20
largely generated code checked into our source tree.
21
21
@@ -31,14 +31,14 @@ For (1), to improve the code/table generators, make a PR to the `FsLexYacc` repo
31
31
32
32
For (2), normally for FsLexYacc-based tools the runtime is either a source inclusion of `Lexing.fs`, Lexing.fsi, Parsing.fs, Parsing.fsi or a reference to the `FsLexYacc.Runtime` package. The runtime contains LexBuffer and the lexing/parsing table interpreters.
33
33
34
-
However long ago we decided to duplicate and ingest the _runtime_ files for FsLex and FsYacc into the F# compiler rather than taking them directly from the FsLexYacc project. This was mainly because we wanted to squeeze optimizations out of them based on profiling and simplify them a bit. The duplicated files are `prim-lexing.fs`, `prim-parsing.fs` and the corresponding `.fsi` files in `src/utils`. These files are sufficient to implement the contracts exepcted by the FsLex/FsYacc generated code, and require exactly the same table formats as generated by FsLex/FsYacc.
34
+
However long ago we decided to duplicate and ingest the _runtime_ files for FsLex and FsYacc into the F# compiler rather than taking them directly from the FsLexYacc project. This was mainly because we wanted to squeeze optimizations out of them based on profiling and simplify them a bit. The duplicated files are `prim-lexing.fs`, `prim-parsing.fs` and the corresponding `.fsi` files in `src/utils`. These files are sufficient to implement the contracts excepted by the FsLex/FsYacc generated code, and require exactly the same table formats as generated by FsLex/FsYacc.
35
35
36
36
This means you can improve some aspects of the _runtime_ for FsLex and FsYacc by making direct changes to `prim-lexing.fs` and `prim-parsing.fs`.
37
37
38
38
For example, the _actual_`LexBuffer` type being used in the F# compiler (for all three lexers and grammars) is this one: https://github.com/dotnet/fsharp/blob/bdb64624f0ca220ca4433c83d02dd5822fe767a5/src/Compiler/Facilities/prim-lexing.fsi#L102 . (That version of the Lex/Yacc runtime has added some things: `BufferLocalStore` for example, which we use for the `XmlDoc` accumulator as we strip those out. It's also dropped any mention of async lexing, and any mention of `byte`. The use
39
39
of generics for `LexBuffer<'Char>` is also superfluous because `'Char` is always `char` but is needed because the FsLex/FsYacc generated code expects this type to be generic.)
40
40
41
-
## What if I want to eridicate our use of FsLex and FsYacc?
41
+
## What if I want to eradicate our use of FsLex and FsYacc?
42
42
43
43
The use of FsLex and FsYacc in this repo is somewhat controversial since the C# compiler implementation uses hand-written lexers and parsers.
44
44
@@ -48,7 +48,7 @@ overly difficult given the declarative nature of `FsLex` tokenization.
48
48
The use of a table-driven LALR(1) parser is more controversial: there is a general feeling that it would be great to
49
49
somehow move on from FsYacc and do parsing some other way. However, it is not at all easy to do that and remain
50
50
fully compatible. For this reason it is unlikely we will remove the use of FsYacc any time soon. However incremental
51
-
modifications to extract more information from the grammer may yield good results.
51
+
modifications to extract more information from the grammar may yield good results.
52
52
53
53
## Why aren't FsLex and FsYacc just ingested into this repo if we depend on them (and even have an exact copy of them for build-from-source)?
54
54
@@ -57,7 +57,7 @@ considered carefully. While we are open to adding features to these tools specif
57
57
independently. For these reasons it is generally best that these tools live in their own repository.
58
58
59
59
The copy of the `fslex` and `fsyacc` source code in `buildtools` is an exact copy and is not tested or documented
60
-
apart from what's been done before in FsLexYacc repo. Adjusting these copies is not allowed and would be wrong from an engineering persepctive,
60
+
apart from what's been done before in FsLexYacc repo. Adjusting these copies is not allowed and would be wrong from an engineering perspective,
61
61
because there's no place to put documentation or tests.
62
62
63
63
Occasionally we discuss ingesting FsLex and FsYacc into this repository. This often comes up in the hope that by doing so
Copy file name to clipboardExpand all lines: buildtools/fslex/Lexing.fs
+1-1
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ and [<Sealed>]
72
72
letextendBufferAsync=(fun()->match filler.fillAsync with Some refill -> refill this | None -> invalidOp "attempt to read asynchronously from a synchronous lex buffer")
73
73
let mutablebuffer=[||]
74
74
75
-
/// number of valid charactes beyond bufferScanStart
75
+
/// number of valid characters beyond bufferScanStart
Copy file name to clipboardExpand all lines: buildtools/fslex/Lexing.fsi
+2-2
Original file line number
Diff line number
Diff line change
@@ -136,7 +136,7 @@ type AsciiTables =
136
136
/// Interpret tables for an ascii lexer generated by fslex.
137
137
member Interpret: initialState:int * LexBuffer<byte>-> int
138
138
139
-
[<System.Obsolete("Async interretation of lexer tables is now obsolete and will be removed. Please use a background thread if you want async lexing")>]
139
+
[<System.Obsolete("Async interpretation of lexer tables is now obsolete and will be removed. Please use a background thread if you want async lexing")>]
140
140
/// Interpret tables for an ascii lexer generated by fslex, processing input asynchronously
141
141
member AsyncInterpret: initialState:int * LexBuffer<byte>-> Async<int>
142
142
@@ -150,7 +150,7 @@ type UnicodeTables =
150
150
/// Interpret tables for a unicode lexer generated by fslex.
151
151
member Interpret: initialState:int * LexBuffer<char>-> int
152
152
153
-
[<System.Obsolete("Async interretation of lexer tables is now obsolete and will be removed. Please use a background thread if you want async lexing")>]
153
+
[<System.Obsolete("Async interpretation of lexer tables is now obsolete and will be removed. Please use a background thread if you want async lexing")>]
154
154
/// Interpret tables for a unicode lexer generated by fslex, processing input asynchronously
155
155
member AsyncInterpret: initialState:int * LexBuffer<char>-> Async<int>
Copy file name to clipboardExpand all lines: buildtools/fsyacc/Lexing.fs
+1-1
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ and [<Sealed>]
72
72
letextendBufferAsync=(fun()->match filler.fillAsync with Some refill -> refill this | None -> invalidOp "attempt to read asynchronously from a synchronous lex buffer")
73
73
let mutablebuffer=[||]
74
74
75
-
/// number of valid charactes beyond bufferScanStart
75
+
/// number of valid characters beyond bufferScanStart
Copy file name to clipboardExpand all lines: buildtools/fsyacc/Lexing.fsi
+2-2
Original file line number
Diff line number
Diff line change
@@ -136,7 +136,7 @@ type AsciiTables =
136
136
/// Interpret tables for an ascii lexer generated by fslex.
137
137
member Interpret: initialState:int * LexBuffer<byte>-> int
138
138
139
-
[<System.Obsolete("Async interretation of lexer tables is now obsolete and will be removed. Please use a background thread if you want async lexing")>]
139
+
[<System.Obsolete("Async interpretation of lexer tables is now obsolete and will be removed. Please use a background thread if you want async lexing")>]
140
140
/// Interpret tables for an ascii lexer generated by fslex, processing input asynchronously
141
141
member AsyncInterpret: initialState:int * LexBuffer<byte>-> Async<int>
142
142
@@ -150,7 +150,7 @@ type UnicodeTables =
150
150
/// Interpret tables for a unicode lexer generated by fslex.
151
151
member Interpret: initialState:int * LexBuffer<char>-> int
152
152
153
-
[<System.Obsolete("Async interretation of lexer tables is now obsolete and will be removed. Please use a background thread if you want async lexing")>]
153
+
[<System.Obsolete("Async interpretation of lexer tables is now obsolete and will be removed. Please use a background thread if you want async lexing")>]
154
154
/// Interpret tables for a unicode lexer generated by fslex, processing input asynchronously
155
155
member AsyncInterpret: initialState:int * LexBuffer<char>-> Async<int>
// 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
744
+
// We add in order of precedence - however the precedences may be the same, and we give warnings when precedence resolution is based on implicit file orderings
0 commit comments