Btw, interesting. One of the files seems crafted I do not know how:

 return defgetenv("GOROOT", /home/jdurand/Téléchargements/go);
--------------------------^

and another one gives c2ast failure. This last case I will have to check. 
Could be a c2ast bug, to be confirmed.

 d->name = d->uid = d->gid = d->muid = "";
-^

JD.

Le mercredi 5 mars 2014 20:34:45 UTC+1, rns a écrit :
>
> That's a great start! 
>
> As for the question, can't really help here, sorry, 
> golang-dev<https://groups.google.com/forum/#!forum/golang-dev> looks 
> like a good place to ask and/or report on the results.
>
> "We plan to translate the existing compilers from C to Go by writing and 
> then applying an automatic translator" — says Russ Cox in Go 1.3+ 
> Compiler 
> Overhaul<https://docs.google.com/document/d/1P3BLR31VA8cvLJLfMibSuTdwTuF7WWLux71CYD0eeD8/edit>
>  — 
> looks like they may find C parsing features provided by 
> MarpaX::Languages::C::AST useful.
>
>
>
>
> On Wed, Mar 5, 2014 at 9:13 PM, Durand Jean-Damien 
> <[email protected]<javascript:>
> > wrote:
>
>> Is there a way to know how GO bootstraps its library, I mean starting at:
>>
>> ./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds 
>> go_bootstrap
>> # Delay move of dist tool to now, because bootstrap may clear tool 
>> directory.
>> mv cmd/dist/dist "$GOTOOLDIR"/dist
>> "$GOTOOLDIR"/go_bootstrap clean -i std
>> echo
>>
>> if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then
>> echo "# Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH."
>>  GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH \
>> "$GOTOOLDIR"/go_bootstrap install -ccflags "$GO_CCFLAGS" -gcflags 
>> "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std
>>  echo
>> fi
>>
>> echo "# Building packages and commands for $GOOS/$GOARCH."
>> "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -ccflags "$GO_CCFLAGS" 
>> -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std
>> echo
>>
>> rm -f "$GOTOOLDIR"/go_bootstrap
>>
>> if [ "$1" != "--no-banner" ]; then
>> "$GOTOOLDIR"/dist banner
>> fi
>>
>> I see ccflags etc... but I mean: can you confirm or give me a way to know 
>> what are exactly all the c flags in action.
>> The first step, creating the bootstrap was easy. But bootstrap is a bit 
>> obscure.
>> Oterwise c2ast did not suffer from analysing GO bootstrap code -;
>>
>> Ah, result of the 1st step (i.e. the one that generates the bootstrap) is:
>>
>> cmd/dist/buf.c(218)     strpcmp: Names beginning with 'str', 'mem', or 
>> 'wcs' followed by a lowercase letter are reserved for additional string and 
>> array functions
>> cmd/dist/build.c(25)      tooldir: Names that begin with either 'is' or 
>> 'to' followed by a lowercase letter may be used for additional character 
>> testing and conversion functions.
>> cmd/dist/build.c(612)     islib: Names that begin with either 'is' or 
>> 'to' followed by a lowercase letter may be used for additional character 
>> testing and conversion functions.
>> cmd/dist/build.c(612)     ispkg: Names that begin with either 'is' or 
>> 'to' followed by a lowercase letter may be used for additional character 
>> testing and conversion functions.
>> cmd/dist/build.c(612)     isgo: Names that begin with either 'is' or 'to' 
>> followed by a lowercase letter may be used for additional character testing 
>> and conversion functions.
>> cmd/dist/goc2c.c(127)     structround: Names beginning with 'str', 'mem', 
>> or 'wcs' followed by a lowercase letter are reserved for additional string 
>> and array functions
>> cmd/dist/goc2c.c(284)     token: Names that begin with either 'is' or 
>> 'to' followed by a lowercase letter may be used for additional character 
>> testing and conversion functions.
>> cmd/dist/goc2c.c(294)     token: Names that begin with either 'is' or 
>> 'to' followed by a lowercase letter may be used for additional character 
>> testing and conversion functions.
>> cmd/dist/goc2c.c(389)     token: Names that begin with either 'is' or 
>> 'to' followed by a lowercase letter may be used for additional character 
>> testing and conversion functions.
>> cmd/dist/goc2c.c(437)     token: Names that begin with either 'is' or 
>> 'to' followed by a lowercase letter may be used for additional character 
>> testing and conversion functions.
>>
>> Thanks / JD.
>>
>> Le mercredi 5 mars 2014 10:24:56 UTC+1, rns a écrit :
>>
>>> There is that presentation [1] to be held at GopherCon; at first sight, 
>>> running 
>>> cscan/c2ast<https://github.com/jddurand/MarpaX-Languages-C-AST/tree/master/bin>like
>>>  Jean Damien did 
>>> with perl source 
>>> code<https://groups.google.com/d/msg/marpa-parser/QkcRarH1N7k/VJWmdfICNsQJ>and
>>>  blogging or otherwise letting know about it looks like a good thing to 
>>> show what Marpa can do.
>>>  
>>> [1] Go from C to Go
>>> Friday, 25 Apr 8:30am (30m)Russ Cox - Engineer at Google
>>>
>>> It's time for the Go compilers to be written in Go, not in C. I'll talk 
>>> about the unusual process the Go team has adopted to make that happen: 
>>> mechanical conversion of the existing C compilers into idiomatic Go code.
>>>
>>> http://www.gophercon.com/schedule/#ross_cox
>>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "marpa parser" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to