bnf

Visual Basic 6.0 Language Syntax

I've done a fair bit of googling, but I've been unable to find what I'm looking for. I am looking for documentation of the syntax to the Visual Basic 6.0 language. Specifically something that could theoretically be used to build a parser for the syntax. Does anyone know of such documentation? ...

Bug in Gold Parser? LALR

Here is a piece of my bnf grammer. //this works <ter-stmnt> ::= <rval> '?' <rval> ':' <rval> //this gets an error <ter-stmnt> ::= <bool-val> '?' <rval> ':' <rval> <bool-val> ::= <rval> This seems insane, shouldnt the second be EXACTLY the same as the first? i prefer the second bc when reading i see that i expect a bool value as op...

Z80 ASM BNF structure... I'm am on the right track?

I'm currently trying to get to grips with BNF and attempting to assemble some Z80 ASM code. Since I'm new to both fields So my question is, Am I even on the right track? I am currently trying to write the format of Z80 ASM as EBNF so that I can then figure out where to go from there to create machine code from the source. At the moment I...

What is the BNF for a regex (in order to write a full or partial parser)

I am interested in parsing regexes (not to be confused with using regexes for parsing). Is there a BNF for Java 1.6 regexes (or other languages?) [NOTE: There is a similar older question which did not lead to an answer for Java.] EDIT To explain why I need to do this. We are implementing a shallow parser for Natural language processing...

(E)BNF Parsing to XML

Is there any (E)BNF parser out there which is able to generate XML trees of the AST? Rephrasing: what is the quickest way to compile an (E)BNF defined language into some sort of XML? Bonus: Using Javascript :-) ...

Syntax (probably BNF) spec of VBA ?

Hi, I have to maintain a portion of Access 2003 VBA code, which is not my primary programming language, and while I'm pretty solid on doing regular stuff, I would still like to have a pure spec of the language syntax.. It just saves a lot of time compared to reading tons of stupid tutorials that tell me what a for loop is. Is there any...

bnf/ebnf for xml schema

I'm looking for a BNF/EBNF of XML Schema. I just found the one for XML (http://www.w3.org/TR/REC-xml or extracted at http://www.jelks.nu/XML/xmlebnf.html). Well it's a starting point, but I'm curious that I couldn't find a more specific one for XML Schema. ...

Generate C++ code for BNF grammar

I have looked at the following software tools: Ragel ANTLR BNF Converter Boost::Spirit Coco/R YACC ANTLR seems the most straight-forward, however its documentation is lacking. Ragel looks possible, too, but I do not see an easy way to convert BNF into its syntax. What other tools are available that can take BNF input and generate a ...

BNF grammar for sequence of statements

If I am making a grammar for a c-like language that has a sequence of statements, what is the most standard way for defining the grammar? My thought is to do something like this: <program> ::= <statement> <statement> ::= <statement-head><statement-tail> <statement-head> ::= <if-statement> | <var-declaration> | <assignment> | <whatever>...

Deriving a state machine from a BNF grammar

I am trying to put together a proof of concept of an XSS-safe string interpolation scheme. Given a string with substitutions, "Hello <b>$planetoid</b>!" I want break it into literal portions and substitutions ("Hello<b>" planetoid "</b>!") and then run a state machine left to right over the literal portions. When I reach an interpol...

what is the name of the convention used in this syntax diagram

I found this diagram in the JSON specification: Where does this diagramming convention come from? Is it just some random convention cooked up by D.C.? ...

Grammars, Scala Parsing Combinators and Orderless Sets

I'm writing an application that will take in various "command" strings. I've been looking at the Scala combinator library to tokenize the commands. I find in a lot of cases I want to say: "These tokens are an orderless set, and so they can appear in any order, and some might not appear". With my current knowledge of grammars I would hav...

EBNF for ECMAScript?

I'm trying to find a good EBNF description of ECMAScript, but so far I've not found anything complete. Any ideas? ...

Scala Parser Token Delimiter Problem

I'm trying to define a grammar for the commands below. object ParserWorkshop { def main(args: Array[String]) = { ChoiceParser("todo link todo to database") ChoiceParser("todo link todo to database deadline: next tuesday context: app.model") } } The second command should be tokenized as: action = todo message =...

Is there a BNF mode for Emacs?

I have to edit lots of grammar files in .bnf format. Is there a mode for this in Emacs? I've looked at CEDET's semantic package, and it seems that it USED to have a bnf-mode, but not any more. This snippet is googlable, but semantic-bnf-mode doesn't seem to exist: (autoload 'semantic-bnf-mode "semantic-bnf" "Mode for Bovine Normal Form...

AS3 Grammar: Most accurate

I'm looking for an accurate AS3 grammar (format in not an issue, but I presume ANTLR will feature the most) to use for a practice grammar I'm making. What is the most accurate grammar available for AS3? ...

Grammar Syntax and Linguistics...

I REALLY need a description of the english sentence structure in a way that can be translated by machine and is strictly rule based(no statistical stuff), it doesn't have to be a context-free grammar but that would be preferable(as it can't be and fully describe it). The best I've found was for a BNF but it was really basic. I need somet...

Any BNF IDE with test features

I'm working on a new language and while writting the grammar I'd like to be able to test the grammar for completeness, conflicts and similar. I'm not really concern about the underlaying parser generator (but one for .NET would be preferrable) So feature list in short would be: text editor build functionality syntax/sematics error rep...

Are unescaped user names incompatible with BNF?

Hi all, I've got a (proprietary) output from a software that I need to parse. Sadly, there are unescaped user names and I'm scratching my hairs trying to know if I can, or not, describe the files I need to parse using a BNF (or EBNF or ABNF). The problem, oversimplified (it's really just an example), may look like this: (data) ::= <...

EBNF to BNF Conversion

I have a homework problem which I could use some help on. I need to convert the following EBNF statement to BNF <S> -> <A>{b<A>} <A> -> a[b]<A> This is what I have come up with so far; <S> -> <A> | <A><S> | b<A> <A> -> a<A> | ab<A> It doesn't feel right, mainly because it's a WAG. The example in my book (Concepts of Programming Lan...