On 20 Feb 2008, at 09:00, Arlen Cuss wrote:
I'm writing a parser for Ruby (http://www.ruby-lang.org/). So far,
it can
parse a sizeable subset of the language. The problem I'm
encountering is as
follows:
`obj.method' is a method call on `obj'. This is parsed correctly.
`obj.method(args)' is
On Wed, 20 Feb 2008, Bob Rossi wrote:
> Sorry for the extremely long delay. I'm trying out your suggestion now.
> Whenver I put a struct in the parse param like so,
> %parse-param { struct gdbmi_pdata *gdbmi_pdata }
> I get a compiler warning,
> ../../../../cgdb/lib/gdbmi/src/gdbmi_grammar.h:12
On Wed, 20 Feb 2008, Bob Rossi wrote:
> My next error was this, I only added,
> %define api.push_pull "push"
> to my bison input file. That caused this compiler error,
> if gcc -DHAVE_CONFIG_H -I. -I../../../../cgdb/lib/gdbmi/src -I..
> -I../../../../cgdb/lib/gdbmi/src/mi_oc_parser -g -O2
On Sun, Sep 09, 2007 at 11:03:13AM +0200, [EMAIL PROTECTED] wrote:
> > On Sat, 8 Sep 2007, Bob Rossi wrote:
> >> The second issue is slightly more fuzzy. Essentially, after each token I
> >> give to the parser, it would probably be useful to know if it just
> >> finished a particular rule, and if s
> I'm not really fussed if we call them methods or functions, so no worries
> there. :) I'm not sure if it's so important that we need to distinguish
> the
> two things (talking also on the topic of Bison only), but perhaps it would
> help.
If I may be allowed to drift slightly into the realm of p
> YYTYPE is a massive union. funccall is declared %type [...]
If you've got lots of types in your union, you might want to consider
using `void*' for some of them instead and casting to the correct type
where needed in the rules. If you're just setting the `$$' from another
symbol and both have
I did it again. I should check my mail preferences for replying.
--
Hey,
On Feb 21, 2008 12:00 AM, <[EMAIL PROTECTED]> wrote:
> I see. It seems to me that you may need a way to distinguish
> syntactically between a plain object and an object returned by a call to a
> function (sorry, I won't ca
"Arlen Cuss" <[EMAIL PROTECTED]> wrote:
> On Feb 20, 2008 10:19 PM, <[EMAIL PROTECTED]> wrote:
> In Ruby, everything is an object, and all functions return objects (even
> if
> it's `nil'). This makes it easy for us, since we assume (or rather, we
> know)
> that all functions return objects and h
Well, I solved my problem. Quickly enough, I know, but it was a week or so
before this of thinking. I'll explain it if anyone's interested.
In Ruby, since an identifier could be a local variable or method at runtime,
and we don't know which, we can't differentiate the two in the parser.
Hence, fun
On Tue, Feb 19, 2008 at 09:22:38PM -0500, Bob Rossi wrote:
> On Tue, Feb 19, 2008 at 07:54:16PM -0500, Joel E. Denny wrote:
> > On Tue, 19 Feb 2008, Claudio Saavedra wrote:
> >
> > > El mar, 19-02-2008 a las 19:21 -0500, Joel E. Denny escribió:
> > > >
> > > > Obviously this is caused by my recen
I didn't send this to list. Trying again, sorry!
On Feb 20, 2008 10:19 PM, <[EMAIL PROTECTED]> wrote:
> > A shift/reduce conflict occurs where `obj.method(args)' is seen by my
> > parser. Instead of reducing when it sees the upcoming `.', it shifts,
> and
> > it
> > ends up with the whole `obj.me
> I've been trying to nut out a problem for a week or so in a bison parser
> I've been writing, and I'm failing. Please excuse me if this isn't the
> correct place to ask - I haven't convened with anyone about bison parsers
> before.
It is one correct place to ask. If it's more about compilers in
I'll add a bit of information. After using parser tracing, I've found in
fact this is happening:
a(b).c is being parsed as `a(b.c)', however the reasoning is different;
after reading `a(b)' it reduces just `(b)' by the rule for parenthesised
expressions, '(' *expr* ')'. The rest falls into place.
Hi all,
I've been trying to nut out a problem for a week or so in a bison parser
I've been writing, and I'm failing. Please excuse me if this isn't the
correct place to ask - I haven't convened with anyone about bison parsers
before.
I'm writing a parser for Ruby (http://www.ruby-lang.org/). So f
14 matches
Mail list logo