Updated GSoC 2015 Ideas (markdown)

This commit is contained in:
Dennis Felsing 2015-02-11 13:47:50 +01:00
parent 961e990e25
commit fe73cf209b
1 changed files with 5 additions and 5 deletions

View File

@ -245,14 +245,14 @@ ___
**Description:**
Lexer generators are useful tools for writing all sorts of parsers. Currently Nimrod lacks a native Lexer generators. This project involves the implementation of a lexer generator. It should be modelled after [re2c](http://re2c.org/) or alternatively it can be based on the wide number of existing lexer generators such as Flex.
Lexer generators are useful tools for writing all sorts of parsers. Currently Nim lacks a native Lexer generators. This project involves the implementation of a lexer generator. It should be modelled after [re2c](http://re2c.org/) or alternatively it can be based on the wide number of existing lexer generators such as Flex.
Here is a sketch of a possible implementation:
* Parse regular expressions into an NFA and ensure the attached Nimrod actions are kept around through the next different passes.
* Parse regular expressions into an NFA and ensure the attached Nim actions are kept around through the next different passes.
* Translate the NFA to an DFA: http://web.cecs.pdx.edu/~harry/compilers/slides/LexicalPart3.pdf
* Minimize the DFA with Hopcroft's algorithm: http://en.wikipedia.org/wiki/DFA_minimization
* Translate the DFA into Nimrod code and attach the actions.
* Translate the DFA into Nim code and attach the actions.
**Desirable skills**: Knowledge of lexer generators. How to translate regexes into DFAs and how to optimize the resulting automatons.
@ -260,11 +260,11 @@ Here is a sketch of a possible implementation:
**Mentor:** zahary ([@zah](http://github.com/zah))
___
#### Implement a Nimrod backend for the Ragel state machine generator
#### Implement a Nim backend for the Ragel state machine generator
**Description:**
[Ragel](http://www.complang.org/ragel/) is a "finite-state machine compiler with output support for C, C++, C#, Objective-C, D, Java, OCaml, Go, and Ruby source code." This project involves the implementation of a Nimrod backend for Ragel. This can be based on the large number of pre-existing backends listed previously.
[Ragel](http://www.complang.org/ragel/) is a "finite-state machine compiler with output support for C, C++, C#, Objective-C, D, Java, OCaml, Go, and Ruby source code." This project involves the implementation of a Nim backend for Ragel. This can be based on the large number of pre-existing backends listed previously.
**Desirable skills**: Knowledge of Ragel's internals.