Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | wip |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | wip |
Files: | files | file ages | folders |
SHA3-256: |
e2187f03633cd956e26afb78a4e1765f |
User & Date: | rolf 2019-03-11 00:47:10.067 |
Context
2019-03-13
| ||
01:47 | Fix overeager cleanup of virtual constraints. check-in: abd9fe81b1 user: rolf tags: wip | |
2019-03-11
| ||
00:47 | wip check-in: e2187f0363 user: rolf tags: wip | |
2019-03-09
| ||
15:09 | wip check-in: bfa5b4bab7 user: rolf tags: wip | |
Changes
Changes to generic/schema.c.
︙ | ︙ | |||
697 698 699 700 701 702 703 704 | sdata->stack->down = sdata->stackPool; sdata->stackPool = sdata->stack; sdata->stack = se; } static int recover ( SchemaData *sdata, | > | > | > | 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 | sdata->stack->down = sdata->stackPool; sdata->stackPool = sdata->stack; sdata->stack = se; } static int recover ( Tcl_Interp *interp, SchemaData *sdata, const char *errType, int len ) { Tcl_Obj *cmdPtr; int rc; if (!sdata->reportCmd) return 0; cmdPtr = Tcl_DuplicateObj (sdata->reportCmd); Tcl_ListObjAppendElement (interp, cmdPtr, sdata->self); Tcl_ListObjAppendElement ( interp, cmdPtr, Tcl_NewStringObj (errType, len) ); |
︙ | ︙ | |||
885 886 887 888 889 890 891 | if (!mayskip && mayMiss (candidate->quants[i])) mayskip = 1; } break; case SCHEMA_CTYPE_VIRTUAL: if (evalVirtual (interp, sdata, candidate)) { | < | 888 889 890 891 892 893 894 895 896 897 898 899 900 901 | if (!mayskip && mayMiss (candidate->quants[i])) mayskip = 1; } break; case SCHEMA_CTYPE_VIRTUAL: if (evalVirtual (interp, sdata, candidate)) { break; } else return 0; case SCHEMA_CTYPE_INTERLEAVE: case SCHEMA_CTYPE_PATTERN: pushToStack (sdata, candidate); |
︙ | ︙ | |||
909 910 911 912 913 914 915 | if (!mayskip && mustMatch (cp->quants[ac], hm)) { return 0; } ac++; hm = 0; } if (isName) { | | | 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 | if (!mayskip && mustMatch (cp->quants[ac], hm)) { return 0; } ac++; hm = 0; } if (isName) { if (recover (interp, sdata, "MISSING_ELEMENT", 15)) { /* Skip the just opened element tag and the following * content of it. */ sdata->skipDeep = 2; return 1; } return 0; } |
︙ | ︙ | |||
1335 1336 1337 1338 1339 1340 1341 | } static int checkElementEnd ( Tcl_Interp *interp, SchemaData *sdata ) { | | | 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 | } static int checkElementEnd ( Tcl_Interp *interp, SchemaData *sdata ) { SchemaValidationStack *se; SchemaCP *cp, *ic; int hm, ac, i, mayMiss, rc; int isName = 0; DBG(fprintf (stderr, "checkElementEnd:\n"); serializeStack(sdata);); se = sdata->stack; |
︙ | ︙ | |||
1404 1405 1406 1407 1408 1409 1410 | if (checkElementEnd (interp, sdata)) { mayMiss = 1; } popStack (sdata); break; case SCHEMA_CTYPE_VIRTUAL: | < < < < < < < < | 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 | if (checkElementEnd (interp, sdata)) { mayMiss = 1; } popStack (sdata); break; case SCHEMA_CTYPE_VIRTUAL: if (evalVirtual (interp, sdata, ic)) break; else return 0; } if (mayMiss) break; } if (mayMiss) break; return 0; case SCHEMA_CTYPE_VIRTUAL: if (evalVirtual (interp, sdata, cp->content[ac])) break; else return 0; case SCHEMA_CTYPE_INTERLEAVE: case SCHEMA_CTYPE_PATTERN: pushToStack (sdata, cp->content[ac]); rc = checkElementEnd (interp, sdata); |
︙ | ︙ | |||
1526 1527 1528 1529 1530 1531 1532 | matchText ( Tcl_Interp *interp, SchemaData *sdata, char *text ) { SchemaCP *cp, *candidate, *ic; | | | 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 | matchText ( Tcl_Interp *interp, SchemaData *sdata, char *text ) { SchemaCP *cp, *candidate, *ic; SchemaValidationStack *se; int ac, hm, isName = 0, i; DBG(fprintf (stderr, "matchText called with text '%s'\n", text)); while (1) { se = sdata->stack; getContext (cp, ac, hm); |
︙ | ︙ | |||
1580 1581 1582 1583 1584 1585 1586 | updateStack (se, cp, ac); return 1; } popStack (sdata); break; case SCHEMA_CTYPE_VIRTUAL: | < < < < | 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 | updateStack (se, cp, ac); return 1; } popStack (sdata); break; case SCHEMA_CTYPE_VIRTUAL: if (!evalVirtual (interp, sdata, ic)) return 0; break; case SCHEMA_CTYPE_CHOICE: Tcl_Panic ("MIXED or CHOICE child of MIXED or CHOICE"); } |
︙ | ︙ | |||
1613 1614 1615 1616 1617 1618 1619 | if (mustMatch (cp->quants[ac], hm)) { SetResult ("Unexpected text content"); return 0; } break; case SCHEMA_CTYPE_VIRTUAL: | < < < < | 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 | if (mustMatch (cp->quants[ac], hm)) { SetResult ("Unexpected text content"); return 0; } break; case SCHEMA_CTYPE_VIRTUAL: if (!evalVirtual (interp, sdata, ic)) return 0; break; case SCHEMA_CTYPE_NAME: case SCHEMA_CTYPE_ANY: if (mustMatch (cp->quants[ac], hm)) { SetResult ("Unexpected text content"); |
︙ | ︙ |