Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

BNF Basics Expand / Collapse
Author
Message
Posted Tuesday, July 28, 2009 1:37 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, November 9, 2012 12:30 PM
Points: 27, Visits: 60
Comments posted to this topic are about the item BNF Basics
Post #760573
Posted Wednesday, August 12, 2009 7:03 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, July 4, 2013 2:16 PM
Points: 16, Visits: 39
Excellent subject, but the write up, while well intended, tries to summarize too much information. For most folks, I doubt if they would even bother trying to match up the information into the functional example to really understand much. The foo:bar example really needs expanding and perhaps revised to apply to the example that is initially displayed at the beginning of the article. This article is intended as an application article or an explanation/resolution article. Either way, it misses the mark as it really does not bring the reader forward in logical steps that make sense without further research into the topic. My 2 cents...


Post #769286
Posted Wednesday, August 12, 2009 7:34 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 1:17 PM
Points: 2,661, Visits: 19,196
Disagree with Lambchop in general, but specifically think the comment about requiring additional research was on the mark. However, don't think that's a bad thing. I think you've provided a great springboard for newbies to get their feet wet in BNF/BOL and get comfortable enough to sort out the details.

Those who won't bother reading through the article to figure it out will be the ones who don't bother reading BOL either, so no biggy.

Good job!

Jon


---------------------------------------------------------
How best to post your question
How to post performance problems
Tally Table:What it is and how it replaces a loop

"stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."
Post #769296
Posted Wednesday, August 12, 2009 8:12 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, June 10, 2010 3:51 AM
Points: 87, Visits: 73
In the second example under BNF ala T-SQL, am I missing something?

Let us also make it a requirement that when calling bar it demands further information, which can be accomplished via squiggly brackets. And if these arguments are not provided, then bar will assume a default value of constant “1” as indicated by an underline.

<foo>::= [<foo> |<bar>]
<bar>::= {1 | 2}


Where is the underline? I assume that the second line is really supposed to read:

<bar>::= {_1_ | 2}

but it would be nice to know.

Good writeup, otherwise!

Also, a somewhat off-topic question. Should one really be required to manually HTML-escape the less than and greater than signs, or am I doing something wrong?
Post #769335
Posted Wednesday, August 12, 2009 8:40 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, November 9, 2012 12:30 PM
Points: 27, Visits: 60
Some formatting didn't transfer from Word to HTML, such as, underlining & bold.

Good catch, thank you!
Post #769362
Posted Wednesday, August 12, 2009 9:31 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Thursday, June 5, 2014 10:54 AM
Points: 9,902, Visits: 9,480
Nice article. I have a couple of notes though:

1) What you are describing is actually a simplified informal version of EBNF, not BNF (though the standards groups do use the formal versions). For instance it adds the ellipsis ("...") as a repetition operator as well as other common conventions. This is the language definition format used almost universally in Language Syntax Manuals since the 60's.

2) In English, these ("{ }") are called braces, not "brackets" or "curly brackets", or even "squiggly brackets". It seriously undermines the credibility of anyone talking about language definitions if they do not know the proper terms for the language that they themselves are using. (yes, it's a hot button of mine)

Still, very nice article.


-- RBarryYoung, (302)375-0451 blog: MovingSQL.com, Twitter: @RBarryYoung
Proactive Performance Solutions, Inc.
"Performance is our middle name."
Post #769414
Posted Wednesday, August 12, 2009 9:35 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 1:17 PM
Points: 2,661, Visits: 19,196
RBarryYoung (8/12/2009)
Nice article. I have a couple of notes though:

1) What you are describing is actually a simplified informal version of EBNF, not BNF (though the standards groups do use the formal versions). For instance it adds the ellipsis ("...") as a repetition operator as well as other common conventions. This is the language definition format used almost universally in Language Syntax Manuals since the 60's.

2) In English, these ("{ }") are called braces, not "brackets" or "curly brackets", or even "squiggly brackets". It seriously undermines the credibility of anyone talking about language definitions if they do not know the proper terms for the language that they themselves are using. (yes, it's a hot button of mine)

Still, very nice article.


And just to clarify, when people refer to braces, they are really talking about orthodontia.


---------------------------------------------------------
How best to post your question
How to post performance problems
Tally Table:What it is and how it replaces a loop

"stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."
Post #769422
Posted Wednesday, August 12, 2009 10:06 AM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Tuesday, June 10, 2014 2:36 PM
Points: 784, Visits: 719
And just to clarify, when people refer to braces, they are really talking about orthodontia.


I'm usually discussing ways of keeping my trousers from falling down. My father-in-law is a carpenter and has a different take on the word altogether.

The last time someone really pushed my button on the topic of punctuation was when I told one of my colleagues to use an apostrophe and he asked me if that was the "comma up in the air". I was very impressed with the way that I managed to refrain from comment at the time.



--
Scott Doughty
Post #769478
Posted Wednesday, August 12, 2009 11:42 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, December 20, 2012 1:03 PM
Points: 265, Visits: 589
Good topic Tom. Speaking of BOL, I think it can be improved by providing a better match between BNF descriptions and examples that follow. One easy way would be to repeat the applicable BNF with each example. Another would be to make the examples more exhaustive so that all BNF options used in the definition are used in examples. Otherwise BNF just acts as another layer of indirection and not a natural part of composing T-SQL.
Post #769534
Posted Wednesday, August 12, 2009 11:51 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 1:17 PM
Points: 2,661, Visits: 19,196
sjsubscribe (8/12/2009)
Another would be to make the examples more exhaustive so that all BNF options used in the definition are used in examples. Otherwise BNF just acts as another layer of indirection and not a natural part of composing T-SQL.


I wouldn't want to be the guy creating all those examples, but good idea, that would help.


---------------------------------------------------------
How best to post your question
How to post performance problems
Tally Table:What it is and how it replaces a loop

"stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."
Post #769540
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse