Giter Club home page Giter Club logo

cool-compiler's People

Contributors

afterthat97 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cool-compiler's Issues

Cycle checking issue in check_inheritance function in PA4

您好,感谢您的代码分享!在check_inheritance函数中似乎有一个问题,判断是否成环不能仅判断一个节点是否最终会返回到自己。比如,D : A, A : B, B : C, C : A的情况,如果从D开始判断的话会死循环。

static void check_inheritance() {
for (ClassTable::iterator it = classTable.begin(); it != classTable.end(); it++)
if (it->first != Object && classTable.find(it->second->getParentName()) == classTable.end()) {
curr_class = it->second;
semant_error(curr_class) << "Class " << it->second->getName() << " inherits from an undefined class " << it->second->getParentName() << ".\n";
}
for (ClassTable::iterator it = classTable.begin(); it != classTable.end(); it++) {
if (it->first == Object) continue;
curr_class = it->second;
Symbol cname = it->first;
Symbol pname = it->second->getParentName();
while (pname != Object) {
if (pname == cname) {
semant_error(curr_class) << "Class " << curr_class->getName() << ", or an ancestor of " << curr_class->getName() << ", is involved in an inheritance cycle.\n";
break;
}
if (classTable.find(pname) == classTable.end())
break;
pname = classTable[pname]->getParentName();
}
}
}

关于i686

你好,请问你是怎么在ubuntu上面运行i686的代码的呀,我这边一直报错

In arm 64Ubuntu i am not able to run

I have made a VM in mac m1 but it is running arm64 ubuntu and on running any ./coolc 1.cl it is showing
./coolc: 33: exec: ./../bin/.i686/coolc: Exec format error

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.