Author Topic: Antelope (formerly "OPIA") - A Polymorphic z80 language  (Read 42487 times)

0 Members and 1 Guest are viewing this topic.

Offline shkaboinka

  • LV3 Member (Next: 100)
  • ***
  • Posts: 86
  • Rating: +10/-1
    • View Profile
    • Antelope (polymorphic z80 language)
Re: OPIA - A full OOP language for z80
« Reply #120 on: June 18, 2012, 03:21:33 pm »
I feel it worth sharing a conversation from another thread:

Quote from: merthsoft
It looks good to me. Though I can't help but point at that examples are always a good idea, even if you think it's readable. Not everyone is you. What you and Kerm basically just did is an example of intellectual exceptionalism--you more-or-less said "it's easy to understand if you're not dumb".
Thanks for bringing this to light, because the fact that it appears that way means that I was not clear about what I posted and why (oops!): The Grammar is something that I posted as a necessary aid in designing the compiler, rather than as a medium I chose to explain the language to everybody (that's what the overview is for). However, in the spirit of open source development (and to involve the community), I document everything and try to keep it as clear as possible for what it is (e.g. I try to keep the source code easy to read if you know Java).

However, given the involvement/interest in the community, the usefulness of a grammar, and in light merth's point (thanks), posting a section about how the grammar works would be very helpful in general as well as providing the opportunity for more people to see how the compiler/language is directly put together (and for those so inclined, I provide those very same classes in the compiler with external access as a Java API).

Offline shkaboinka

  • LV3 Member (Next: 100)
  • ***
  • Posts: 86
  • Rating: +10/-1
    • View Profile
    • Antelope (polymorphic z80 language)
Re: OPIA - A full OOP language for z80
« Reply #121 on: June 27, 2012, 03:49:44 pm »
*Bump!*

I've updated the Grammar a good deal, take a look! The next step is to throw in all the statement-level items, which will help me finish all the namespace-level items. Notice that I've finally incorporated lambda expressions, anonymous functions, and literal constructs into the expression-web (which was hard because I had to provide a way for "types" to exist as expressions, including all I just mentioned).

Offline BlakPilar

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 734
  • Rating: +44/-1
    • View Profile
Re: OPIA - A full OOP language for z80
« Reply #122 on: June 27, 2012, 04:13:24 pm »
Hazzah for lambda expressions and anonymous functions! :D

One question, though: I just noticed bit rotation. Is that where 0b00100110 >>> 3 == 0b11000100?

Offline shkaboinka

  • LV3 Member (Next: 100)
  • ***
  • Posts: 86
  • Rating: +10/-1
    • View Profile
    • Antelope (polymorphic z80 language)
Re: OPIA - A full OOP language for z80
« Reply #123 on: June 27, 2012, 05:24:16 pm »
Hazzah for lambda expressions and anonymous functions! :D

One question, though: I just noticed bit rotation. Is that where 0b00100110 >>> 3 == 0b11000100?

Indeed it is! :) I figured that it's useful enough in z80 programming to just make it a direct operator. I know that Java uses ">>>" for "unsigned left shift", but that's only because it does not allow for unsigned variables. In OPIA (and other languages), you can just use a type-cast to affect the operation anyway :)

Offline shkaboinka

  • LV3 Member (Next: 100)
  • ***
  • Posts: 86
  • Rating: +10/-1
    • View Profile
    • Antelope (polymorphic z80 language)
Re: OPIA - A full OOP language for z80
« Reply #124 on: June 30, 2012, 01:58:23 am »
All the grammar rules are now in place! I just have to revise the example a bit more, and perhaps add in some more "notes / additional semantics" (which I have kinda been glossing over).

Offline shkaboinka

  • LV3 Member (Next: 100)
  • ***
  • Posts: 86
  • Rating: +10/-1
    • View Profile
    • Antelope (polymorphic z80 language)
Re: OPIA - A full OOP language for z80
« Reply #125 on: July 02, 2012, 06:01:06 pm »
I have finally completed the grammar!

I was very thorough in including notes, explanations, additional semantics, and examples. The grammar gives a technical definition of OPIA syntax in detail, but I have also included a list of classes used and an explanation of how they are used, and a very integrated (and thorough, though somewhat shortened) example of how the parsing works with the classes used.

Please take a look! (and let me know if anybody can find anything wrong with it, thanks) :)

