Abstract:
A device may receive input text via a programming environment associated with a programming language. The device may tokenize the input text to generate tokenized text. The device may identify an invalid token string, based on the tokenized text, that is invalid for the programming language. The device may identify a token category pattern based on the invalid token string. The token category pattern may be a first sequence of token categories. The device may identify a replacement pattern based on the token category pattern. The replacement pattern may be a second sequence of token categories that is different from the first sequence of token categories. The device may identify a replacement token string based on the replacement pattern. The device may determine valid program code, associated with the programming language, based on the replacement token string. The device may provide the valid program code.