Giter VIP home page Giter VIP logo

c-net's Issues

Add regression tests for scanner

For each test, there should be two files: the source code (.cnet) file,
and the expected output.

  1. If the source is expected to fail, it should be named
    "fail-[my-test-1].cnet" and the expected error output
    should be in a file called "fail-[my-test-1].err"
  2. If the test is expected to pass, The name of the test
    file should be "test-[my-test-1].cnet" and the filename of the expected
    output should be "test-[my-test-1].out"

Finish up LRM

  • Include Grammar
  • Add operator precedence table
  • Check out the LRMs from previous "starred" project submissions and see what ours is missing.

Define character usage in expressions

(1) Do we want to convert char literals to integers?
E.g., This works
int main() {
int x = 'a' + 4;
}
E.g., But this fails
int main() {
char a = 'a';
int x = a + 4;
}

Implement global variable scope access

Currently globals can be declared but can't be accessed in the global or other scopes.

E.g., The below gives the error: Semantic error: undeclared identifier global
int global = 0;
int main()
{
global = 5;
return 0;
}

Add Vdecl_assign to be one case of program

Currently program is a list of declarations. But Vdecl_assign is not included as a declaration. What if we want variable declaration and assignment in one line outside of functions (basically static variable assignment). Do we provide those?

type decl =
    Vdecl of vdecl
  | Sdecl of strct
  | Fdecl of func

type program =
  Program of decl list

Add += functionality for strings

E.g.,
int main () {
string a = "a";
a += "a";
return 0;
}
Output should reflect concatenation of a ("a") and "a" but currently is: (string : a+=(string : "a"));

String not yet autmatically collected

String type is not yet automatically collected. Also, as a note to whoever works on this issue, strings should be freed up after return/break statements as well, since they might go out of scope there.

Delete statement only works on ids

If there is a variable of type int[][], delete should work for a member of that array as well. For example,

int[][] x = new int[][5];
x[0] = new int[3];
delete x[0];

should be valid.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.