A concise, easy to understand example of a parser/lexer for a simple calculator language. It only implements the basic feature (add/sub/mult/div + parens), providing you with some easy opportunities to extend the language and figure out how it all hangs together (e.g. adding a "^" operator).
We've found this starter really useful in the office but are now struggling to get it to work with VS2012 and the newest version of the PowerPack - any chance it could be updated to work with Microsoft's new toolset? Thanks!
There is the solution of the problem. You need make some changes to .vsix file.
1. At the beginning copy fslex.exe and fsyacc.exe from "C:\Program Files (x86)\FSharpPowerPack-18.104.22.168\bin" to "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE" directory.
2. Rename "F# Parsed Language Starter.vsix" to "*.zip" and extract it to any directory.
3. Extract "Language.zip" from "Language" subdirectory.
4. In "extension.vsixmanifest" file modify version of Visual Studio from 10.0 to 11.0 in the line '<VisualStudio Version="10.0">'.
5. In "Language\Language.fsproj" file modify version of F# Power Pack from 22.214.171.124 to 126.96.36.199 in the line '<Import Project="$(MSBuildExtensionsPath32)\..\FSharpPowerPack-188.8.131.52\bin\FSharp.PowerPack.targets" />'.
6. Pack "Language" subdirectory to the "Language.zip" and remove the subdirectory.
7. Pack entire directory to the "F# Parser Language Starter.zip" and rename it to a "*.vsix" file.
8. Double click to a "F# Parser Language Starter.zip" to install it in Visual Studio.
Hey, i am pretty new to F#, and basically looking at it for the reason for fsLex. After installing your template, i attempted to run the new project as is and it fails to compile.
System.IO.FileNotFoundException: Could not load file or assembly 'System.Core, Version=184.108.40.206, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. FSLEX
This is probably an issue with my configuration, but i was hoping you can help.
When I try to use the downloadable extension, it says that "This extension is not installable on any currently installed products." Can somebody tell me how to fix this? I really want to use FsLex and FsYacc, but there are always errors like this. Thanks in advance for replying!
I had the same problem using the Integrated Shell version of Visual Studio. To get around it I edited the extension.vsixmanifest file inside the .vsix file (it's just a zip archive so open it with your favorite zip editor) and added <Edition>IntegratedShell</Edition> to the SupportedProducts element.
Thanks for sharing this template, I have downloaded and installed, however, I can't see any changes.
And how do I suppose to use this template?
And where can I see the source code?
Thanks and best regards,
Emma: I think I figured out what your problem is. I found if you don't shut down Visual Studio after installing the template, it may not be there in the Templates list when you hit "new project". Try again - it should be there. If you select it, you'll get all the source code and just have to hit F5 to get it running :-)