|
From: <Ar...@co...> - 2007-09-17 19:26:04
|
> (We already know this grammar is LL(1). In fact, CSS2.1 syntax is a > regular language, unless I missed something. The parser I've written so > far for Synura is a DFA-which is why I'm throwing it out to upgrade to > CSS3.) Why do they have LALR on there for CSS2.1? Is that portion of the spec an actual official spec or is it just an example to help out developers and you should base the grammar on what it actually written elsewhere? > The grammar that I'm studying, and hoping to write a parser for, is #3. > In practice everybody uses a grammar and object model somewhere between > #2 and #3, but I'm hoping to get closer to #3 than most people. > > The tasks required to complete an analysis are: > 1. Write a CFG for #3, preferably in a form that can be read by > automated tools. > 2. See if the grammar is LL(1), LALR(1), or whatever, switching between > left & right recursion and stuff as necessary. (And yes, the CSS spec > does mention these for the stated grammars, but it appears to be > non-normative and the stated grammars have all the above shortcomings). > > I'd like to tackle task #1 by myself at first, but you're of course > welcome to try your hand at it too. As far the second task, I could > really benefit from some software that will automagically figure this > stuff out for me. SLK will do it for 'strong' LL(k), but I'd like a > more general tool in addition. ANTLR might do it for LL(k), but I can't > get it to run. If we can't find tools to do it, I'm in the process of > writing some quick-and-dirty scripts that might be able to figure it > out.** Is this software that will need to become a part of the project or just something you need to get started? |