Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Josh @ Dreamland

2566
Announcements / Re: Fresh Topic
« on: August 21, 2009, 08:34:27 PM »
Well, hey, if any of you experts want to show me how it's done, feel free. When your parser can outperform mine, I'll use it. It's that simple.

Until then, however, we'll be sticking with what I'm coding.

2567
General ENIGMA / Re: Generated Parser
« on: August 21, 2009, 08:06:51 PM »
I'll do all those wonderful things when I, or someone on my team, actually intends to program support for any of them.

And Flash is the only one of those that will require total recoding of the parser; the rest is trivial modification. The syntax check will still be valid in any of those cases, and looky here, it ruins the entire rest of the project anyway because the only thing I know about Flash is that it's fuck ugly.

If it wasn't for integrating the entirety of C++, this parser would have been done within three days of my starting it. I can't think of a good reason to entirely support Flash even if I got hit in the head hard enough to want to support it.

So basically, Flash and Obj-C are off topic and out of the question.


And, as I said in advance -- as in, before you could even bring it up again -- I don't care how trivial the mistake is. Point is, it was made. You'd have to put out some really, really nasty code to ever make my parser put a semicolon where it doesn't belong, and that's the only mistake it's capable of making.

Where can I see my parser's outcome not being entirely predictable for all audiences?
Code: [Select]
a = b++ c

That's it. That's the only real ambiguity.

And idiotic mistakes in mine... heh. If it works once, it won't just stop working. Due to everything being done procedurally; each step makes assumptions about how the code is formatted based on the imminent success of the previous.

On the subject of which, I think you missed something from the first thing I said.
Code: [Select]
a=0b=1c=2became
Code: [Select]
a=0;b=1c=2
Note that it only added the semicolon once. The second time, nope. Just keeps ignoring further semicolons. Another simple fix, I say! Look how simple this is to get working if you stare at it with a magnifying glass for hours on end, testing everything over again each time to make sure two definitions in your grammar file aren't conflicting; making sure that no order of statements is going to cause total collapse.


I'll give you this, though: I did forget one thing last time. I totally forgot about allowing .7 as well as 0.7, which led to a semicolon being added. In retrospect, I should have been replacing .0 with 00 anyway, because 0.n is valid. Either way, boy did I feel stupid. That said, never did I manage to leave out half the goddamn code just because of "a single if statement that I left out".


Anyway, feel free to continue working on this. If it beats mine in a benchmark, -- that other silly little factor that just doesn't apply to something so great as a token tree -- I'll be happy to use it. And I know it doesn't matter how fast to you, but let me tell you, it certainly matters to me. Why?

I wish you luck with the C++ part of that. You'll need it. I've heard horror stories from "professionals" who were about as happy to hear of my parser's methodology as you, who tried it with the almighty token tree parser and had a record breaking parser time of ten seconds for an STL header. It'll be pretty hard for me to manage a time like that in one pass.

2568
General ENIGMA / Re: Enigma IDE (written in C++ using GTK+)
« on: August 21, 2009, 07:35:52 PM »
I was honestly bound to make that typo at some point.

Also, I don't see a problem with LGM, but I'm all for an official IDE. The hard part will be the room and path editors, I imagine.

2569
General ENIGMA / Re: Generated Parser
« on: August 20, 2009, 08:57:31 PM »
I stopped when a=0b=1c=2 came out as a=0;b=1c=2.

With my parser, if one works, they all work.

And on for() not being implemented in your parser... When I was done with if(), for() was added just by saying this:
Code: [Select]
      sy_semi=sy_semi->push(')','s');
      sy_semi=sy_semi->push(';','s');
      sy_semi=sy_semi->push(';','s');

Where if() was done with only the first line of that code.

The only thing you've demonstrated is how something can work once, and then just stop. The only way mine would ever stop working is if I managed to dis-align the code string and token string. But only a real twat would do that.

I'm writing the parser to do exactly what I want done. It's more focused than your all-purpose tree, and works independent of context. The context parsers are the syntax checker and the C Parser. Neither of those need to use a lexer; they are reading the code just as you and I do and writing things down as they go.

It would be aggravating, but doable, to write this GML-C++ formatter parser without doing any sort of lexing. But doing it this way is so much more general...

The only thing I'm not supporting from the entire C++ language with each of these parsers is literal suffixes, as in 100000000L or 0.5f. I find they're unnecessary anyway.

Even things like struct a {}; struct a b; rather than just a b; can all be so greatly generalized this way.

A tree just sounds like a great way to over-complicate things.


Edit:
I just tried a simple if statement to see if that'd work, and I noticed that it replaced = with ==. Which was nice, until I noticed it also deletes else{} statements. I'll drop dead before something that stupid happens in my parser.
And I don't care how easy it is to fix the goddamn thing. Point is, you somehow managed to delete else(), and that's not the first or only thing you can really fuck up with a token tree.

