"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/core/codegenerator.cpp" between
highlight-4.0.beta5.tar.bz2 and highlight-4.0.beta6.tar.bz2

About: highlight converts source code to formatted text with syntax highlighting (for e.g. to HTML, XHTML, RTF, TeX, LaTeX, SVG, BBCode and XML format). Beta version.

codegenerator.cpp  (highlight-4.0.beta5.tar.bz2):codegenerator.cpp  (highlight-4.0.beta6.tar.bz2)
skipping to change at line 2090 skipping to change at line 2090
return STY_NAME_IPL; return STY_NAME_IPL;
case SYNTAX_ERROR: case SYNTAX_ERROR:
return STY_NAME_ERR; return STY_NAME_ERR;
case _WS: case _WS:
return "ws"; return "ws";
case KEYWORD: { case KEYWORD: {
if (!kwClass) if (!kwClass)
return "ws"; return "ws";
char kwName[5] = {0}; char kwName[20] = {0};
snprintf(kwName, sizeof(kwName), "kw%c", ('a'+kwClass-1)); snprintf(kwName, sizeof(kwName), "keyword %c", ('a'+kwClass-1));
return string(kwName); return string(kwName);
} }
default: default:
return "unknown_test"; return "unknown_test";
} }
} }
void CodeGenerator::printTrace(const string &s){ void CodeGenerator::printTrace(const string &s){
std::cout<<"\n curr "<<lineNumber<<" "<<s<<": "; std::cout<<"\n curr "<<lineNumber<<" "<<s<<": ";
for (unsigned int i=0; i< stateTraceCurrent.size(); i++) { for (unsigned int i=0; i< stateTraceCurrent.size(); i++) {
skipping to change at line 2160 skipping to change at line 2161
assertState=SL_COMMENT; assertState=SL_COMMENT;
else if (line.find(STY_NAME_COM, typeDescPos)==typeDescPos) else if (line.find(STY_NAME_COM, typeDescPos)==typeDescPos)
assertState=ML_COMMENT; assertState=ML_COMMENT;
else if (line.find("ws", typeDescPos)==typeDescPos) else if (line.find("ws", typeDescPos)==typeDescPos)
assertState=_WS; assertState=_WS;
else if (line.find(STY_NAME_STD, typeDescPos)==typeDescPos) else if (line.find(STY_NAME_STD, typeDescPos)==typeDescPos)
assertState=STANDARD; assertState=STANDARD;
else if (line.find(STY_NAME_DST, typeDescPos)==typeDescPos) else if (line.find(STY_NAME_DST, typeDescPos)==typeDescPos)
assertState=DIRECTIVE_STRING; assertState=DIRECTIVE_STRING;
else if (line.find("kw", typeDescPos)==typeDescPos) { else if (line.find("kw", typeDescPos)==typeDescPos || line.find("st", ty peDescPos)==typeDescPos) {
assertState=KEYWORD; assertState=KEYWORD;
if (isalpha(line[typeDescPos+2])) if (isalpha(line[typeDescPos+2]))
assertGroup=line[typeDescPos+2] - 'a' +1; assertGroup=line[typeDescPos+2] - 'a' +1;
} }
if ( (assertState!=_WS && stateTraceTest[column].state != assertState & & !stateTraceTest[column].isWhiteSpace ) if ( (assertState!=_WS && stateTraceTest[column].state != assertState & & !stateTraceTest[column].isWhiteSpace )
|| (assertState==_WS && !stateTraceTest[column].isWhiteSpace) || (assertState==_WS && !stateTraceTest[column].isWhiteSpace)
|| assertGroup != stateTraceTest[column].kwClass) { || assertGroup != stateTraceTest[column].kwClass) {
testFailed=!negation; testFailed=!negation;
 End of changes. 2 change blocks. 
3 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)