Re: How to construct a BNF for a language mechanically and incrementally?

2010-01-09 Thread Peng Yu
On Sat, Jan 9, 2010 at 11:00 AM, John R. Levine wrote: >> I have never used soelim before. I have been looking for some >> introductory material on it, but I don't find anything useful. (The >> man page is too terse and hard for me to figure out how to use it if I >> know nothing about it). > > Th

Re: How to construct a BNF for a language mechanically and incrementally?

2010-01-09 Thread Peng Yu
On Tue, Dec 29, 2009 at 11:17 PM, John Levine wrote: >>I just start reading the book "flex & bison Text Processing Tools" by >>John Levine. Please excuse me if I ask some question that are >>available somewhere in the book. When the grammar become huge, it >>would be inconvenient put all BNFs in a

Re: How to construct a BNF for a language mechanically and incrementally?

2009-12-30 Thread Hans Aberg
On 29 Dec 2009, at 03:54, Peng Yu wrote: It seems to me that to use bison I have to have a BNF first. I'm reading Programming Language Pragmatics 3rd Ed (PLP3). What is not clear to me is that how to construct the BNF for a language? Based on my reading of PLP3, I haven't found a formal way to c

Re: How to construct a BNF for a language mechanically and incrementally?

2009-12-30 Thread Derek M Jones
Peng Yu, Why Bison/Flex are not good at Fortran? What is special for Fortran's grammar? Parsing Fortran is not that hard it is the lexical analysis that is very fiddly. Read about my recent attempts here: shape-of-code.coding-guidelines.com/2009/12/parsing-fortran-95 -- Derek M. Jones

Re: How to construct a BNF for a language mechanically and incrementally?

2009-12-29 Thread John Levine
>I just start reading the book "flex & bison Text Processing Tools" by >John Levine. Please excuse me if I ask some question that are >available somewhere in the book. When the grammar become huge, it >would be inconvenient put all BNFs in a single file. I'm wondering how >a huge grammar is handled

Re: How to construct a BNF for a language mechanically and incrementally?

2009-12-29 Thread Peng Yu
On Tue, Dec 29, 2009 at 2:49 AM, Hans Aberg wrote: > On 29 Dec 2009, at 03:54, Peng Yu wrote: > >> It seems to me that to use bison I have to have a BNF first. I'm >> reading Programming Language Pragmatics 3rd Ed (PLP3). What is not >> clear to me is that how to construct the BNF for a language?

Re: How to construct a BNF for a language mechanically and incrementally?

2009-12-29 Thread Peng Yu
On Tue, Dec 29, 2009 at 2:49 AM, Hans Aberg wrote: > On 29 Dec 2009, at 03:54, Peng Yu wrote: > >> It seems to me that to use bison I have to have a BNF first. I'm >> reading Programming Language Pragmatics 3rd Ed (PLP3). What is not >> clear to me is that how to construct the BNF for a language?

Re: How to construct a BNF for a language mechanically and incrementally?

2009-12-28 Thread Philip Herron
On Mon, 2009-12-28 at 20:54 -0600, Peng Yu wrote: > It seems to me that to use bison I have to have a BNF first. I'm > reading Programming Language Pragmatics 3rd Ed (PLP3). What is not > clear to me is that how to construct the BNF for a language? Based on > my reading of PLP3, I haven't found a f

How to construct a BNF for a language mechanically and incrementally?

2009-12-28 Thread Peng Yu
It seems to me that to use bison I have to have a BNF first. I'm reading Programming Language Pragmatics 3rd Ed (PLP3). What is not clear to me is that how to construct the BNF for a language? Based on my reading of PLP3, I haven't found a formal way to construct BNF. What I understand is that, to