[erlang-questions] BNF/EBNF Grammar for Erlang

Ryan Molden ryanmolden@REDACTED
Fri Nov 11 21:55:57 CET 2011

I'll assume that wasn't meant to be as condescending as it came off to me.

>which is about as clear as it can get

Yeah, something about
binary_type -> '<<' '>>' : {type, ?line('$1'),binary,
[abstract(0, ?line('$1')),
abstract(0, ?line('$1'))]}.

binary_type -> '<<' bin_base_type '>>' : {type, ?line('$1'),binary,
['$2', abstract(0, ?line('$1'))]}.

Doesn't scream out to me 'as clear as it gets'!  But reasonable people can
disagree.  As for how I would understand a full BNF/EBNF...well I am
familar with that format so I think I would somehow manage, even with my
lack of YRL familiarity.

Joe's response about how to parse the YRL (specifically pointing out I
could ignore the stuff to the right of the ':', which was most of the
'noise' for me) was much more helpful.

On Fri, Nov 11, 2011 at 12:36 PM, Richard Carlsson <
carlsson.richard@REDACTED> wrote:

> On 11/11/2011 09:28 PM, Ryan Molden wrote:
>> Yeah, no luck.  Neotoma (near as I can tell) is based at seancribbs /
>> neotoma (with numerous forks).  It is a parser generator for Erlang
>> that *understands* PEGs, it does not, itself, contain a PEG for the
>> actual Erlang language, just some trivial PEG examples for things like
>> JSON and some simple DSLs.
>> I am looking for an up-to-date BNF/EBNF/PEG grammar for the Erlang
>> language itself.
> I don't quite grasp what you're looking for. If you can't understand
> https://github.com/erlang/otp/**blob/master/lib/stdlib/src/**erl_parse.yrl<https://github.com/erlang/otp/blob/master/lib/stdlib/src/erl_parse.yrl>,
> (which is about as clear as it can get) how can you hope to understand
> *any* complete BNF grammar for Erlang?
>   /Richard
> ______________________________**_________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/**listinfo/erlang-questions<http://erlang.org/mailman/listinfo/erlang-questions>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111111/2725b109/attachment.htm>

More information about the erlang-questions mailing list