Note: Due to current circumstances, designing the compiler may have to take a back seat for a while (job search, baby coming due). HOWEVER, please also note that the grammar is already a very complete definition of MUCH of the compiler internals. ... When I can find significant time, it will be much a matter of writing code to match the rules (almost exactly as they are described).
« Last Edit: July 02, 2012, 06:51:33 pm by shkaboinka »

Offline shkaboinka

  • LV3 Member (Next: 100)
  • ***
  • Posts: 86
  • Rating: +10/-1
    • View Profile
    • Antelope (polymorphic z80 language)
OPIA - NAME CHANGE!
« Reply #126 on: July 09, 2012, 05:02:45 pm »
I am considering changing the name of the OPIA language, since it has already left the classic OOP paradigm (it is still object based, but the polymorphic behavior is provided separately from objects), and to define it in its own terms (i.e. not a "revised" Antidisassemblage).

SOME POSSIBILITIES:

OPIL - Objective Pre-Interpreted Language
OPPIL - Objective Polymorphic Pre-Interpreted Language
PIOBL - Pre-Interpreted Object-Based Language
PIOL - Pre-Interpreted Objective Language
PIOPL - Pre-Interpreted Objective Polymorphic Language
PIOZL - Pre-Interpreted Objective z80 Language
PIPL - Pre-Interpreted Polymorphic Language
POBL - Polymorphic (or Pre-interpreted) Object Based Language
POL - Polymorphic (or Pre-interpreted) Objective Language
POPIL - Polymorphic Objective Pre-Interpreted Language
POPL - (same as above, or flip the P's around)
POPIZL - Polymorphic Objective Pre-Interpreted z80 Language
POZL - Polymorphic (or Pre-Interpreted) Objective z80 Language
PPIL - Polymorphic Pre-Interpreted Language ("P Pill")
ZOPIL - z80 Objective Pre-Interpreted Language
ZOPPIL - z80 Objective Polymorphic Pre-Interpreted Language
ZPIOL - z80 Pre-Interpreted Objective Language
ZPIPL - z80 Pre-Interpreted Polymorphic Language
ZPOL - z80 Polymorphic (or Pre-Interpreted) Objective Language
ZPOPIL - z80 Polymorphic Objective Pre-Interpreted Language
ZPOPL - (same as above, or flip the P's around)
ZPPIL - z80 Polymorphic Pre-Interpreted Language
ZPPL - (same as above, or flip the P's around)

Notes:
 - "Objects" and "Polymorphism" kind of imply each other.
 - "Pre-Interpreted" could be "Partially interpreted" instead.
 - "Objective" and "Object Based" are mostly interchangeable.
 - I am also considering how the name "sounds" (though some like ZPPL would just be read letter by letter).
 - The following languages already exist: PIPL OPL ZOPL PPL.

OPINIONS (for or against) ARE APPRECIATED!

Offline shkaboinka

  • LV3 Member (Next: 100)
  • ***
  • Posts: 86
  • Rating: +10/-1
    • View Profile
    • Antelope (polymorphic z80 language)
Re: Antelope (formerly "OPIA") - A Polymorphic z80 language
« Reply #127 on: July 10, 2012, 07:09:44 pm »
Further discussion suggested I choose a random name that "sounds" better. I considered "tadpole", "polywog", and "caterpillar" (since my language is simple, polymorphic, and will hopefully grow into something big); I threw out other ideas from constructed languages (nevermind!); and then finally I just asked my wife (who has nothing to do with programming), and she immediately referred to my little friend:


(http://tinyurl.com/AntelopePic)

It looks like my little friend ("The Antelope") just accidentally became a programming language mascot: I think I'm going to stick with "Antelope"! :) (..and I changed the thread name to match..)

HERE ARE THE NEW LINKS:

http://tinyurl.com/antelopeHome - Antelope Home page
http://tinyurl.com/antelopeOverview - Antelope Overview page
http://tinyurl.com/antelopeGrammar - Antelope Grammar page
http://tinyurl.com/antelopeSource - Antelope Source Code page
http://tinyurl.com/antelopeCode - Source Code (again)

I have also left a link on the old OPIA page, though I have yet to actually import everything over (but do see what I've done with the home/intro page).

EDIT: All the (relevant) documentation and code has been ported over (enjoy)! I will delete the old project eventually.
« Last Edit: July 11, 2012, 12:33:57 am by shkaboinka »

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Antelope (formerly "OPIA") - A Polymorphic z80 language
« Reply #128 on: July 11, 2012, 05:05:01 am »
That is a much better name than before. OPIA always made me think of what the plural version of opium would be. :/

Offline NanoWar

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 140
  • Rating: +18/-6
    • View Profile
Re: Antelope (formerly "OPIA") - A Polymorphic z80 language
« Reply #129 on: July 11, 2012, 08:10:52 pm »
Hmm I like POL or OPIA hehe. I like uppercase names for programming languages...

Offline shkaboinka

  • LV3 Member (Next: 100)
  • ***
  • Posts: 86
  • Rating: +10/-1
    • View Profile
    • Antelope (polymorphic z80 language)
Re: Antelope (formerly "OPIA") - A Polymorphic z80 language
« Reply #130 on: July 12, 2012, 06:48:47 pm »
Well, being as that I finally fixed up that image so it doesn't look like a stuffed animal...

...I think I am sticking with Antelope. But thanks for supporting my cause! :)
« Last Edit: July 12, 2012, 07:05:29 pm by shkaboinka »

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Antelope (formerly "OPIA") - A Polymorphic z80 language
« Reply #131 on: July 13, 2012, 12:43:23 am »
That is a much better name than before. OPIA always made me think of what the plural version of opium would be. :/
Unfortunately that's how it was for me <_< Antelope's a nice name. I like it. Language names don't have to have anything to do with what they're like—heck, just look at Python and Lua :D (By the way, what did OPIA even stand for? I don't see it anywhere except possibly that long list of acronyms in your post about possible names, but that list doesn't contain "OPIA." But then I haven't read much of this topic yet, so sorry if it's in some random place.)

I hadn't really looked at your project until now (sadly), but the more I read on the Grammar wiki page the more excited I'm getting about it. (Who knows, maybe it's the name change XD)




Offline BlakPilar

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 734
  • Rating: +44/-1
    • View Profile
Re: Antelope (formerly "OPIA") - A Polymorphic z80 language
« Reply #132 on: July 18, 2012, 01:43:43 pm »
Woah, looks like I missed a few posts. I don't know why, but I wasn't receiving emails.

Anywho, the grammar looks good! I'll have to take a gander at the source sometime soon ;)
« Last Edit: July 18, 2012, 01:44:26 pm by BlakPilar »

Offline shkaboinka

  • LV3 Member (Next: 100)
  • ***
  • Posts: 86
  • Rating: +10/-1
    • View Profile
    • Antelope (polymorphic z80 language)
Re: Antelope (formerly "OPIA") - A Polymorphic z80 language
« Reply #133 on: July 18, 2012, 03:17:36 pm »
Woah, looks like I missed a few posts. I don't know why, but I wasn't receiving emails.

Anywho, the grammar looks good! I'll have to take a gander at the source sometime soon ;)
Awesome, you guys! Thanks!
By the way, the source will need some redoing; but feel free to see it anyway. I will have to make sure the Token class matches everything now, and there are other changes (reserved words do not currently "count" as identifiers, which might result in confusing error messages). Also, the Tokenizer class (previously "Preprocessor") is going to be highly revised so that it can spit out one thing at a time (like the Token.nextToken()) rather than messing with Lists (so as to make it play nice as an API). I am planning on perhaps making a "TokenSource" interface so that things OTHER than Token.nextToken() can be used to get tokens, with Tokenizer acting as an intermediary which uses that and preprocesses at the same time.

...I have an interesting conundrum to resolve as well, and posted about it in Cemetech; but it's REALLY long...

Offline BlakPilar

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 734
  • Rating: +44/-1
    • View Profile
Re: Antelope (formerly "OPIA") - A Polymorphic z80 language
« Reply #134 on: July 18, 2012, 05:50:20 pm »
Before I took a break from my compiler, I had my tokenizer run through a .NextToken() basis. However, I may need to do some looking ahead, so I think I may put all of the read tokens into an array when I get back to it. As for the reserved words bit, maybe you could have special types of reserved words? As in some way to see if they would return a value ("typeof" or "sizeof," for instance, though I'm not sure if you're using those in particular).

Could you perhaps link to your conundrum?