CALLOUTS.BUILTIN 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. CALLOUTS.BUILTIN 2018/03/26
  2. * FAIL (progress)
  3. (*FAIL)
  4. Always fail.
  5. * MISMATCH (progress)
  6. (*MISMATCH)
  7. Terminates Match process.
  8. Continues Search process.
  9. * ERROR (progress)
  10. (*ERROR{n::LONG})
  11. Terminates Search/Match process.
  12. Return value is the argument 'n'. (The value must be less than -1)
  13. 'n' is an optional argument. (default value is ONIG_ABORT)
  14. * MAX (progress/retraction)
  15. (*MAX{n::LONG/TAG, c::CHAR})
  16. Restricts the maximum count of success(default), progress or retraction.
  17. If 'n' type is tag, slot 0 value of the tag are used.
  18. Depends on 'c' argument, the slot 0 value changes.
  19. 'c' is an optional argument, default value is 'X'.
  20. (* success count = progress count - retraction count)
  21. ex. "(?:(*COUNT[T]{X})a)*(?:(*MAX{T})c)*"
  22. [callout data]
  23. slot 0: '>': progress count, '<': retraction count, 'X': success count (default)
  24. * COUNT (progress/retraction)
  25. (*COUNT{c::CHAR})
  26. Counter.
  27. Depends on 'c' argument, the slot 0 value changes.
  28. 'c' is an optional argument, default value is '>'.
  29. [callout data]
  30. slot 0: '>': progress count (default), '<': retraction count, 'X': success count
  31. slot 1: progress count
  32. slot 2: retraction count
  33. ** If option ONIG_OPTION_FIND_LONGEST or ONIG_OPTION_FIND_NOT_EMPTY is used,
  34. counts are not accurate.
  35. * TOTAL_COUNT (progress/retraction)
  36. (*TOTAL_COUNT{c::CHAR})
  37. It's the almost same as COUNT.
  38. But the counts are integrated in a search process.
  39. 'c' is an optional argument, default value is '>'.
  40. [callout data]
  41. slot 0: '>': progress count (default), '<': retraction count, 'X': success count
  42. slot 1: progress count
  43. slot 2: retraction count
  44. ** If option ONIG_OPTION_FIND_LONGEST or ONIG_OPTION_FIND_NOT_EMPTY is used,
  45. counts are not accurate.
  46. * CMP (progress)
  47. (*CMP{x::TAG/LONG, op::STRING, y::TAG/LONG})
  48. Compares x value and y value with op operator.
  49. If x and y types are tag, slot 0 value of the tag are used.
  50. op: '==', '!=', '>', '<', '>=', '<='
  51. ex. "(?:(*MAX[TA]{7})a|(*MAX[TB]{5})b)*(*CMP{TA,>=,4})"
  52. [callout data]
  53. slot 0: op value (enum OP_CMP in src/regexec.c)
  54. //END