Pages: 1
  Print  
Author Topic: Parenting and even inheritance  (Read 1059 times)
Offline (Unknown gender) TheExDeus
Posted on: August 29, 2013, 02:23:14 PM

Developer
Joined: Apr 2008
Posts: 1872

View Profile
This are two things the new parser should fix right? Josh, how is it going?
A user asked me to convert this example for him: http://gmc.yoyogames.com/index.php?showtopic=456948
And besides things like variable_exists(), it uses a lot of parenting and inheritance (even the event_inherited(); function). And as many use them I just wanted to know how is that going?
I will probably rewrite the example to not use parenting, but that just involves a lot of code duplication.

edit: The parser also seems to fail a lot like this case:
Code: [Select]
var near=instance_nearest(x,y,obj_Player_Camara_Parent);outputs as this:
Code: [Select]
var = instance_nearest(x, y, obj_Player_Camara_Parent);And
Code: [Select]
var near; near=instance_nearest(x,y,obj_Player_Camara_Parent);Error in the syntax checker with "Primary expression expected before operator". But it seems to be a variable issue, because when I rename "near" into "tid" or something else, then it works. Is "near" used specifically somewhere in the parser or the compiler? I see these problems with variable names a lot. I think other than type names (int, short, double etc.) all other should be available. Especially if it is not shown in the code editor (type names are bold for example, while "near" is just normal). So we should find all these variables and define them in a way that doesn't make the conflict.

edit2: Also, GM seems to allow break; outside a loop or a switch which makes it work like "exit": http://wiki.yoyogames.com/index.php/Break. ENIGMA doesn't allow that. Not sure we even should allow that... but you know.. compatibility.
« Last Edit: August 29, 2013, 02:51:09 PM by TheExDeus » Logged
Offline (Male) polygone
Reply #1 Posted on: August 29, 2013, 02:47:01 PM

Contributor
Location: England
Joined: Mar 2009
Posts: 803

View Profile
For some reason 'near' has stopped working recently, must have been added somewhere.
Logged
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
Offline (Male) Josh @ Dreamland
Reply #2 Posted on: August 29, 2013, 04:35:11 PM

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

View Profile Email
I told polygone to implement a new AST node for me, but he gave up in roughly the expected time. I'm taking a break from the compiler long enough to work with Ism on the EDC's new cloud server. It has been a bigger pain in the ass than anticipated. Both, actually. If you've been keeping an eye on JDI's progress, you'll notice the C parser in the branch throws roughly twice as many errors parsing <string> as the one in ENIGMA. That's the bad news. The good news is that it is parsing with 100% accuracy, which is both the source of the errors (if it can't parse accurately, it throws errors instead of assuming A-OK), and the reason that the new compiler is able to do the advanced type inference required for OOP.

I understand that in addition to the new features I want to see in ENIGMA, a lot of the longest-lived bugs are counting on the new parser. There's not much I can do about it unless I want to take another shortcut, which will only mean repeating this again in so many months.

On the plus side, the reason for my lack of free time is working against itself: I took courses over summer and am graduating in a few months. This will mean a brief transitional period wherein my output is even less than right now, followed by a time where the bulk of the stress in my life is between the hours of 9-5, and, if all goes according to plan, 20% of that stress will be this project.
« Last Edit: August 29, 2013, 04:39:07 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) daz
Reply #3 Posted on: August 29, 2013, 04:51:33 PM
Contributor
Joined: Jul 2010
Posts: 167

View Profile
if all goes according to plan, 20% of that stress will be this project.
Looking to go to Google?
Logged
Pages: 1
  Print