ian-james / IFS

Immediate Feedback System for student programming assignments and essay writing
MIT License
5 stars 6 forks source link

Refactor-> Feedback parser into 2 parsers #149

Closed ian-james closed 6 years ago

ian-james commented 6 years ago

1) Programming Tools 2) Writing Tools

Due to granularity, this needs to be addressed.

ryoung2512 commented 6 years ago

At the moment, just cleaned up the file. The two disciplines have too many overlapping functions. Creating a super class with programming and writing as subclasses would be almost pointless.

ian-james commented 6 years ago

We already discuss this off-site so, I'm just documenting the goal here.

Currently, the parsing operation could be optimized because of the granularity required on each tool. Since the programming tool only currently provides errors on a per line basis all other tokenization isn't necessary. While the prose tools, require character-level tokenization.

Ultimately, the parser might benefit from readability and small performance if it's modified to allow granularity level selection. Or copied into two files programmingParser and languageParser for more straightforward parsing operation.

ryoung2512 commented 6 years ago

So the writing parser is pretty much 1:1 with the original fileParser. However, I was able to take out a lot of the tokenization in the programmingParser file. This means in theory the programming should be a fair bit quicker. Since we are no longer going through each character and splitting up each word. We are just doing a simple regular expression breaking up each line.

I am closing this for now as I had it tested by other people and it works fine!