FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Interesting project - need help?

 
Post new topic   Reply to topic     Forum Index -> yaml
View previous topic :: View next topic  
Author Message
luke



Joined: 05 Jun 2007
Posts: 5

PostPosted: Thu Jul 26, 2007 1:09 am    Post subject: Interesting project - need help? Reply with quote

Hi

I just started with D and would like to participate in a project.

Is there a task I could do?


greez
luke
Back to top
View user's profile Send private message
grignaak



Joined: 25 May 2007
Posts: 9
Location: Seattle

PostPosted: Fri Aug 10, 2007 1:05 pm    Post subject: Reply with quote

Oh hey! There's a forum! I didn't know....

So, yes. I would like to have help. Right now, though, I am in the design phase (which is going slowly b/c I'm at an internship @ amazon.com). Currently I am sifting through the spec at yaml.org and trying to remove garbage productions.

My (current) idea is first to implement it using tango Fibers, and then restructure it using a state machine.

I will then (maybe) put a DOM, and a lightweight DOM on top of the parser.

--Michael
Back to top
View user's profile Send private message
grignaak



Joined: 25 May 2007
Posts: 9
Location: Seattle

PostPosted: Sat Aug 11, 2007 1:18 am    Post subject: Reply with quote

You know, come to think of it...
I could use a set of test cases to begin with. Would you want to start out by designing and coding some? There are a whole slew of examples in the specification if you wanted to create a set of yaml->expected files.

In the next few days I'll be nailing down the API. I could also use feedback/insights on that. Your ideas would be great.

Thank you Cool

--Michael
Back to top
View user's profile Send private message
luke



Joined: 05 Jun 2007
Posts: 5

PostPosted: Mon Aug 13, 2007 1:30 am    Post subject: Reply with quote

Oh, hi there!
I was already thinking, it nowone here...

Test cases, you say? Can you be a little more concrete?

When you talk about test cases, i think of something like this:

When i feed file xyz.yml into your lib and ask it to list its contents, i get an exact copy, ommitting the comments.

When i feed file gigantic_yaml_file.yml into your lib it works no more than 20secs on a 2GHz/1GByte machine.

something like this?
Back to top
View user's profile Send private message
grignaak



Joined: 25 May 2007
Posts: 9
Location: Seattle

PostPosted: Mon Aug 13, 2007 2:59 am    Post subject: Reply with quote

Here is what I am thinking:

One approach to test the lib is to take a series of yaml files to test, each with two corresponding files for the Lexer/Parser test. The files could be a line separated list of Tokens/Events that could be compared against the lib's output.

For example:

testA.yaml:
Code:
my list:
- item a
- item b


testA.lex:
Code:
my
[space]
list
[colon]
[newline]
...


testA.parse:
Code:
BEGIN_MAP
MAP_KEY
SCALAR "my list"
BEGIN_VALUE
BEGIN_LIST
BEGIN_VALUE
SCALAR "item a"
BEGIN_VALUE
SCALAR "item b"
END_LIST
END_MAP



Another approach may be to use a Mock Object. This may come in handy later for the DOM builder built on top of the Parser.

Once again, I get to solidify the API to the lib. I have my thoughts temporarily stored as a (very incomplete) rough draft in the wiki. Feel free to comment - I'm always open to suggestions. Once the API is solid, unit tests on each of the pieces can be written (fairly) independently of the lib itself.

Also here's a reference JSON parser being built in Apache Labs

I have the lexer written, and I just found out where the repository is, so that will be checked in soon.

Regarding comments: I think I might want to maybe possibly have comments as a switchable parser event. This will allow a program to read in a file, change it, and re-output it while still keeping the user's comments. They would be switched off by default though, of course.

What do you think of all this?
--Michael
Back to top
View user's profile Send private message
luke



Joined: 05 Jun 2007
Posts: 5

PostPosted: Tue Aug 14, 2007 11:00 am    Post subject: Reply with quote

So you want to construct the test cases as files. How about creating them on demand, using a reference library?
I think the lib for python would do the trick, and we would be able to test anything we find on the net.

Another thing: Are you able to grant me some access to your wiki? (no need for full access, just to be able to do something)
Back to top
View user's profile Send private message
grignaak



Joined: 25 May 2007
Posts: 9
Location: Seattle

PostPosted: Tue Aug 14, 2007 5:48 pm    Post subject: Reply with quote

luke wrote:
So you want to construct the test cases as files. How about creating them on demand, using a reference library?
I think the lib for python would do the trick, and we would be able to test anything we find on the net.


That's OK by me.

Quote:
Another thing: Are you able to grant me some access to your wiki? (no need for full access, just to be able to do something)


Done.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> yaml All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group