pathterminuspages/projects/aboutcontactabout me

Parser Generator - Intro

Grammar2Slr #1 :: 31-08-2018

Contents
 @Parser Generator - Intro
 -Parser Generator - Syntax
 -Parser Generator - Definitions
 -Parser Generator - Workings

This is a project in building an actual SLR parser generator. I must tell in advance: I made this application some months ago. Thus I do not remember all the details. The application is written in a mix of F# and JS. Add to that HTML, CSS and even some C# for page implementation, and you have a quite tiresome programming experience. Hence I will describe this project mostly in general terms.

This application is not available to run on this webpage. This is so due to the fact that big grammars can cause a tremendous workload on my poor server. So in order to use it you have to clone the whole git repo and run it off line.

I made this since I already have made Set Generators (Nullable, First and Follow) and a NFA to DFA converter. So I thought I might as well build the whole generator.

The application is fairly complex. The whole process of generations is as described in Prop2Table - Parsing Input. The application seems to work properly in the realm of SLR parsing - SLR parsers have limits to what abstract syntax they can handle. More on that later.

For now the application can emit two forms of parsers: one generated in JavaScript and one generated in Fsharp. Furthermore you can use it to create parsing tables either as html-code or as a table.

SLR-parsing have limits. If you are looking for a more expressive type of parser generator, you can take a look at the famous YACC Parser Generator. The original YACC is for the C programming language, I think. But there ought to be implementations that target most popular languages.

CommentsGuest Name:Comment: