rx 362 src/char.c struct ScmCharSetRange *rx, *ry; rx 365 src/char.c for (rx=x->ranges, ry=y->ranges; rx && ry; rx=rx->next, ry=ry->next) { rx 366 src/char.c if (rx->lo != ry->lo || rx->hi != ry->hi) return FALSE; rx 368 src/char.c if (rx || ry) return FALSE; rx 376 src/char.c struct ScmCharSetRange *rx, *ry; rx 379 src/char.c rx = x->ranges; rx 381 src/char.c while (rx && ry) { rx 382 src/char.c if (rx->lo < ry->lo) return FALSE; rx 383 src/char.c if (rx->lo > ry->hi) { ry = ry->next; continue; } rx 384 src/char.c if (rx->hi > ry->hi) return FALSE; rx 385 src/char.c rx = rx->next; rx 387 src/char.c if (rx) return FALSE; rx 2495 src/extlib.c ScmRegexp *rx = NULL; rx 2496 src/extlib.c if (SCM_STRINGP(regexp)) rx = SCM_REGEXP(Scm_RegComp(SCM_STRING(regexp), 0)); rx 2497 src/extlib.c else if (SCM_REGEXPP(regexp)) rx = SCM_REGEXP(regexp); rx 2499 src/extlib.c SCM_RETURN(Scm_RegExec(rx, str)); rx 2678 src/extlib.c ScmRegexp* rx; rx 2682 src/extlib.c rx = SCM_REGEXP(rx_scm); rx 2684 src/extlib.c Scm_RegDump(rx); rx 2521 src/gauche.h SCM_EXTERN ScmObj Scm_RegExec(ScmRegexp *rx, ScmString *input); rx 2522 src/gauche.h SCM_EXTERN void Scm_RegDump(ScmRegexp *rx); rx 1316 src/number.c double rx, ry; rx 1333 src/number.c rx = (double)SCM_INT_VALUE(x); rx 1350 src/number.c rx = Scm_BignumToDouble(SCM_BIGNUM(x)); rx 1357 src/number.c rx = SCM_FLONUM_VALUE(x); rx 1358 src/number.c if (rx != floor(rx)) goto BADARG; rx 1373 src/number.c q = roundeven(rx/ry); rx 1375 src/number.c double rr = roundeven(rx - q*ry); rx 1397 src/number.c double rx, ry; rx 1423 src/number.c rx = (double)SCM_INT_VALUE(x); rx 1456 src/number.c rx = Scm_BignumToDouble(SCM_BIGNUM(x)); rx 1465 src/number.c rx = SCM_FLONUM_VALUE(x); rx 1466 src/number.c if (rx != floor(rx)) goto BADARG; rx 1479 src/number.c rem = fmod(rx, ry); rx 1481 src/number.c if ((rx > 0 && ry < 0) || (rx < 0 && ry > 0)) { rx 190 src/regexp.c ScmRegexp *rx = SCM_NEW(ScmRegexp); rx 191 src/regexp.c SCM_SET_CLASS(rx, SCM_CLASS_REGEXP); rx 192 src/regexp.c rx->code = NULL; rx 193 src/regexp.c rx->numCodes = 0; rx 194 src/regexp.c rx->numGroups = 0; rx 195 src/regexp.c rx->numSets = 0; rx 196 src/regexp.c rx->sets = NULL; rx 197 src/regexp.c rx->mustMatch = NULL; rx 198 src/regexp.c rx->flags = 0; rx 199 src/regexp.c rx->pattern = NULL; rx 200 src/regexp.c return rx; rx 203 src/regexp.c static void regexp_print(ScmObj rx, ScmPort *out, ScmWriteContext *ctx) rx 205 src/regexp.c if (SCM_REGEXP(rx)->pattern) { rx 206 src/regexp.c Scm_Printf(out, "#/%A/", SCM_REGEXP(rx)->pattern); rx 209 src/regexp.c Scm_Printf(out, "#<regexp %p>", rx); rx 245 src/regexp.c ScmRegexp *rx; /* the building regexp */ rx 257 src/regexp.c static void rc_ctx_init(regcomp_ctx *ctx, ScmRegexp *rx) rx 259 src/regexp.c ctx->rx = rx; rx 260 src/regexp.c ctx->pattern = rx->pattern; rx 262 src/regexp.c if (rx->pattern) { rx 263 src/regexp.c ctx->ipat = SCM_PORT(Scm_MakeInputStringPort(rx->pattern, FALSE)); rx 739 src/regexp.c ctx->rx->numGroups = ctx->grpcount+1; rx 773 src/regexp.c static void rc_setup_charsets(ScmRegexp *rx, regcomp_ctx *ctx) rx 777 src/regexp.c rx->numSets = Scm_Length(ctx->sets); rx 778 src/regexp.c rx->sets = SCM_NEW_ARRAY(ScmCharSet*, rx->numSets); rx 780 src/regexp.c rx->sets[i++] = SCM_CHARSET(SCM_CAR(cp)); rx 924 src/regexp.c static int rc3_charset_index(ScmRegexp *rx, ScmObj cs) rx 927 src/regexp.c for (i=0; i<rx->numSets; i++) rx 928 src/regexp.c if (cs == SCM_OBJ(rx->sets[i])) return i; rx 947 src/regexp.c SCM_OBJ(ctx->rx)); rx 963 src/regexp.c SCM_OBJ(ctx->rx)); rx 1021 src/regexp.c ScmRegexp *rx = ctx->rx; rx 1048 src/regexp.c rc3_emit(ctx, rc3_charset_index(rx, ast)); rx 1093 src/regexp.c rc3_emit(ctx, rc3_charset_index(rx, cs)); rx 1122 src/regexp.c rc3_emit(ctx, rc3_charset_index(rx, elem)); rx 1129 src/regexp.c rc3_emit(ctx, rc3_charset_index(rx, elem)); rx 1344 src/regexp.c if (is_bol_anchored(ast)) ctx->rx->flags |= SCM_REGEXP_BOL_ANCHORED; rx 1356 src/regexp.c ctx->rx->code = ctx->code; rx 1357 src/regexp.c ctx->rx->numCodes = ctx->codep; rx 1358 src/regexp.c return SCM_OBJ(ctx->rx); rx 1363 src/regexp.c void Scm_RegDump(ScmRegexp *rx) rx 1365 src/regexp.c int end = rx->numCodes, codep; rx 1367 src/regexp.c Scm_Printf(SCM_CUROUT, "Regexp %p: (flags=%08x)\n", rx, rx->flags); rx 1369 src/regexp.c if (rx->mustMatch) { rx 1370 src/regexp.c Scm_Printf(SCM_CUROUT, "%S\n", rx->mustMatch); rx 1376 src/regexp.c switch (rx->code[codep]) { rx 1382 src/regexp.c (rx->code[codep-1]==RE_MATCH1? "MATCH1":"MATCH1_CI"), rx 1383 src/regexp.c rx->code[codep], rx->code[codep]); rx 1389 src/regexp.c u_int numchars = (u_int)rx->code[codep]; rx 1393 src/regexp.c (rx->code[codep-1]==RE_MATCH? "MATCH":"MATCH_CI"), rx 1396 src/regexp.c Scm_Printf(SCM_CUROUT, "%c", rx->code[++codep]); rx 1406 src/regexp.c (rx->code[codep])*256 + rx->code[codep+1]); rx 1412 src/regexp.c codep-1, rx->code[codep], rx 1413 src/regexp.c rx->sets[rx->code[codep]]); rx 1418 src/regexp.c codep-1, rx->code[codep], rx 1419 src/regexp.c rx->sets[rx->code[codep]]); rx 1424 src/regexp.c codep-1, rx->code[codep], rx 1425 src/regexp.c rx->sets[rx->code[codep]]); rx 1430 src/regexp.c codep-1, rx->code[codep], rx 1431 src/regexp.c rx->sets[rx->code[codep]]); rx 1436 src/regexp.c (rx->code[codep])*256 + rx->code[codep+1]); rx 1447 src/regexp.c Scm_Printf(SCM_CUROUT, "%4d BEGIN %d\n", codep-1, rx->code[codep]); rx 1451 src/regexp.c Scm_Printf(SCM_CUROUT, "%4d END %d\n", codep-1, rx->code[codep]); rx 1467 src/regexp.c codep, rx->code[codep+1], rx->code[codep+1], rx 1468 src/regexp.c rx->code[codep+2]*256+rx->code[codep+3]); rx 1474 src/regexp.c codep-1, rx->code[codep], rx 1475 src/regexp.c rx->sets[rx->code[codep]]); rx 1480 src/regexp.c codep-1, rx->code[codep], rx 1481 src/regexp.c rx->sets[rx->code[codep]]); rx 1486 src/regexp.c codep-1, rx->code[codep], rx 1487 src/regexp.c rx->sets[rx->code[codep]]); rx 1492 src/regexp.c codep-1, rx->code[codep], rx 1493 src/regexp.c rx->sets[rx->code[codep]]); rx 1498 src/regexp.c (rx->code[codep])*256 + rx->code[codep+1]); rx 1504 src/regexp.c (rx->code[codep])*256 + rx->code[codep+1]); rx 1598 src/regexp.c ScmRegexp *rx = make_regexp(); rx 1605 src/regexp.c rx->pattern = SCM_STRING(Scm_CopyStringWithFlags(pattern, rx 1608 src/regexp.c rc_ctx_init(&cctx, rx); rx 1610 src/regexp.c rx->flags |= (flags & SCM_REGEXP_CASE_FOLD); rx 1614 src/regexp.c rc_setup_charsets(rx, &cctx); rx 1627 src/regexp.c ScmRegexp *rx = make_regexp(); rx 1629 src/regexp.c rc_ctx_init(&cctx, rx); rx 1637 src/regexp.c rc_setup_charsets(rx, &cctx); rx 1638 src/regexp.c rx->numGroups = cctx.grpcount+1; rx 1667 src/regexp.c ScmRegexp *rx; rx 1750 src/regexp.c Scm_Error("stack overrun during matching regexp %S", ctx->rx); rx 1793 src/regexp.c if (!Scm_CharSetContains(ctx->rx->sets[*code++], *input)) return; rx 1799 src/regexp.c if (Scm_CharSetContains(ctx->rx->sets[*code++], *input)) rx 1810 src/regexp.c cset = ctx->rx->sets[*code++]; rx 1817 src/regexp.c cset = ctx->rx->sets[*code++]; rx 1847 src/regexp.c cset = ctx->rx->sets[*code++]; rx 1856 src/regexp.c cset = ctx->rx->sets[*code++]; rx 1868 src/regexp.c cset = ctx->rx->sets[*code++]; rx 1877 src/regexp.c cset = ctx->rx->sets[*code++]; rx 1917 src/regexp.c static ScmObj make_match(ScmRegexp *rx, ScmString *orig, rx 1925 src/regexp.c rm->numMatches = rx->numGroups; rx 1926 src/regexp.c rm->matches = SCM_NEW_ARRAY(struct ScmRegMatchSub, rx->numGroups); rx 1934 src/regexp.c for (i=0; i<rx->numGroups; i++) { rx 1952 src/regexp.c for (i=0; i<rx->numGroups; i++) { rx 1961 src/regexp.c static ScmObj rex(ScmRegexp *rx, ScmString *orig, rx 1966 src/regexp.c ctx.rx = rx; rx 1967 src/regexp.c ctx.codehead = rx->code; rx 1978 src/regexp.c return make_match(rx, orig, &ctx); rx 1985 src/regexp.c ScmObj Scm_RegExec(ScmRegexp *rx, ScmString *str) rx 1990 src/regexp.c const ScmStringBody *mb = rx->mustMatch? SCM_STRING_BODY(rx->mustMatch) : NULL; rx 2001 src/regexp.c if (rx->mustMatch) { rx 2004 src/regexp.c if (SCM_FALSEP(Scm_StringScan(str, rx->mustMatch, rx 2012 src/regexp.c if (rx->flags & SCM_REGEXP_BOL_ANCHORED) { rx 2013 src/regexp.c return rex(rx, str, start, end); rx 2017 src/regexp.c ScmObj r = rex(rx, str, start, end);