Download presentation
Presentation is loading. Please wait.
1
CS 4800 By Brandon Andrews
2
Specifications Goals Applications Design Steps Testing
3
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
To create a complete grammar for a language. Try to make it unambiguous if possible.
5
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
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
Strongly type bool, char, string, uint, int, uint, int, float, double, enum Tuple and NamedTuple Simple data types Constant modifiers (apply to immediate right) Reference types int foo = 5; // can change int & foo = bar; // can change const int foo = 5; // value can't change int8 const& foo = bar; // reference can't // change const int const& foo = bar; // reference and value // can't change
8
if, else, while, for, do, switch, case, default, break, continue
9
ECMAscript and C# both have them namespace Name { } using Name; Uses :: as the scope operator for namespaces and classes.
10
Normal class structure public, private, protected, static, abstract modifiers modifier class Name : InheritedClass … { }
11
Methods with support for pass by value, reference, and name allowing automatic macro generation even at run-time. Optional and Named parameters void Foo(int foo, 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
foreach mixed with the yield language feature like in C# and Python (yield can be abused, but it’s very useful).
13
try, catch, finally, throw features
14
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
Delegate system taken from C#.
16
Language feature like #{ } Allows for compile-time and run-time compilation of code.
17
Complicated. Allows Server and Client communications seamlessly between scripts.
18
Manual testing using sample programs.
19
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.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.