How to create a parser in erlang that will take in a properly formed propositional formula and converts it into some internal representation.
Listing the available tools for creating a parser in erlang and also projects that uses them can be helpful.
You can use leex
, yecc
, spell1
and some others.
leex: A regular expression based lexical analyzer generator for Erlang, similar to lex or flex. A lexer file includes parts for Definition
, Rules
and also Erlang codes.
yecc: An LALR-1 parser generator for Erlang, similar to yacc. A parser generator file includes parts for Non-terminals
, Terminals
, Rules
and Root-symbols
.
spell1: An LL(1) parser generator for Erlang and LFE which is a Lisp dialect language on top of Erlang.
neotoma: A packrat parser-generator for Erlang for Parsing Expression Grammars (PEGs).
Some open source projects that uses them:
This Slide includes some useful examples about how to use them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With