Search the web
Sign In
New User? Sign Up
elfdata
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Making a new class, ElfDataTokenizer   Message List  
Reply | Forward Message #410 of 450 |
Re: [elfdata] Making a new class, ElfDataTokenizer

OK...

so I finally have some time to work on my ElfData plugin again. I've
been busy the past few months but now I can work again.

I've got an early version of the ElfDataTokeniser class working. I've
made an example project that can parse simple mathematical
expressions, including variables like "a", "b", "c". It understands +-/
* and () brackets.

It has some very big limitations.

1) All numbers are processed in order. So 1+2*3=9, and not 7 like
you'd expect.

2) No support for negative numbers. You need to enter (0-3) instead of
-3.

The negative numbers thing I can implement cleanly using my
ElfDataTokeniser, so I'll do that later.

The operator reordering thing... that's not even an ElfDataTokeniser
issue, it's simply an awkward thing to do regardless of the language.
I may just leave it as it is, unless I find a graceful way to do this.

I don't want to create a nice simple clean demo project with 40 lines
of code, to show people how to parse code using my ElfDataTokeniser
class, and then bulk it down with 100 lines of code just to reorder
the operators!

Probably I'll release this by Sunday.




Tue Aug 4, 2009 5:48 pm

boytheouk
Offline Offline
Send Email Send Email

Forward
Message #410 of 450 |
Expand Messages Author Sort by Date

Hi everyone, I'll be making a new class, ElfDataTokenizer. ElfDataTokenizer will be useful for writing a code parsing framework. While ElfDataParser was good...
Theodore H. Smith
boytheouk
Offline Send Email
May 31, 2009
5:28 pm

I agree. The ElfDataParser certainly did the trick, but could be a royal pain in the butt to get code parsing to work flawlessly. Depending on complexity of...
Ronald Vogelaar
ronaldvogelaar
Offline Send Email
Jun 24, 2009
10:52 am

OK... so I finally have some time to work on my ElfData plugin again. I've been busy the past few months but now I can work again. I've got an early version of...
Theodore H. Smith
boytheouk
Offline Send Email
Aug 4, 2009
5:50 pm

OK, I added support for negative numbers to my ElfDataTokeniser demo. And I added support for "spaces". So now you can do stuff like this: "2*a / -c" Or even "...
Theodore H. Smith
boytheouk
Offline Send Email
Aug 5, 2009
4:03 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help