Regular Expression
I have a grammar defined as follows: A -> aA*b | empty_string Is A a regular expression? I'm confused as to how to interpret a BNF grammar. ...
I have a grammar defined as follows: A -> aA*b | empty_string Is A a regular expression? I'm confused as to how to interpret a BNF grammar. ...
It looks like a big mess,how does it work as reference? http://www.doctrine-project.org/documentation/manual/1_1/en/dql-doctrine-query-language%3Abnf ...
It's been a few years since my computer-language class and so I've forgotten the finer points of BNF's and EBNF's and I don't have a textbook next to me. Specifically, I've forgotten how to convert an EBNF into BNF. From what little I remember, I know that one of the main points is to convert { term } into <term> | <many-terms>. But I d...
Is there a BNF or EBNF that describes the grammar for Java's annotations? ...
I've got a BNF and EBNF for a grammar. The BNF is obviously more verbose. I have a fairly good idea as far as using the BNF to build a recursive-descent parser; there are many resources for this. I am having trouble finding resources to convert an EBNF to a recursive-descent parser. Is this because it's more difficult? I recall from my C...
I want to come up with a language syntax. I have read a bit about these three, and can't really see anything that one can do that another can't. Is there any reason to use one over another? Or is it just a matter of preference? ...
I'd like to write down a BNF-like formal grammar for describing the command line usage of some GNU/Linux tools. For example I can describe the usage of the cat command as: (cat-command) : 'cat' (arguments-list) (arguments-list) : (argument) (arguments-list) : (arguments-list) (argument) (argument) : (file) The problem is I can't write...
A volunteer job requires us to convert a large number of LaTeX documents into ePub format. It's a series of open-source fiction book which has so far only been produced only on paper via a print on demand service. We'd like to be able to offer the book to users of book-reader devices (such as Kindle) which require the ePub format for bes...
Hi, While implementing a Java regular expression for URL based on the URL BNF published by W3C, I've failed to understand the search part. As quoted: httpaddress h t t p : / / hostport [ / path ] [ ? search ] search xalphas [ + search ] xalphas xalpha [ xalp...
Hi, I am wondering if there is a tool or technique which, given a BNF grammar, adjusts it randomly(but intelligently) and generates a stream of output for use in detecting cases that slip past the BNF (but shouldn't). edit: Fuzz testing a parser, in other words. Thanks ...
I'm doing a lot of work with a DSLs at the moment and was wondering if anyone knew of a tool that could generate a parser for my bnf specification that does not require a run-time library (pure java source parser)? I'm committed to using XTEXT for a future Eclipse plug-in but I need a nice small version for my library itself and don't w...
Hi guys, I am helping my nephew for his C lab homework, it is a string manipulation assignment and applying Wang's algorithm. Here is the BNF representation for the input. <s> ::= <l> # <r> <l> ::= <list>| ε <r> ::= <list>| ε <list> ::= <f>|<f> , <list> <f> ::= <letter>| - <f>| (<f><op><f>) <op> ::= & | | | > <letter> ::= A |... | Z ...
I use this BNF to parser my script: ` {identset} = {ASCII} - {"\{\}}; //<--all ascii charset except '\"' '{' and '}' {strset} = {ASCII} - {"}; ident = {identset}*; str = {strset}*; node ::= ident "{" nodes "}" | //<--entry point "\"" str "\"" | ident; nodes ::= node nodes | ...
JSON web site uses very clear notation to describe JSON's syntax: What is the name of such notation? Is this is just a graphical presentation of BNF or it has it's own name? ...
Im writing a parser than can parse expressions like myfunc1(), myfunc2(param1) and myfunc3(param1, param2) (with an unknown amount of parameters). Now I'm trying to get my parse expressions right. I'm using the Lemon Parser Generator. Here is what I've come up with: application(res) ::= APPLICATIONNAME(a) BRACE_OPEN params BRACE_CLOSE. ...
Does anyone of you know if the BNF or EBNF of Turbo Pascal is available somewhere (LEGALLY!!)? ...
I have to generate parser of CSV data. Somehow I managed to write BNF, EBNF for CSV data but I don't know how to convert this into an ANTLR grammar (which is a parser generator). For example, in EBNF we write: [{header entry}newline]newline but when I write this in ANTLR to generate a parser, it's giving an error and not taking brack...
I have to parse a file that looks like this: versioninfo { "editorversion" "400" "editorbuild" "4715" } visgroups { } world { "id" "1" "mapversion" "525" "classname" "worldspawn" solid { "id" "2" side { "id" "1" "plane" "(-544 -400 0) (-544 -240 0) (-272 -240 0)...
Hello, I am as much newbie to Pi-Calculus as I am with Backus Naur Form. Here is one of the core BNF for Pi Calculus ( found in "Applied Pi - A Brief Tutorial" by Peter Sewell) P,Q ::= 0 nil P | Q parallel composition of P and Q ~cv output v on channel c ...
Hi, all I was wondering if anyone had a full BNF for HL7 2.5? I am looking to compile this using the gold parser engine but would be happy to convert from EBNF or vendor specific BNF. ...