Hi all,
First, thanks so much for the help you've given me. Your guidance
enabled me to create a Flex/Bison Hello World.
The online GoLUG meeting on Wednesday (12/6/2023) night features
teaching presentations, for raw newbies, on BNF, Flex/Bison, and general
compiler theory. If David and I do our
This is perhaps more canonical:
param_list
: /* nothing */ { $$ = new ParamListNode(); }
| param_item_list{ $$ = $1; }
;
param_item_list
: param { $$ = new ParamListNode($1); }
| param_item_list ',' param { $$ = $1->addChild($3); }
On 5 Jun 2014, at 02:46, Grant McKenzie wrote:
> newbie alert...
This is the list for Bison [1], which supports C++ - see the manual.
1. https://gnu.org/software/bison/
___
help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison
Hi,
newbie alert - this is my first grammar so bare with me!
opt_parameter_list:
/* EMPTY */ { $$ = new IdentifierListNode(
NULL, NULL ); }
| parameter_list { $$ = $1; }
parameter_list:
IDENTIFIER
:47:26 PM
Subject: Re: Newbie: how to get rid of this r/r conflict
You haven't given enough information; it looks like there's an embedded action
you've left out. Construct a simple test case and post it.
Alternatively, just start with the production as shown in SV3.1a:
timeun
You haven't given enough information; it looks like there's an embedded
action you've left out. Construct a simple test case and post it.
Alternatively, just start with the production as shown in SV3.1a:
timeunits_declaration
: timeunit time_literal ';'
| timeprecision time_literal ';'
Hi all,
I have a rule as following (:ab|ba|a|b)
: K_timeunit TIME_LITERAL';'
K_timeprecision TIME_LITERAL';'
< >
| K_timeprecision TIME_LITERAL';'
K_timeunit TIME_LITERAL';'
< >
| K_timeprecision TIME_LITERAL';'
< >
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
> 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
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
or it. If any symbol in a
parser really needed to refer to a string of this size, it should
probably
be referring to a file instead.
By the way, it would probably be a good idea for you to choose more
descriptive subjects. The subject "newbie" made me think this was
spam
and I ve
> Thanks for the feedback. The parser really does need to refer to
> large strings, these are descriptions of very large biological
> networks with motifs that include thousands of genes, with
> potentially tens of thousands total. The parser then turns them into
> Systems Biology Markup Language (
Ahh, of course you are right. I need only place a pointer on the
stack, not the entire string. Doh!
A little less of a newbie,
Jim
--
%%
James Long
Biotechnology Computing Research Group
University of Alaska
jim.long|at|alaska.edu
http
y, it would probably be a good idea for you to choose more
descriptive subjects. The subject "newbie" made me think this was spam
and I very nearly deleted it. "[help-bison]" is not added automatically.
Laurence Finston
On Thu, 13 Dec 2007, James Long wrote:
> I'
I've answered my own question. The requested semantic stack for string
[100] is too big.
Thanks,
Jim
--
%%
James Long
Biotechnology Computing Research Group
University of Alaska
jim.long|at|alaska.edu
http://biotech.inbre.alaska.edu
(907) 474-5769
%%
On 10 Oct 2005, at 20:21, Gill,Michael J wrote:
Hans,
Thanks for the response. So, I can indicate an error in the actions
with YYERROR if the data type of the VAR from the dtype field of the
symrec union is wrong. How do you indicate to Bison that this is an
error? Do I need to set YYERROR t
Gill,Michael J
Cc: Bison Help
Subject: Re: Newbie Dynamic Data Typing Help
[Please try to quote just relevant material.]
On 7 Oct 2005, at 21:13, Gill,Michael J wrote:
> Thanks for the tips, I'm trying the %union approach but am hung up on
> how to differentiate data types in the gra
[Please try to quote just relevant material.]
On 7 Oct 2005, at 21:13, Gill,Michael J wrote:
Thanks for the tips, I'm trying the %union approach but am hung up on
how to differentiate data types in the grammar. I need to initialize
VARs to either NUM or CHR types but only want to allow operati
| VAR '=' chrexp {
$$ = $3;
$1->dtype = CHR;
$1->value.chr = $3;
}
;
%%
Thanks,
-Mike
---
still be just double? The whole type
matching of tokens to grammar rules to values is confusing me.
Thanks again,
-Mike
On 5 Oct 2005, at 18:54, Gill,Michael J wrote:
I'm a complete newbie to bison and language semantics in general.
I'm
trying to extend the mfcalc.y example fro
On 5 Oct 2005, at 18:54, Gill,Michael J wrote:
I'm a complete newbie to bison and language semantics in general. I'm
trying to extend the mfcalc.y example from the manual to allow
dynamically typed variables but am at a loss as to how to implement
them. I'm currently savin
Hi Everyone,
I'm a complete newbie to bison and language semantics in general. I'm
trying to extend the mfcalc.y example from the manual to allow
dynamically typed variables but am at a loss as to how to implement
them. I'm currently saving var names and values in the symbol.c
29 matches
Mail list logo