bnf

Is HL7 (HL7.org) message format expressable as BNF with LALR(1) Compatability????

Title says it all. Reposted this as a new messsage (orgiginally I asked for the BNF grammar of HL7). Whilst it may be possible to express all of HL7 as BNF I need my BNF to be LALR(1) complaint (completely deterministic). Devon Cooks Gold Parser is the toolset. Just figured I 'd ask before I started creating BNF myself....... ...

spotting an Ambiguous BNF

I have an assignment to correct an ambiguous BNF, but I am completely lost. I know this not a true programming question, and I will gladly delete it if it is not an appropriate question for these boards. Are there any good sites where I could learn more about BNF's? The one I am dealing with seems rather simple, but I can't find any exam...

Software other than paint to create parsetrees automagic

I have a BNF grammar, and quite a few expressions that I am suppose to parse in regard to the grammar. Does it exists some software that I can enter the trees using ( ) to express the tree and than the software draws them? ...

Writing an interpreter, need help representing this data

Hello, I am writing a small interpreter to show an example of Backus-Naur form and i would like to ask for help representing some data. <statement> : <assignment> | HALT | PRINT(<variable>) <assignment> : <variable> = <expression> <expression> : <term> | <term><operator><expression> <term> : <number> | <variable> <variable> : x | y | z ...

Improve BNF for mathematic expressions

A good exercise while learning programming, is to write a calculator. To do this, I created some kind of DSL in BNF and want to ask for your help to improve it. With this minilanguage you should be able to add, multiply and assign values and expressions to names (a.k.a. create variables and functions). Hava a look at the BNF first: <Pr...

Interpreting SQL's BNF

I'm looking at the syntax of SQL, specifically the character string literal. <character string literal> ::= [ <introducer> <character set specification> ] <quote> [ <character representation> ... ] <quote> [ { <separator> <quote> [ <character representation> ... ] <quote> }... ] Ignoring the [ <introducer> <character set s...

What goes in between { and } when writing BNF?

I'm having some trouble with BNF. I can't tell what seems to be the standard way of doing things (if there is one), and whether or not there are types like char or int or whatever already built in. However, my main problem is not understand how the part of the BNF in curly braces works. Given something like: exp : term ...