[#16113] Strange idea... exporting from a scope — "Hal E. Fulton" <hal9000@...>

Hello...

33 messages 2001/06/01

[#16364] Re: Garbage Collection? — Michael Davis <mdavis@...>

Windows 2000 and linux (RedHat 6.2). I have run these tests on both OSs.

12 messages 2001/06/09

[#16400] Symbolic Computation III — Mathieu Bouchard <matju@...>

14 messages 2001/06/11

[#16502] Playing with Ruby Syntax (was: Initial thoughts about Ruby From a Smalltalk Programmer) — jweirich@...

Michael> Hi Everyone, I have to say I'm utterly fascinated by Ruby

9 messages 2001/06/15

[#16661] Problem running irb with Ruby 1.6.4 under FreeBSD 4.0 — Bob Alexander <balexander@...>

I've installed Ruby 1.6.4 on a FreeBSD 4.0 machine, and get the

11 messages 2001/06/20

[#16686] opening db files made by apache dbmmanage — Fritz Heinrichmeyer <fritz.heinrichmeyer@...>

14 messages 2001/06/21

[#16801] rb_define_class() vs Class.new() — Kero van Gelder <kero@...4050.upc-d.chello.nl>

Hi,

18 messages 2001/06/23
[#16802] Re: rb_define_class() vs Class.new() — ts <decoux@...> 2001/06/23

>>>>> "K" == Kero van Gelder <kero@d4050.upc-d.chello.nl> writes:

[#16841] RE: national characters is strings — "Aleksei Guzev" <aleksei.guzev@...>

Next week I'll try to rebuild Ruby with Unicode strings. But it would be

15 messages 2001/06/25
[#16842] Re: national characters is strings — matz@... (Yukihiro Matsumoto) 2001/06/25

Hi,

[#16843] Re: national characters is strings — "Aleksei Guzev" <aleksei.guzev@...> 2001/06/25

That's good enough. But I'm afraid this could ( not would ) cause string

[#16868] Something strange with Ruby's inheritance mechanism — Eric Jacoboni <jaco@...>

As Ruby beginner, i try some "canonical" OO scripts. Doing so, I've

14 messages 2001/06/25
[#16873] RE: Something strange with Ruby's inheritance mechanism — "Aleksei Guzev" <aleksei.guzev@...> 2001/06/26

[#16879] Re: Something strange with Ruby's inheritance mechanism — Mathieu Bouchard <matju@...> 2001/06/26

On Tue, 26 Jun 2001, Aleksei Guzev wrote:

[#16869] Something strange with Ruby's inheritance mechanism — Eric Jacoboni <jaco@...>

As Ruby beginner, i try some "canonical" OO scripts. Doing so, I've

12 messages 2001/06/25

[#16881] — "Aleksei Guzev" <aleksei.guzev@...>

32 messages 2001/06/26
[#16916] Re: Method overloading (option) Was: Re: — "Wayne Blair" <wayne.blair@...> 2001/06/26

[#16920] Re: Method overloading (option) Was: Re: — matz@... (Yukihiro Matsumoto) 2001/06/26

Hi,

[#16888] finalizers, destructors and whatnot — "David Leal" <david@...>

Hi all,

16 messages 2001/06/26

[#17037] keeping an Exception object alive — David Alan Black <dblack@...>

Hello --

19 messages 2001/06/28
[#17055] Re: keeping an Exception object alive — matz@... (Yukihiro Matsumoto) 2001/06/29

Hi,

[#17066] RCR: Exception methods (was: Re: Re: keeping an Exception object alive) — David Alan Black <dblack@...> 2001/06/29

Hello --

[#17076] Re: RCR: Exception methods (was: Re: Re: keeping an Exception object alive) — matz@... (Yukihiro Matsumoto) 2001/06/29

Hi,

[#17079] Re: RCR: Exception methods (was: Re: Re: keeping an Exception object alive) — David Alan Black <dblack@...> 2001/06/29

Hello --

[#17138] Re: RCR: Exception methods (was: Re: Re: keeping an Exception object alive) — matz@... (Yukihiro Matsumoto) 2001/07/02

Hi,

[#17141] Re: RCR: Exception methods (was: Re: Re: keeping an Exception object alive) — David Alan Black <dblack@...> 2001/07/02

Hello --

[#17142] Re: RCR: Exception methods (was: Re: Re: keeping an Exception object alive) — ts <decoux@...> 2001/07/02

>>>>> "D" == David Alan Black <dblack@candle.superlink.net> writes:

[ruby-talk:16404] Re: Symbolic Computation III

From: Mathieu Bouchard <matju@...>
Date: 2001-06-11 08:01:34 UTC
List: ruby-talk #16404
On Mon, 11 Jun 2001, Wayne Blair wrote:
> > # An AST definition is similar to a grammar, except that:
> > # it doesn't care about syntax differences; it does care
> > # about its meaning-conveying parts, and their naming.

> Very interesting.  I checked out the source you sent, and if I understand
> you correctly, these are definitions for concrete AST nodes that would be
> generated by a yet to be produced lexer-parser.

Yes.

> How much ruby must be implemented in another language (eg. C or java) to
> be able to bootstrap the (ruby?) parser that will generate the trees? 

It depends on what the ruby parser requires, and I'm not writing a ruby
parser.

The bootstrapping would look like this: you parse the parser using that
same parser. You unparse it into the target language (as a bunch of nested
object constructors). You compile/link that with the interpreter.

Now if the parser depends on Ruby code, you can process that code in the
same way (of parse, unparse, compile, link). I'm thinking of MetaRuby's
Hollow Classes (formerly ArrayMixin, etc.) 

> Is having two mechanisms for parsing not less simple than
> having the entire grammar described for the first level parser?

There's only one level of parsing. The grammar defines what is valid
to-be-parsed-code, the AST schema defines that is valid parsed-code.

> Or is your draft just to describe the concrete nodes that would be
> parsed/interpreted by an implementation in a different language, like most
> DOM implementations?

The metatype classes are going to be the "DOM implementation", and are not
written yet. The definitions specific to Ruby are going to be a "schema"
or "dtd" that is relevant to Ruby in particular.

> If this is the case, I assume the ast definition is
> not intended for use by the initial parser/interpreter,

Well, those class definitions have to be put somewhere, so if you don't
bootstrap RubyAST or otherwise convert it to Java, you'll have to write a
lot of dummy code in Java. 

> This would mean that the ast definition or schema is
> only useful for post parsing utilities or interpreted interpreters and
> documentation??

Well, that would already be a big step, but I wish the schema to be as
useful as possible =)

> In any case, please discard the stupid questions I am asking and answer the
> ones that are not stupid so I can start to visualize this with you then ask
> some more stupid questions.

Look, we have this Tower of Babel that is called Computer Science. Half of
the time *will* be spent figuring out each other's mismatching
definitions. There is no fish. ;-)

matju

In This Thread