bnf

Parser-generator that outputs C# given a BNF grammar?

I'm looking for a tool that will be able to build a parser (in C#) if I give it a BNF grammar (eg. http://savage.net.au/SQL/sql-2003-2.bnf) Does such a generator exist? ...

Regex Grammar

Is there any BNF grammar for regular expression? ...

Use existing languages in BNF with TinyPG?

How can I use these BNF grammars which are in GOLD meta-syntax (RegExp + BNF) with TinyPG? I'm new to BNF so approximately what sort of conversion will I have to do to convert BNF to EBNF? I believe it should be pretty simple since TinyPG needs RegExp + EBNF in comparison to the GOLD grammars which are RegExp + BNF. Also, is there any ...

Repository of BNF Grammars?

Is there a place I can find Backus–Naur Form or BNF grammars for popular languages? Whenever I do a search I don't turn up much, but I figure they must be published somewhere. I'm most interested in seeing one for Objective-C and maybe MySQL. ...

Java EBNF?

Does anyone know of an accurate source for an (E)BNF for the Java language? Preferably, it would be from an authorative source, e.g. Sun. Thanks. ...

Where can I get material for learning EBNF?

Extended Backus–Naur Form: EBNF I'm very new to parsing concepts. Where can I get sufficiently easy to read and follow material for writing a grammar for the boost::spirit library, which uses a grammar similar to EBNF? Currently I am looking into EBNF from Wikipedia. ...

BNF to regular Expressions

How can I describe the language A → AA | ( A ) | ε generates using regular expressions? ...

BNF to Regex

Is there any way to convert the following BNF into a .Net regex? (I'm not stuck on the BNF, but I thought it might be the best way to explain what I was trying to do) <field> ::= "<<" <fieldname> <options> ">>" <options> ::= "" | "(" <option> ")" <option> ::= "" | <option> <non-paren> | <option> <escaped-c...

How to determine whether a grammar is LL(1) LR(0) SLR(1)

Is there a simple way to determine wether a grammar is LL1, LR0, SLR1... just from looking on the grammar without doing any complex analysis? For instance: To decide wether a BNF Grammar is LL1 you have to calculate First and Follow sets first - which can be very time consuming in some cases. Has anybody got an idea how to do this fast...

describing something, should i use Backus-Naur Form?

I want to describe a complex script and possibly programming language. i was thinking of describing it in Backus-Naur Form before doing anything (excluding dummy/sample script code) Is there another form to describe a language then Backus-Naur Form? What alternatives should i consider? ...

BNF grammar matching

My teacher has given me two bnf grammars: A ::= 'd' | A 'e' A | A 'f' A B ::= 'd' | B B 'e' | B B 'f' and four strings to match with them: dffd dddefddfe dedf deded I've figured out two of them, but the other two have me stumped. I don't want anyone to tell me the answers, but if someone could give me some hints as to where I'm...

Where can I find standard BNF or YACC grammar for C++ language?

I'm trying to work on a kind of code generator to help unit-testing an legacy C/C++ blended project. I don't find any kind of independent tool can generate stub code from declaration. So I decide to build one, it shouldn't be that hard. Please, anybody can point me a standard grammar link, better described by yacc language. Hope I'm n...

Context free grammar conversion

hi..can anyone let me know if there is any software to convert Chomsky normal form to Backus–Naur Form and vice versa? ...

JavaME-suitable grammar compiler recommendations?

I want to parse some data, and I have a BNF grammar to parse it with. Can anyone recommend any grammar compilers capable of generating code that can be used on a mobile device? Since this is for JavaME, the generated code must be: Hopefully pretty small Low dependencies on exotic Java libraries Not dependant on any runtime jar files. ...

Ruby Grammar

I'm looking for Ruby grammar in BNF form. Is there an official version? ...

Please help me define a language in EBNF

Give the EBNF specification for the language L that is made up of the chars a, b and c such that sentences in the language have the form L : sqsR -s is a string of any combination of the characters a and b -sR is that same string s reversed -q is an odd number of c's followed by either an odd number of b's or an even number ...

Tool for generating railroad diagram used on json.org

I love the syntax or railroad diagrams on json.org which are a graphical representation of the BNF language. I haven't found any tools that can produce results as eloquently. Can anyone identify the tool used to generate these diagrams? ...

JavaScript for-loop in BNF

Hi I'm writing BNF for JavaScript which will be used to generate a lexer and a parser for the language. However, I'd like some ideas on how to design the for-loop. Here is the simplified version of my current BNF: [...] VarDecl. Statement ::= "var" Identifier "=" Expr ";" ForLoop. Statement ::= "for" "(" Expr ";" Expr ";" Expr ")" [......

Seeking an interactive utility for creating context free parser grammars

Hi, I would like a utility which I can give a piece of text (in a text box) and experiment with a parser grammar (through editing a BNF of similar) and token structure while I can see how the parse tree would look (and if it's not able to parse the text using my current grammar, I would see where it halted). The key word is interactivi...

How can I define an INI file grammar using the BNFC?

http://www.cs.chalmers.se/Cs/Research/Language-technology/BNFC/ how should I write my labeled BNF to get BNFC to generate a INI parser for me? I have only gotten so far o__O! entrypoints File ; comment "#" ; token ID ( letter | digit | ["-_'"] )+ ; Ini. File ::= [Section] ; Sect. Section ::= "[" ID "]" [Statement] ; Bind. Statement...