Comments (4)
I wonder if compile error for '<keyword>
or ^<keyword>
type parameters is expected in F# or if it's a bug in the compiler. I will try to check the specs.
If it's expected then your change solves the problem and if not then we can use it as a workaround for the compiler bug.
from fslexyacc.
According to the syntax specs in https://fsharp.org/specs/language-spec/4.1/FSharpSpec-4.1-latest.pdf it works as expected.
from fslexyacc.
According to the specification(search type variable in the pdf):
type :=
( type )
type -> type -- function type
type * ... * type -- tuple type
typar
...
typar :=
_ -- anonymous variable type
'ident -- type variable
^ident -- static head-type type variable
ident-keyword
and ident
seem to be distingushable according the specification, so I'd think 'type
is not a bug, i.e., my PR solves the problem.
However, 'ident
can still be unexpected to the compiler team because I don't see a reason to reject type variables like 'type
.
from fslexyacc.
appreciate for your fast check.
from fslexyacc.
Related Issues (20)
- Emit tables for better diagnostics
- Reductions table being recreated on each parser invocation
- Variables in supplied ".target" file seems undefined leading to compilation error HOT 6
- Activating case insensitive option crash the lexer generator HOT 12
- Building a project which uses FsLex/FsYacc fails when building with Visual Studio 2019 HOT 2
- Publish the ASTs and parsers for the ASTs for the FsLex and FsYacc tools to enable more robust editor tooling HOT 13
- Not an issue more like an optimization HOT 2
- Can't find the FSharp.Text.Lexing and FSharp.Text.Parsing lib? HOT 1
- Invite you to try a new series of Lex/Yacc tools HOT 9
- a syntax highlighter for fslex, fsyacc, F#
- Question: Can we get FSLex to embed a comment with the date-time that the outputs were generated? HOT 1
- Invite you to try FslexFsyacc HOT 7
- How to turn on runtime debug output
- How to get a position of a token from ParseErrorContext HOT 1
- API Documentation issues
- %% Trailer seems not supported
- LexBuffer<char>.LexemeSpan
- removing the need for explicit numbering of enums in F#, possible fixing problem with struct decorated DU's without fields.
- Online grammar editor/tester
- "unrecognized input" after upgrade HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fslexyacc.