1 / 19

ArcaScript Language: Academic Language Grammar

ArcaScript Language: Academic Language Grammar. CS 4800 By Brandon Andrews. Introduction. Specifications Goals Applications Design Steps Testing. Specifications.

Télécharger la présentation

ArcaScript Language: Academic Language Grammar

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ArcaScriptLanguage: Academic Language Grammar CS 4800 By Brandon Andrews

  2. Introduction Specifications Goals Applications Design Steps Testing

  3. Specifications Create the grammar for a strongly typed imperative language that merges features of common languages like ECMAscript, and C# and others. Braces language Grammar will be in EBNF notation

  4. Goals To create a complete grammar for a language. Try to make it unambiguous if possible.

  5. Applications The languages could act as a scripting language running in a virtual machine or be compiled. I plan to use it for a scripting language for a game’s GUI.

  6. Design Broken the design down into parts and solved each part mostly separately. Data Types, Allocators (new/delete when not garbage collected), Constant Types, Control Structures, Namespaces, OOP (classes, methods, etc.), Iterators, Exception Handling, Threading, Function “Pointers”, Macro Preprocessor, and Remote Procedure Call functionality built into the language.

  7. Data Types Strongly type bool, char, string, uint, int, uint<n>, int<n>, float, double, enum Tuple and NamedTuple Simple data types Constant modifiers (apply to immediate right) Reference types int<8> foo = 5; // can change int<8>& foo = bar; // can change const int<8> foo = 5; // value can't change int8 const& foo = bar; // reference can't // change const int<8> const& foo = bar; // reference and value // can't change

  8. Control Structures if, else, while, for, do, switch, case, default, break, continue

  9. Namespaces ECMAscript and C# both have them namespace Name { } using Name; Uses :: as the scope operator for namespaces and classes.

  10. OOP Normal class structure public, private, protected, static, abstract modifiers modifier class Name : InheritedClass … { }

  11. Methods Methods with support for pass by value, reference, and name allowing automatic macro generation even at run-time. Optional and Named parameters void Foo(intfoo, name); Where data types without types are pass by name with explicit conversion from strings for run-time purposes Tuple and “NamedTuple” return types allowing things like: return x, y; or return x:0, y:0;

  12. Iterators foreach mixed with the yield language feature like in C# and Python (yield can be abused, but it’s very useful).

  13. Exception Handling try, catch, finally, throw features

  14. Threading Designed in mind for user level and kernel level threads. Thread keyword with operations in it’s class namespace like Thread.Wait(10); to wait the current thread.

  15. Function Pointers Delegate system taken from C#.

  16. Macro Preprocessor Language feature like #{ } Allows for compile-time and run-time compilation of code.

  17. Remote Procedure Call Complicated. Allows Server and Client communications seamlessly between scripts.

  18. Testing Manual testing using sample programs.

  19. Conclusion While just being the grammar for the language, the main goal later would be to implement it for actual applications. Currently most of the language features are decided upon and the style for certain parts of the grammar are designed.

More Related