F# Parsed Language Starter

Free

A simple calculator language using a lexer and parser generated by FsLex.exe and FsYacc.exe from the F# PowerPack. This template can be used as a starter for more sophisticated parsing.

(2) Review
Visual Studio
2010
Download (5,257)
6/16/2010
1.2
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (2)
Q and A (5)
Sign in to write a review
Sort by:

by Lanzetta | August 07 2010

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).

by Daniel Mohl | July 30 2010

Sign in to start a discussion


  • VS 2012?
    2 Posts | Last post August 16, 2013
    • 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-4.0.0.0\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 2.0.0.0 to 4.0.0.0 in the line '<Import Project="$(MSBuildExtensionsPath32)\..\FSharpPowerPack-2.0.0.0\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.
  • Starter wants FSharpPowerPack-2.0.0.0
    1 Posts | Last post January 01, 2013
    • Starter wants FSharpPowerPack-2.0.0.0, but I have FSharpPowerPack-4.0.0.0 installed. How do I fix this?
  • System.IO.FileNotFoundException: System.Core 3.5
    1 Posts | Last post October 10, 2011
    • 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=3.5.0.0, 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.
      
  • Problem Installing
    2 Posts | Last post July 21, 2011
    • 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.
  • How to use this?
    3 Posts | Last post June 10, 2011
    • Hi Jomo,
      
      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
    • Hi Emma,
      
      Select "New Project" and then use the template tab to open up the template.
      
      Gavin
    • 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 :-)