> It appears to be a simple change, but strangely, I'm not being able to > perform it. I already made correct modifications in Grammar/Grammar > file, the new keywords already appear in Lib/keyword.py and I also > changed the function validate_comp_op in Modules/parsermodule.c: > > static int > validate_comp_op(node *tree) > { > (...) > else if ((res = validate_numnodes(tree, 2, "comp_op")) != 0) { > res = (validate_ntype(CHILD(tree, 0), NAME) > && validate_ntype(CHILD(tree, 1), NAME) > && (((strcmp(STR(CHILD(tree, 0)), "não") == 0) > && (strcmp(STR(CHILD(tree, 1)), "é") == 0)) > || ((strcmp(STR(CHILD(tree, 0)), "não") == 0) > && (strcmp(STR(CHILD(tree, 1)), "em") == 0)))); > if (!res && !PyErr_Occurred()) > err_string("operador de comparação desconhecido"); > } > return (res); > } > Notice that Python source is represented in UTF-8 in the parser. It might be that the C source code has a different encoding, which would cause the strcmp to fail. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4