“Reference-To” Logic

One of the reasons I never liked C/++ is it's illogical pointer syntax.

C++:
  1. int v0=5,v1=6;
  2. int* p0;
  3. int *p1;
  4. p0 = &v0;
  5. *p0 = v1;

The first pointer declaration is ok: The star turns the type integer into a pointer-to-integer.
The second one is a bit confusing. To the readers (at least mine) eye it looks like the star belongs to the identifier, modifying it somehow. Ok, it's just the result of C/++ being a freeform language so let's go on.

The star turns any data type T into a pointer-to-T. So the same must be true for values; turning values into pointers to those values, right? Bad luck. The inventor of C chose to use a different symbol for returning the address of a value. Fine with me, as long as the star has no other appearances in the indirection business.

More »

The Philosophy behind: “GetSet”

This is the first article in the "Philosophy behind"-series, picking up a specialty of one of my projects and explaining how it came to be made.

This time I am talking about a generalization in the Prexonite Script compiler that handles the usage of symbols in expressions and statements.

"There must be a way to unify variable access with function and object member calls"

...is what I thought. As a result the Prexonite Script syntax can treat functions like variables and vice-versa. I decided that there are two fundamental ways of interacting with a symbol: getting a value and setting a value.

More »

Integrating Coco/R into VS2005

One of the Cons about Coco/R is it's lack of integration into the VS2005 IDE. Yes, I know that a plugin for #develop exists but I do not want to switch IDE (sorry, but VS2005 is far better).

For my purposes, a complete integration would consist of the following steps:

  1. Attach PxCoco (the parser generator) to the Build button in VS2005.
  2. Forward errors from PxCoco to VS2005.
  3. Support multi-file grammars with proper error forwarding.
  4. Map C# errors in the resulting parser class to the grammar file.
  5. Provide intellisense (and all the other wonderful features in VS2005) for grammar files.

More »

Prexonite Today

This is a translation of the german article posted at FrozenHand.

A bit more than 4 months later I may still not have a prototype I could release. What I have is a working type system, an assembler and parts of the compiler and the AST/code generator.

First I had a closer look at the ANTLR parser generator from the Java domain. ANTLR would have come with it's own IDE and even automatically created an AST. Unfortunately the C# version was not working at that time, so I had to continue my search.

More »