marcelog / ex_abnf

Parser for ABNF Grammars
Apache License 2.0
61 stars 12 forks source link

closes #3 and closes #4 #5

Closed marcelog closed 9 years ago

marcelog commented 9 years ago

This adds the possibility of having the equivalents of YACC's $$ (#4) and $n (#3), for rule value and token values respectively. Also, the return value for a rule is now by default a list with all the tokens that matched for that rule, in order.

Rule result ($$) MUST be a char_list by now, more work is required in the interpreter.ex module to support returning any type of value. Rule results are assumed to be char list (they are flattened and concatenated and passed as tokens to other rules when recursively processing the grammar)