Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Question: Finding STD C syntax in both BFN & Raiload Diagrams...

18 views
Skip to first unread message

bj7lewis

unread,
Feb 26, 2007, 3:27:16 AM2/26/07
to
I am trying to understand STD C scaning and parsing and am trying to find
STD C syntax BFN & Raiload Diagrams and found both these...

BFN - http://www.quut.com/c/ANSI-C-grammar-y-1995.html
Raiload Diagrams - http://www-ccs.ucsd.edu/c/ by P.J. Plauger and Jim Brodie

Both are good docs but there syntax are in different standards of C which I
don't care which standard I use just that the syntax i am to study is 100%
on the same standard. Note: http://www-ccs.ucsd.edu/c/ says it jumps from
standard to standard. I am looking for to BFN & Raiload Diagrams docs(each
split in pages is find) that are 100% on the same version of STD C or better
yet if they were sectioned into one doc like...

[Rule 1 in BNF]

[Same Rule 1 in as Raiload Diagram]

[Rule 2 in BNF]

[Same Rule 2 in as Raiload Diagram]

Note: Or Raiload Diagram 1st then the BNF of the rule 2nd. Plus any extra
info about rule...

But the same thing is that each rule's BNF & Raiload Diagram match because
the Expression BNF here at
http://www.quut.com/c/ANSI-C-grammar-y-1995.html#expression will delegates
looking XXXfix operators that
http://www-ccs.ucsd.edu/c/express.html#Reading%20Expressions directly shows.
Now I know they turn up to be equal when two compiler STD C build one build
using 1st links expression rule and the other build using the 2nd links
expression rule will both produce the same runtime results of test examples
below but have different parsing code and abstract trees that I am trying to
understand now so I need both BNF & Raiload Diagram to match to help
understand each rule.

//Test 1 feed thur both compilers...
++x * y

//Test 2 feed thur both compilers...
x++ + y

So I there any STD C docs that syntax rules BNF & Raiload Diagram match?

Any Help...


Douglas A. Gwyn

unread,
Feb 26, 2007, 3:40:51 PM2/26/07
to
bj7lewis wrote:
> ... I need both BNF & Raiload Diagram to match to help
> understand each rule.

Why would you need both?

Anyway, it is a trivial matter to create your own railroad
diagram from the grammar, which would ensure consistency.

bj7lewis

unread,
Feb 26, 2007, 9:17:02 PM2/26/07
to
"Douglas A. Gwyn" <DAG...@null.net> wrote in message
news:45E345D3...@null.net...

> bj7lewis wrote:
>> ... I need both BNF & Raiload Diagram to match to help
>> understand each rule.
>
> Why would you need both?
Easier to understand the rails(or any diagram for any other lang/system not
just C) and even BNF I am still learning it's syntax too...

> Anyway, it is a trivial matter to create your own railroad
> diagram from the grammar, which would ensure consistency.

Sure, if I already fully unstood the standards grammar and if I wanted to
teach it to the world but can't cause I don't fully unstood the standards
grammar that way I am trying to learn the standard BNF & Raiload Diagram
alike...

Any More Help...

Douglas A. Gwyn

unread,
Feb 27, 2007, 11:33:45 AM2/27/07
to
"bj7lewis" <bj7l...@charter.net> wrote in message
news:AwMEh.258$gy3...@newsfe06.lga...

> "Douglas A. Gwyn" <DAG...@null.net> wrote in message
> news:45E345D3...@null.net...
>> bj7lewis wrote:
>>> ... I need both BNF & Raiload Diagram to match to help
>>> understand each rule.
>> Anyway, it is a trivial matter to create your own railroad
>> diagram from the grammar, which would ensure consistency.
> Sure, if I already fully unstood the standards grammar and if I wanted to
> teach it to the world but can't cause I don't fully unstood the standards
> grammar that way I am trying to learn the standard BNF & Raiload Diagram
> alike...

You have missed an essential point: The railroad diagram can be
constructed from the BNF-like gammar by a *simple, mindless procedure*.
You don't have to understand anything about C to construct the railroad
diagram. All you have to understand is what the syntax notation denotes,
such as alternation, sequencing, recursion, etc.


bj7lewis

unread,
Feb 27, 2007, 9:58:59 PM2/27/07
to
> You have missed an essential point: The railroad diagram can be
> constructed from the BNF-like gammar by a *simple, mindless procedure*.
> You don't have to understand anything about C to construct the railroad
> diagram. All you have to understand is what the syntax notation denotes,
> such as alternation, sequencing, recursion, etc.
No, I do see your point but lang syntax alternation, sequencing, recursion
is want i am trying to learn not C itself(BNF can given for any lang but C
is what I am looking at here). Now my problem is that the BNF is complex in
http://www.quut.com/c/ANSI-C-grammar-y-1995.html to undestand compared to
the BNF that can be generated from http://www-ccs.ucsd.edu/c/. I am not
looking to generate BNF <-> diagramming from the repected other just to
learn from other doc if matching BNF <-> diagramming docs don't exist then
that is anothe thing.

Any More Help...


0 new messages