Git Product home page Git Product logo

hcompiler's People

Contributors

coodie avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

hcompiler's Issues

Change the way of compiling to asm x86

Currently project produces string which is basically asm code and which is fed to 'GNU as'. I don't like this. This would be better to use some kind of library which has bult-in assembler. This would give some chance for this project to be portable, and would greatly improve quality of code.

This seems to be useful:

https://hackage.haskell.org/package/harpy

Change source language

There are tons of C language compilers. It's not best educational language to write compiler to in my opinion. My proposal is to use different programming language to compile. It would be good if the language had subset of these:

  • Static memory management
  • Type inference (i doubt there is imperative language with type inference)
  • Pretty simple and concise semantics
  • Language is LR(1) - generally, easy to parse
  • Was somehow useful
  • Would make sense to compile to JVM (just 4fun, but i don't know if JVM is actually nice)

Add typechecker

There is no typechecker for the language, this is probably big missing feature.

Compile to LLVM

Asm x86 is nightmare for everyone. It would be better to compile to LLVM. Which obviously is 1000 times better choice.

Add lexer

At the moment parser, parser text directly. It would be better to tokenize before parsing and then run parser on tokenized text.

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.