java project
input: large text
output: same text with conditions - correct accidental assignements in code
- centred only on the following relational operators:
===!= - in an expression, the order of parameters is:
constant then object - no modifications for
constant then constantstatements - a
constantis a rvalue, anything like:- const primitive/non-primitive
- pointer to functions
- preprocessed variables
- typeid
- statements to consider:
ifwhileforcondition operator - ?
- assume there are no syntax/semantic errors
- store constant names
- read the text in chunks
- modify each chunk individually, if needed
- determine accidental assignments and ask the user for improvement
- print on standard output the result
- no: discard any adjustment if the output of the code is different
- no: other operators => redability, purposeless
- no: run an entire project
- i assumed that every operator problem can appear only in if while for ? statements. it was wrong
- inspiration:
https://firestar300.github.io/yoda-condition-converter/ https://knowthecode.io/yoda-conditions-yoda-not-yoda