# Basic help for uni paper

**URL:** <https://www.ruby-forum.com/t/basic-help-for-uni-paper/174735>\
**Category:** Ruby\
**Created:** [September 1, 2009, 12:57pm UTC](https://www.ruby-forum.com/t/basic-help-for-uni-paper/174735 "2009-09-01T12:57:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yankees26](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/eb9ed0/32.png) [@yankees26](https://www.ruby-forum.com/u/yankees26)\
**Post date:** [September 1, 2009, 12:57pm UTC](https://www.ruby-forum.com/t/basic-help-for-uni-paper/174735/1 "2009-09-01T12:57:51Z")

</div>

Hi,

I am a German student and I just need some basic help for a “term  
paper”. I have to write a compiler for ruby with EBNF and save the  
results in a sqlite database. The problem that i have, is that I cant  
find any propper ruby examples online. I need a basic ruby programm,  
that has 3-7 .rb files. Online I can only find ruby code that is all in  
one rb file. But the compiler that I am working on, has to deal with  
“required” ruby files, and look in those files for class definitions  
etc. So, does anyone have an example for me, or at least a page where I  
could find some good examples?  
thanks in advance  
greets from germany

---

<div class="post-metadata">

**Author:** ![yankees26](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/eb9ed0/32.png) [@yankees26](https://www.ruby-forum.com/u/yankees26)\
**Post date:** [September 1, 2009, 2:07pm UTC](https://www.ruby-forum.com/t/basic-help-for-uni-paper/174735/2 "2009-09-01T14:07:24Z")

</div>

Joao S. wrote:

> I have to write a compiler for ruby with EBNF and save the  
> results in a sqlite database. The problem that i have, is that I cant  
> find any propper ruby examples online. I need a basic ruby programm,  
> that has 3-7 .rb files. Online I can only find ruby code that is all in  
> one rb file. But the compiler that I am working on, has to deal with  
> “required” ruby files, and look in those files for class definitions  
> etc. So, does anyone have an example for me, or at least a page where I  
> could find some good examples?

Well, if you’re going to write a ruby compiler, then you’re going to  
have to learn the language pretty thoroughly, and so you’ll easily be  
able to write a test program which spans 3 sources files 🙂

There are loads of projects you can look at starting from  
[raa.ruby-lang.org](http://raa.ruby-lang.org) and [rubyforge.org](http://rubyforge.org)

[www.ruby-doc.org](http://www.ruby-doc.org) is also a good starting point, especially the book  
“Programming Ruby”. Click on the chapter entitled “Modules”, which  
further down gives a description of require/load.
