[erlang-questions] BNF/EBNF Grammar for Erlang
Richard O'Keefe
ok@REDACTED
Mon Nov 14 01:45:44 CET 2011
A non-text attachment was scrubbed...
Name: erlang.grammar
Type: application/octet-stream
Size: 7407 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111114/ba08f89c/attachment.obj>
-------------- next part --------------
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