Giter VIP home page Giter VIP logo

not-c's Introduction

Well hello there ๐Ÿ‘‹

I'm Ollie Grooby, or, Grooben, and I am the Senior Computing Technician in the School of Computer Science at the University of Lincoln - we like to call ourselves SoCSTech! We work on various bespoke Microservices, HPC Management and Orchestration, Scripting and Containerisation

  • ๐Ÿ”ญ Working on Dockerising and Modernising Services whilst keeping the School ticking...
  • ๐Ÿ“ซ Grab me on Discord @Grooben
  • ๐ŸŒฑ Improving my own coding ability whilst leading projects at the University

not-c's People

Contributors

craig-clephane avatar grooben avatar macascull avatar petermaltby avatar tomezpl avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

macascull

not-c's Issues

Syntax analysis

Lexemes/tokens into parse tree into Abstract parse tree.
Peter needs to do this

Implement ICO Optimiser

Complete the implementation of the intermediate code optimiser, which optimises input code before it is compiled into Intermediate code and thus into ASM.

Whitespace being submitted to token stream.

Blank lines are being added to token stream and singular blank EOL tokens.
Parse tree gen cannot filter out as EOL tokens are important markers.
suggested: do not gen EOL for blank lines.

Register names report as errors

When performing arithmetic operations, the compiler invokes an internal function that saves data from the appropriate arithmetic CPU register into memory (_!c_memory_savereg(registerName)) essentially allowing to store results of those operations and assign them to variables. The intermediate code generator passes the name of the register for that specific arithmetic operation as a parameter to this function, which the assembly generator picks up as invalid because register names such as 'eax', 'ebx', 'edx' are not declared in static data, therefore resulting in false error messages about invalid symbol names. This can, however, be ignored and the program will still compile successfully.

End of line.

End of line token needs to be at the end of the source file for some reason

Comments Function

Does not work, needs additional research

(Trying to add the a way to have comments within the source file)

Semantics doesn't evaluate arithmetic assignments

Given a snippet of code:

Int a = 2;
Int b = 2;
Int c = a + b;

Line 3 will cause a crash (ValueError) during semantics evaluation. We could skip this but it would be useful to have semantics running so that we have type checking working.

My suggestion to this is check for math operators (+, /, -, %, *) in the assigned value, break down the string into a list of all identifiers or values present on the right side of the assignment, and then make sure they're all the same type (currently you could just check if they're all Integers and fail as soon as you find a non-Int).

Attached screenshots of Python error message and code line causing the issue.

image
image

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.