2570
General ENIGMA / Re: Enigma IDE (written in C++ using GTK+)
« on: August 20, 2009, 07:52:38 AM »
I can see it feeling that way because everything that goes on between LGM and ENIGMA is basically a hack.
We tried making ENIMGA a DLL for LGM to load, but that didn't go so well.
You and I probably need to try that again, Ism.

It also doesn't help that Java performs differently on every computer I've tried it on.

2571
Announcements / Re: Fresh Topic
« on: August 19, 2009, 10:04:23 PM »
Progress:
I'm signed up for all the courses I wanted at the local university.
Also, beginning the cross-communication cycle between the parsers. (Or pieces of parsers).

Storm's abrewin'.

Nothing earth shattering, sorry. Mostly boring things; making sure hex works. Trying nested statements and parentheses. Making sure none of the optimizations and generalizations I make kill anything.

Good thing I like parsers. ^_^

2572
Announcements / Re: Fresh Topic
« on: August 18, 2009, 07:17:29 AM »
I know a certain someone with a top hat fetish.

He also starves bugs to death, though.

Progress:
Parser does everything it used to. Only better, of course, due to extensibility via the CFile parser.
Oh, which means I lied. The parser doesn't support var yet, because var's not a primitive. I'm considering treating it like one, though, so var.whatever never accesses a member of var. Perhaps instead I'll make var's members private, and make sure the parser doesn't abduct any private members.

If you people need something to argue about, I can probably give one of my old controversies that making ENIGMA totally support C has solved... heheheh.

2573
Announcements / Re: Fresh Topic
« on: August 17, 2009, 03:33:36 PM »
Fedora isn't working at all, and the more I fight with it the angrier it gets.

I'm gonna reinstall the OS at some point, but for now I'm just working on the parser.

2574
General ENIGMA / Re: Mixed arrays
« on: August 13, 2009, 04:55:53 PM »
it's supported that since R1... Though it's been recoded multiple times since, so.

2575
Announcements / Re: Fresh Topic
« on: August 13, 2009, 04:51:32 PM »
Tried it? I had to blacklist it. Which fixed nothing. Prime.

2576
Announcements / Re: Fresh Topic
« on: August 13, 2009, 02:11:51 PM »
There's no correct driver
*starts mumbling about the apocalypse*

2577
Announcements / Re: Subject
« on: August 13, 2009, 02:10:26 PM »
We'll compromise and make the 1.3 release 32 days after the 1.2 release.

2578
Announcements / Re: Fresh Topic
« on: August 13, 2009, 08:38:06 AM »
zack--
It has four different pieces, which are basically separate parsers.
One's a syntax checker. It was about 30x faster than Mark's last time I banchmarked.
One's a CFile parser. Its job is to extract definitions from snippets of syntactically correct C++.
One's an expression evaluator. It does mathematics and things that need preprocessed.
This final one is a formatter. Its job is to make sure that even the nastiest GML you can pass it will be syntactically correct C++. It's by far the easiest to write.

Retro--
You can't use '0' to indicate 0x30, if that's what you mean. I might have a setting for that.

Score_under--
That's almost what I did. Instead of allocating things at the beginning, I just write stuff to the same buffer I'm using, since it's 90% removal. When I do that, I'll check if I'm at a begin or end and if so, only write a { or }.


Progress--
I've been trying to get Fedora to work with my graphics card. However, this has only landed me in hell, and I spent basically all of yesterday just trying to fix it. I'll probably give up and either use Ubuntu on my mom's computer, or fix Fedora to work without my card again. -_-

2579
Announcements / Re: Fresh Topic
« on: August 12, 2009, 03:41:55 PM »
Game_boy:
Linux is all right, once you finally get it working. And that's never an easy task, it should seem.

Rusky--
Laugh all you want. I like the idea of having the work divided up into different parsers that are meant to do different tasks.
And until you can produce a working token tree parser to do everything mine does--which I promise you'll never be able to do, be it because of impatience or lack of skill which other teams have exhibited even with a parser *generator*--I suggest you just drop it.

In other words,
You'll never get a parser to work as well as mine does. Sure, I could easily turn it into a token tree at this point, or probably a regular token list. But it's much simpler to look at this way, and I'm not allocating structures to hold one fucking byte apiece.

And if your concern is efficiency, I'll smack you. Because the slowest parser is still faster than greased lightning, and the syntax checker (which will be used a lot more often) is unbeatable. Takes const char*, allocates NOTHING. Iterates ONCE.

I don't want to hear about the holy grail of easy-to-write parsers that anyone and their sister can screw up anyway. I just don't.

Retro:
The other releases handled strings the same way, don't worry. They must all be "" for C++, but you can use them just like you do in GM and the parser will handle it.

2580
General ENIGMA / Re: I got to thinking.
« on: August 12, 2009, 03:35:40 PM »
Objects have been classes since R1, Russell...