This project is read-only.




Upload your tests. Please either rename your reports or leave the name of the folder and the tests that you are performing in the description before attaching them as a zip file.


file attachments

Closed May 22, 2013 at 11:06 PM by danieljsamson


clearosdev wrote May 6, 2013 at 4:11 PM

Testing number and enum

danieljsamson wrote May 6, 2013 at 11:07 PM

In SharpKeywordTests(12.9.55)(6.5.2013).zip

Keywords: public, private, protected is recognised as an identifier. It should be a KeywordModifier or something to that effect.

The :: is followed by an additional : operator.

yield keyword is not recognised.

clearosdev wrote May 7, 2013 at 12:27 AM

please take a look at Number + enum most stuff work but idk about decimals, case/switch

danieljsamson wrote May 7, 2013 at 9:55 AM

I checked it over and to me it seems ok, so i'm not sure where the confusion is. Are you confusing LiteralIntegerDecimal with LiteralRealDecimal?

"case" is a keyword. but the numbers are literals. Please understand that some tokens/lexicon can have multiple definitions in the standard. However in my implementation, i can only assign a single number/value/definition to a Lexicon Boundary Point. For example in List<int> the greater than and less than signs will come up as operators, even though the are not really operators. The syntactical analysis (the next stage) will correct this. So the PunctuatorColon is correct at this stage.

The identifier "intnumber" is correct. if the identifier was just "int" then that would be an issue. According to the ECMA-334, keywords are simply reserved identifiers. The only way that you can use a keyword as an identifier is if the first character is an @ or an underscore. Eg: @int or _int.

I hope this helps :)

danieljsamson wrote May 7, 2013 at 10:37 AM

I think we need to test all the operators and punctuators.

danieljsamson wrote May 7, 2013 at 7:09 PM

Operators test

clearosdev wrote May 8, 2013 at 2:19 AM

you are missing object in the built in types I never used it but its listed here:

danieljsamson wrote May 8, 2013 at 11:05 AM

if you open the keywords test i created, and go down to character 900 in the start column, you will notice that object keyword is recognised as Keyword Types References instead of Keywords Types Built In. string also is recognised in the same way.

object and string come under reference types

However, the documentation states that the object and string types are build in. For example ";The object type is an alias for Object in the .NET Framework. In the unified type system of C#, all types, predefined and user-defined, reference types and value types, inherit directly or indirectly from Object."

I believe that string should be a keyword reference type since it is an array of chars. the object keyword I am not so sure. I would argue that Object is a base class. So it isn't truly a built in type, i think its a pre-defined. In asm there is no object type to speak of.

We could keep it the same. Do you think we need a new sub type? such as KeywordTypesBuiltInReference perhaps?

If we created a new subtype then i guess it would be more true to the language, however, i fail to see how it would effect the next stages. There is a stage I haven't really thought of. Which is the standard library such as the System namespace.

The table on the page you shared shows how the built in types are aliases to the .NET framework. It was my understanding that we are not going to support the .NET framework. The reason i thought this was because if we are creating an custom OS, you cannot guarantee that a that part of the OS exists. So i was intending to provide the implementation for the standard library defined in ECMA-334 page 477(or 499 in the PDF).

My goal for 0.1 is to try to comply to this standard as closely as possible. I don't want to support the .NET framework. You don't seem to want the compiler to support CIL. Plus I thought we were creating our own framework...What do you think?

danieljsamson wrote May 8, 2013 at 11:30 AM

In addition I the feel the main goal for 0.1 is to get the groundwork laid out. To have full support for the ECMA-334 standard and then we can implement the more features into the compiler.

My ideas for the future are
  • Some .NET classes support.
  • support for dynamic types .
  • support other open standard languages like ECMAScript.
  • support Multi-Processing.
  • Visual Studio Project file support.

danieljsamson wrote May 9, 2013 at 11:07 AM

I just concatenated all the files together from The DiskUtils namespace and passed them through the Lexical analysis. It was 78,625 lines of code. 2974114 characters. It finished the analysis in 261 milliseconds. that is pretty fast. We need to rework the ui and reporting tool for bigger file sizes. I couldn't save a report but here's a screenshot.

My CPU was up at 33% (intel i5) and it took 510MB of ram. then it drop down to 362MB.

danieljsamson wrote May 9, 2013 at 11:07 AM

Heres the file.

clearosdev wrote May 9, 2013 at 1:58 PM

That is good to know that you have done a great job optimizing the lexer hopefully you can kept it that way with syntactical analysis and the asm output