FParsec: Creating a Parser Dynamically

In one of the previous posts the following definition for parsing simple Push types was discussed: The most noteworthy entry here is pushSimpleTypes. This parser is created dynamically from internally implemented Push types (INTEGER, FLOAT, etc) and may be dynamically extended if it becomes necessary to parse a new type. The dynamic parser is built … Continue reading FParsec: Creating a Parser Dynamically

FParsec: Parsing a List of Dynamic Keywords

In the previous post we mentioned code that parses Push types and Push operations: Tokens for Push types are a dynamic collection of keywords. "Dynamic" in a sense that a developer might add to it when extending the language. We therefore need to create a parser that would recognize tokens from a dynamic set. Since … Continue reading FParsec: Parsing a List of Dynamic Keywords

Parsing a Push Program

Parsing with FParsec   Push has a very simple program structure: Program ::= literal | operation | ( program *)                    (1) This is reflected in the F# code, using FParsec:                  (2) FParsec parses the document by combining together atomic parsers in different ways. This makes building a parser a very intuitive process. This … Continue reading Parsing a Push Program