Snippets tagged parsing

  • Parsing string expressions, the lazy way

    Sometimes you'd be surprised at what functionality you can find inside the .Net framework. Apparently the DataTable object can compute string expressions. Nice for testing your own parser implementation, and/or for lazy coders like me. Note that the DataTable is created only once and reused with each function call.

    34 people like this

    Posted: 8 years ago by Arjen Kopinga

  • Uri Parser

    A Uri parser using the Cashel library [1]. This implementation is using ArraySegment as the underlying state, as I'm using it within a server, but it would be trivial to switch it to using a list. Also, note that I am not parsing the Uri into any specific structure, though that, too, would be trivial. For my current purposes, I just needed to validate the Uri. [1]

    26 people like this

    Posted: 7 years ago by Ryan Riley

  • sscanf - parsing with format strings

    A more complete version of sscanf, as proposed on stackoverflow by kvb: Fixed bug in previous version to work with visual studio '13

    21 people like this

    Posted: 7 years ago by Wolfgang Meyer

  • Loading .fs files

    This script facilitates to load all the .fs files in the specified F# project in correct compilation order.

    5 people like this

    Posted: 7 years ago by nagat01

  • Speech Stackoverflow article automatically

    This snippet automatically speeches text of question,answers and comments in a Stackoverflow article. It requires HtmlAgilityPack(available from Nuget package manager).(Attention: You need reset F# interactive to stop the speech)

    6 people like this

    Posted: 6 years ago by nagat01

  • Extract script blocks from html page

    This module extracts all the blocks out of an html page's header. This can be useful if you are writing tools to merge all the js for future minifaction, or for otherwise manipulating the files.

    4 people like this

    Posted: 5 years ago by devshorts

  • Log file parsing

    File parsing, based on multiple lines, using recursive pattern matching with many :: (cons) operator

    2 people like this

    Posted: 5 years ago by Tuomas Hietanen

  • Log file parser for log4Net files

    Log file parser for log4Net files

    3 people like this

    Posted: 5 years ago by Tuomas Hietanen

  • Simple C# Parser

    Simple prototype C# AST and parser using the FParsec parser combinator library. Parses a subset of C# 1.1 constructs.

    21 people like this

    Posted: 5 years ago by Phillip Trelford

  • Simple four function calculator

    This is a simple four function calculator using FParsec. It would be easy to replace the FParsec combinators with simple parsing combinators to produce the same results, but without the nice error messages produced by FParsec.

    2 people like this

    Posted: 3 years ago by Vesa Karvonen

  • Int32.tryParse

    Converts the string representation of a number in-place to an Int32. A return value of None indicates the conversion failed.

    2 people like this

    Posted: 1 year ago by Phillip Trelford