Closed ian-james closed 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.
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.
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!
1) Programming Tools 2) Writing Tools
Due to granularity, this needs to be addressed.