go uses various features of bison to make
writing the grammar easier and to be able
to give good syntax error diagnostics.
there are two viable choices here.
1. port bison.
2. run bison on another system,
copy the go.tab.[ch] files over,
and don't delete them.
if #1 is too much, do #2, which is
On Fri, 22 Jul 2011 21:00:53 +0200
Lucio De Re wrote:
> On Fri, Jul 22, 2011 at 07:30:47PM +0100, Ethan Grammatikidis wrote:
> >
> > On Fri, 22 Jul 2011 17:35:24 +0100
> > "Steve Simon" wrote:
> >
> > > My understanding is that bison can be convinced to output some static
> > > tables which th
On Fri, 22 Jul 2011 15:09:35 EDT erik quanstrom
wrote:
> > What does pcc have to do with this? This is a yacc problem. [Also tested
> > on 9atom]
>
> did you rebuild from source? the yacc binary might be older than ~jan 2010.
>
> - erik
Just did. yacc.c on the 9atom VM has a date of May 6,
On Fri, 22 Jul 2011 19:48:41 +0200 Lucio De Re wrote:
> The crucial feature is that any changes to the Go distribution should slot
> into the Plan 9 port of Go as seamlessly as possible.
Agree with the goal.
>As it may take me many months to get the project completed,
> I'd rather w
On Fri, Jul 22, 2011 at 11:55:45AM -0700, Bakul Shah wrote:
> On Fri, 22 Jul 2011 14:48:44 EDT "comeauat9f...@gmail.com"
> wrote:
> > On Jul 22, 2011, at 2:38 PM, Bakul Shah wrote:
> > > On Fri, 22 Jul 2011 13:53:41 EDT erik quanstrom
> > > =
> > wrote:
> > >> can you give am example where /
> What does pcc have to do with this? This is a yacc problem. [Also tested
> on 9atom]
did you rebuild from source? the yacc binary might be older than ~jan 2010.
- erik
On Fri, Jul 22, 2011 at 02:53:12PM -0400, erik quanstrom wrote:
> > pcc accepts -+ as well as cpp, perhaps a way to pass it as an environment
> > and/or make variable?
>
> how about making it the default and ignore the option.
The '//' is really an unfortunate thing, since "divide multiply" or
"
On Fri, Jul 22, 2011 at 11:32:43AM -0700, Skip Tavakkolian wrote:
> I really would like an educated answer to this -- if anyone has done
> the deep thinking: Can I assume that I can use linuxemu -- as a close
> enough approximation of linux -- to run the Go build (i.e. all.bash)?
> Or, can anyone
On Fri, Jul 22, 2011 at 07:30:47PM +0100, Ethan Grammatikidis wrote:
>
> On Fri, 22 Jul 2011 17:35:24 +0100
> "Steve Simon" wrote:
>
> > My understanding is that bison can be convinced to output some static
> > tables which the Go authors munge into some C source (with awk).
>
> I wonder what i
On Fri, Jul 22, 2011 at 02:22:54PM -0400, comeauat9f...@gmail.com wrote:
>
> On Jul 22, 2011, at 1:53 PM, erik quanstrom wrote:
> > can you give am example where // comments with ' cause
> > trouble. i can't replicate.
>
> My guess is that he is not referring to 8c et al but too pcc. That means
On Fri, 22 Jul 2011 14:48:44 EDT "comeauat9f...@gmail.com"
wrote:
> On Jul 22, 2011, at 2:38 PM, Bakul Shah wrote:
> > On Fri, 22 Jul 2011 13:53:41 EDT erik quanstrom =
> wrote:
> >> can you give am example where // comments with ' cause
> >> trouble. i can't replicate.
> >>
> >> - erik
> >
On Fri, Jul 22, 2011 at 02:20:37PM -0400, erik quanstrom wrote:
>
> > Russ correctly points out that the problem lies with cpp and not with 8c,
> > while careful inspection of the yacc sources including your correction to
> > accept // does not reveal any way in which yacc can be held responsible.
> pcc accepts -+ as well as cpp, perhaps a way to pass it as an environment
> and/or make variable?
how about making it the default and ignore the option.
- erik
On Jul 22, 2011, at 2:33 PM, erik quanstrom wrote:
> On Fri Jul 22 14:32:43 EDT 2011, eeke...@fastmail.fm wrote:
>> On Fri, 22 Jul 2011 17:35:24 +0100
>> "Steve Simon" wrote:
>>
>>> My understanding is that bison can be convinced to output some static
>>> tables which the Go authors munge into
On Jul 22, 2011, at 2:38 PM, Bakul Shah wrote:
> On Fri, 22 Jul 2011 13:53:41 EDT erik quanstrom
> wrote:
>> can you give am example where // comments with ' cause
>> trouble. i can't replicate.
>>
>> - erik
>
> In 9vx:
>
> term% yacc go/src/cmd/gc/go.y
>
> fatal error:newline in string or
> fatal error:newline in string or char. const., /go/src/cmd/gc/go.y:528
>
>
> // If the last token read by the lexer was consumed
> // as part of the case, clear it (parser has cleared yychar).
> // If the last token read by the lexer was the lookahead
On Fri, 22 Jul 2011 13:53:41 EDT erik quanstrom
wrote:
> can you give am example where // comments with ' cause
> trouble. i can't replicate.
>
> - erik
In 9vx:
term% yacc go/src/cmd/gc/go.y
fatal error:newline in string or char. const., /go/src/cmd/gc/go.y:528
// If the
On Fri Jul 22 14:32:43 EDT 2011, eeke...@fastmail.fm wrote:
> On Fri, 22 Jul 2011 17:35:24 +0100
> "Steve Simon" wrote:
>
> > My understanding is that bison can be convinced to output some static
> > tables which the Go authors munge into some C source (with awk).
>
> I wonder what it would take
On Fri Jul 22 14:25:06 EDT 2011, comeauat9f...@gmail.com wrote:
> On Jul 22, 2011, at 1:53 PM, erik quanstrom
> wrote:
> > can you give am example where // comments with ' cause trouble. i
> > can't replicate.
> >
> My guess is that he is not referring to 8c et al but too pcc. That
> means some
I really would like an educated answer to this -- if anyone has done
the deep thinking: Can I assume that I can use linuxemu -- as a close
enough approximation of linux -- to run the Go build (i.e. all.bash)?
Or, can anyone think of a reason why it would not work?
-Skip
P.S. at any rate, I plan
On Fri, 22 Jul 2011 17:35:24 +0100
"Steve Simon" wrote:
> My understanding is that bison can be convinced to output some static
> tables which the Go authors munge into some C source (with awk).
I wonder what it would take to add that feature to Plan 9's yacc. I'm not
normally one to suggest ad
On Jul 22, 2011, at 1:53 PM, erik quanstrom wrote:
> can you give am example where // comments with ' cause
> trouble. i can't replicate.
My guess is that he is not referring to 8c et al but too pcc. That means
something like:
// I can't replicate
Becomes an error. Many classic UNIX[-like] pr
> Russ correctly points out that the problem lies with cpp and not with 8c,
> while careful inspection of the yacc sources including your correction to
> accept // does not reveal any way in which yacc can be held responsible.
are you giving cpp the -+ option?
cpp doesn't eat // comments by defaul
On Fri, 22 Jul 2011 19:48:41 +0200
Lucio De Re wrote:
> For the rest, I have been alerted in private mail that Taru's work
> contains many adjustments whose intention was to get the code to compile.
> I have a similar code base and Erik Quanstrom has another. I know my
> early set of patches is
On Fri, Jul 22, 2011 at 01:53:41PM -0400, erik quanstrom wrote:
> can you give am example where // comments with ' cause
> trouble. i can't replicate.
>
I don't have an example ready at hand.
Russ correctly points out that the problem lies with cpp and not with 8c,
while careful inspection of th
On Fri, Jul 22, 2011 at 07:53:30PM +0200, Lucio De Re wrote:
> That suggests that porting Bison is a "must" as anything else will
> not meet the criterion of being included in the Go distribution.
> Bootstrapping Bison seems to be my main obstacle (it relies on Bison
> features, not least the very
can you give am example where // comments with ' cause
trouble. i can't replicate.
- erik
On Fri, Jul 22, 2011 at 05:35:24PM +0100, Steve Simon wrote:
>
> My understanding is that bison can be convinced to output some static
> tables which the Go authors munge into some C source (with awk).
>
> These tables allow the Go parser to generate more useful and
> accurate error messages.
>
On Fri, Jul 22, 2011 at 08:39:56AM -0700, Bakul Shah wrote:
>
> Is your goal to a) have the standard go distribution build on plan9
> with no changes or b) do a minimal infrastructure to make future ports
> easy or c) do a one time port?
>
The crucial feature is that any changes to the Go distrib
On Fri, 22 Jul 2011 17:37:32 +0200 Lucio De Re wrote:
> But until I clear my slate of a number of distractions, I can only ask
> more knowledgeable persons to look at the code and make suggestions to
> the Go Authors, directly or through my submissions to CodeReview, on
> how to eliminate Bison d
My understanding is that bison can be convinced to output some static
tables which the Go authors munge into some C source (with awk).
These tables allow the Go parser to generate more useful and
accurate error messages.
I believe using bison is not mandatory if you don't mind hacking
the code a
i think we're going off the deep end.
my comments were ment to draw this line
- go used to be compatable with plan old yacc,
- and i don't think the go authors really want to depend on yacc,
so the conclusion i would draw is that the path
of least resistance is to remove the fluff from go
and be
On Jul 22, 2011, at 6:03 AM, Lucio De Re wrote:
>>
>>
> So far, as Bakul pointed out, only %error-verbose (from memory) stands out
> in my most recent changes, but there are other reasons and, unfortunately,
> GNU Bison uses its own extensions to bootstrap, which is where I may
> well be getting
On Fri, Jul 22, 2011 at 11:13:26AM -0400, erik quanstrom wrote:
>
> why do you think changes to the grammar would depend on bison?
>
Is that what I said? I meant that the yacc modules were almost certainly
altered considerably since the introduction of new language features.
I don't have the the
> > if it does, that is something new. plan 9 yacc had no troubles
> > at all with the grammar when i did it.
> >
> It does, the Go syntax has changed a lot: you may have missed the efforts
> that went into dropping trailing semicolons and much other syntactic
> "candy" that has made Go quite unu
On Fri, 22 Jul 2011 06:40:38 +0200
Lucio De Re wrote:
> I've been trying to port (GNU) bison to Plan 9 to make it easier
> to get the Go release to compile under the Plan 9 native toolchain.
> I needed to take a breather yesterday, it is just oh so frustrating!
> Has anyone got bison ported yet?
On Fri, Jul 22, 2011 at 08:41:49AM -0400, erik quanstrom wrote:
> On Fri Jul 22 01:37:35 EDT 2011, arn...@skeeve.com wrote:
> > Does Go use things that are bison-specific? If not, maybe Berkeley Yacc
> > (there are various versions around) would be easier to port.
>
> if it does, that is somethin
On Fri Jul 22 01:37:35 EDT 2011, arn...@skeeve.com wrote:
> Does Go use things that are bison-specific? If not, maybe Berkeley Yacc
> (there are various versions around) would be easier to port.
if it does, that is something new. plan 9 yacc had no troubles
at all with the grammar when i did it.
On Fri, Jul 22, 2011 at 12:42:12AM -0700, Bakul Shah wrote:
> $ yacc gc/go.y
> yacc: e - line 120 of "go.y", syntax error
> %error-verbose
> ^
> This is a bison dropping. I haven't looked at the go sources
> but hopefully this can be worked around easily.
>
It resolves to a bunch of #ifdefs, #unde
If it's bison -y -d then maybe even Plan 9 Yacc would work.
The bison dist has a manual, probably even with an index, in which you
can look up suspicious constructs and decide if they can be safely tossed
or not.
Thanks,
Arnold
On Fri, 22 Jul 2011 08:33:50 +0200 Lucio De Re wrote:
> On Fri, Jul 22, 2011 at 05:36:42AM +, arn...@skeeve.com wrote:
> >
> > Does Go use things that are bison-specific? If not, maybe Berkeley Yacc
> > (there are various versions around) would be easier to port.
> >
> That's why I ask abo
41 matches
Mail list logo