Pages: 1 2 3 4 5 »
  Print  
Author Topic: Fresh Topic  (Read 10661 times)
Offline (Male) Josh @ Dreamland
Posted on: August 11, 2009, 05:01:38 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2958

View Profile Email
That other one wandered off.
Anyway, this is progress:

Code: [Select]
int a = 0 if a = 1 b=2c=3     else d=4 e=5 f='test removal of strings'g="poop"  endorphin = /*removal of comments*/ 6 motherlicker = 7 //or eight
 end break label: goto label awful_code() a=b=c + d  *  e / f do do a = b until c until d if 1if 0else else c()return 0  /*

Parses to

Code: [Select]
int a = 0;
if(a = 1)
  b = 2;
c = 3;
else d = 4;
e = 5;
f = "test removal of strings";
g = "poop";
endorphin = 6;
motherlicker = 7;
end;
break;
label:
goto label;
awful_code();
a = b = c + d * e / f;
do do a = b;
until(c);
until(d);
if(1)
  if(0)
    else;
  else c();
return 0;

And yes, I know the syntax is invalid. The parser doesn't care.
Here's another:

Code: [Select]
long unsigned int a

b = 0
cd = 'str'+"ing"

do
{
a=b-0c=d-1
while a a--
}
while c

do until 0

with a b.c = e
if d exit

Becomes
Code: [Select]
long unsigned int  a;
b = 0;
cd = "string";
do
{
  a = b - 0;
  c = d - 1;
  while(a)
    a --;
}
while(c);
with(a)
  b . c = e;
if(d)
  exit;

Nothing you didn't see in R3. Except else; else and some indenting.
The difference is the mechanism.

Notice the first statement: int a = 0;
In R3, this was done with some sketchy additions to the parser; it wasn't originally planned to support that. But now it's an official part. What's this mean?
This means that additional types, including structures that I know the more intelligent users will grow to love, can be added and used withing EDL.

What's left:
Make begin and end actually work, instead of acting like a statement XD
switch() magic
with() supermagic (I have the perfect plan)
Re-fetching declared variables (five minute job thanks to the parser's system)
Pass struct{} and the like to CFile parser, as those are its forte
Make sure syntax checker supports struct and the like

I dug up the new instance system. (Irony, yes, but I'll take it).


I've been hopping back and forth between Linux and Windows. I want to re-commit all the code to the SVN to make that process easier. Not to mention it'll make things better for me considering my college schedule I've been sorting out over the last couple of days.

(The thing's terrible. It's like Swiss cheese; three hour gaps on a good day ;_; )


Anyway, what else... Future plans for before the release.

Incorporate at least backgrounds, possibly sounds, but I'm not sure.
Make sure there's an updater. This will make releases cost less blood.
Test the new instance system with various options set (there are three things to set with two or three choices each.)
Implement a derivative of the string class specifically for ENIGMA. (this will fix so much, efficiency wise)

...And that's it. I was expecting more, but the list is looking short. I like that.
« Last Edit: August 11, 2009, 10:51:12 PM by Josh @ Dreamland » Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Unknown gender) skarik
Reply #1 Posted on: August 11, 2009, 07:42:25 PM

Member
Joined: Jul 2008
Posts: 46

View Profile WWW Email
First. Lol.

Quote
the list is looking short
wtf. My little bro just asked me to bake him a hot pocket.
Logged
~~
Offline (Male) RetroX
Reply #2 Posted on: August 12, 2009, 10:30:34 AM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
Does this mean all single quotes are parsed as double quotes?  Does it also change single quotes within double quotes to double?

Will char a='a' or string="string'd" work?
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Male) qc.zackf
Reply #3 Posted on: August 12, 2009, 12:31:05 PM

Member
Location: Winter Haven, FL - USA
Joined: Aug 2009
Posts: 41

View Profile Email
Cool so YOU can assign types to your variables in EDL. Lol. I asked this same question here a few minutes ago.
Logged
Only ask questions you know the answer to...
Offline (Unknown gender) Game_boy
Reply #4 Posted on: August 12, 2009, 01:51:50 PM
Member
Joined: Apr 2008
Posts: 228

View Profile
How are you finding Linux? I don't mean ENIGMA, I mean you using it day-to-day.
Logged
Offline (Male) Rusky
Reply #5 Posted on: August 12, 2009, 03:10:25 PM

Resident Troll
Joined: Feb 2008
Posts: 960
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
Pass struct{} and the like to CFile parser, as those are its forte
Make sure syntax checker supports struct and the like
Hahahahaha
Logged
Offline (Male) Josh @ Dreamland
Reply #6 Posted on: August 12, 2009, 03:41:55 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2958

View Profile Email
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.
« Last Edit: August 12, 2009, 03:47:54 PM by Josh @ Dreamland » Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Male) Rusky
Reply #7 Posted on: August 12, 2009, 05:35:59 PM

Resident Troll
Joined: Feb 2008
Posts: 960
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
Using different parsers is pointless if they're all parsing the same thing.
Also, prepare to be amazed.
Logged
Offline (Male) qc.zackf
Reply #8 Posted on: August 12, 2009, 07:22:23 PM

Member
Location: Winter Haven, FL - USA
Joined: Aug 2009
Posts: 41

View Profile Email
Quote from: Josh @ Dreamland

... And if your concern is efficiency, I'll smack you ...


Ha ha. Funny.

Using multiple parsers to parse the same thing is a little unorthodox.  I don't know too much about parsers so don't smack me if I say something wrong, but why not have one parser that has multiple stages of parsing or does ENIGMA use a global chain of parsers? I guess either way you'll get the same efficiency.
Logged
Only ask questions you know the answer to...
Offline (Male) RetroX
Reply #9 Posted on: August 12, 2009, 08:47:44 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
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.
You still didn't answer my question about char.  Char won't work with double quotes.

And will using Uint8 and similar types work in the parser?

EDIT: Random question - how far has Luda gotten with Colligma?
« Last Edit: August 12, 2009, 08:50:40 PM by RetroX » Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Unknown gender) score_under
Reply #10 Posted on: August 13, 2009, 04:24:40 AM

Member
Joined: Aug 2008
Posts: 308

View Profile
What's left:
Make begin and end actually work, instead of acting like a statement XD
Heck, you can just replace begin with
Code: [Select]
    {(5 chars, 4 spaces and a brace - no memory allocated and no chars shifted around)
and end with
Code: [Select]
  }And it'd work fine :D
Logged
Offline (Male) Josh @ Dreamland
Reply #11 Posted on: August 13, 2009, 08:38:06 AM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2958

View Profile Email
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. -_-
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Male) RetroX
Reply #12 Posted on: August 13, 2009, 01:58:49 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
What graphics card do you have?  And what do you mean by "not work"?  I might be able to lead you to the right driver for it.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Male) Josh @ Dreamland
Reply #13 Posted on: August 13, 2009, 02:11:51 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2958

View Profile Email
There's no correct driver
*starts mumbling about the apocalypse*
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Unknown gender) Game_boy
Reply #14 Posted on: August 13, 2009, 02:56:18 PM
Member
Joined: Apr 2008
Posts: 228

View Profile
There's no correct driver

What card? There's always a correct driver.
Logged
Pages: 1 2 3 4 5 »
  Print