[erlang-questions] BNF/EBNF Grammar for Erlang
Ryan Molden
ryanmolden@REDACTED
Mon Nov 14 16:55:07 CET 2011
Yep, it is much more clear ignoring the RHS of the :, I just didn't
realize that bit was meaningless to me and am not in the general habit
of ignoring vast swaths of what appears in the grammar file.
I also processed the YRL file to just delete all the stuff to the right
of the :, but thanks for the attachment anyhow.
Ryan
From: Richard O'Keefe
Sent: 11/13/2011 4:45 PM
To: Ryan Molden
Cc: Richard Carlsson; erlang-questions@REDACTED
Subject: Re: [erlang-questions] BNF/EBNF Grammar for Erlang
On 12/11/2011, at 9:55 AM, Ryan Molden wrote:
> 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'))]}.
Read what's before the colon:
binary_type -> '<<' '>>'.
binary_type -> '<<' bin_base_type '>>'.
This *is* BNF, up to punctuation.
I've attached a copy of the R12B-5 grammar with the "what to build"
part stripped out. This really is about as clear as it can get.
More information about the erlang-questions
mailing list