Re: canonical/syntax-diagrams representation

Well it’s good to see that there are some adults on THIS group too.

IMO the clearest syntax representation ever, was the
syntax-diagram format of PASCAL which was used in
the 70s.

Clifford H. wrote:

You can get railroad diagrams from ANTLRworks for any ANTLR
grammar. However they (and syntax-directed editors in general)
are much less effective for languages that require significant
look-ahead.If you manage to make an ANTLR grammar for Ruby,
I’ll be a little amazed (though it’s definitely possible)
and you’ll be a hero in here. But it’s a massive task.
The LALR-based grammar for Ruby has many context-sensitive
areas which rely on large look-ahead.

OK, IIRC Pascal had 1 char for the tokeniser look-ahead,
and 1 token look-ahead for the parser.

Can anybody point me to an on-line minimal formal
syntax for ruby, so as to not rely on the chatty tutors.
We want a train-time-table format; not a novel.
No such syntax description exists. Even if it did, a syntax
directed editor probably wouldn’t work very well for Ruby.

Thanks. I’ll avoid this potential tar-trap.
The superficial simplicity is deceptive.

I love jazz: how it offers the oportunity for the artist to display
acrobatic complexity. But not for a language/tool that I
have to use to solve my problems. That’s probably why
Ruby is so popular with the kiddies.

You didn’t comment on the virtues or otherwise of
‘alternative syntax’: either include brackets for args, or not,
as you like. I suppose it’s so Baroque/jazzy already, that the
extra complication doesn’t add much more opportunity for
confusion/errors.

Thanks,

== Chris Glur.

I love jazz: how it offers the oportunity for the artist to display
acrobatic complexity. But not for a language/tool that I
have to use to solve my problems. That’s probably why
Ruby is so popular with the kiddies.

It’s true that all children love duck-typing, unusual formal grammars
and jazz music,
but LOL! Those kids have cash now.

CYA!
xoxoxoxoxoxoxo

P.S. OMG UR OLD

matz is nice, so we are nice.

Sorry guys, he made me angry with his horrible words.

On 05/17/11 16:27, [email protected] wrote:

OK, IIRC Pascal had 1 char for the tokeniser look-ahead,
and 1 token look-ahead for the parser.

Yes. Undergraduate project I did in 1979.

The superficial simplicity is deceptive.

The absence of explicit form (like missing method-call parentheses, for
example) allows the syntax to be used to construct very natural and
fluid DSLs, but opens up significant complexity in parsing.

Personally though, I favour explicit (external) DSLs, which is why I
maintain Treetop.

That’s probably why Ruby is so popular with the kiddies.

It’s possible to get treatment for basic sociopathy, such as you
exhibit.

FWIW, I’ve been in the industry for 30 years, and have led teams that
built software products that are still deployed on millions of
enterprise
machines around the globe, running corporations with household names.
When I chose to learn Ruby (in 2002), I felt a renewed joy in
programming
that I hadn’t felt in years. That was the experience of many here, BTW.
Call it childish if you will, but that’s an ignorant point of view, and
a
completely gratuitous comment, coming from an outsider.

Clifford H…

On Tue, May 17, 2011 at 2:37 PM, Johnny M. [email protected]
wrote:

It’s true that all children love duck-typing, unusual formal grammars
and jazz music,
but LOL! Those kids have cash now.

CYA!
xoxoxoxoxoxoxo

P.S. OMG UR OLD

matz is nice, so we are nice.


Phillip G.

Though the folk I have met,
(Ah, how soon!) they forget
When I’ve moved on to some other place,
There may be one or two,
When I’ve played and passed through,
Who’ll remember my song or my face.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs