Spanish Inverted Punctuation Placement Rule

Audit actual properly nested Spanish inverted/closing question and exclamation marks with source code-point indices; matching is structural only, not a claim about where a grammatical interrogative begins or missing punctuation in unmarked prose.

Description

Spanish inverted punctuation can be checked for structural pairing.

Spanish inverted punctuation can be checked for structural pairing. Balanced marks do not identify the grammatical scope of a question or exclamation.1

Enter plain text. Scan Unicode code points with a stack for ¿/? and ¡/!; return matched count and remaining opening/mismatched closing indices, plus balance flag.

When to use Spanish Inverted Punctuation Placement Rule

Use Spanish Inverted Punctuation Placement Rule when you need to evaluate the supplied records under the calculation and evidence rules below. Indices count code points, not UTF-16 units. Unmarked prose can be structurally balanced; grammar and missing punctuation are not inferred.

Prepare explicit text tokens, annotated language observations, caller mappings or a supported locale as requested. Preserve source evidence and the stated Unicode counting convention.

How to use Spanish Inverted Punctuation Placement Rule and understand its results

  1. Prepare explicit text tokens, annotated language observations, caller mappings or a supported locale as requested. Preserve source evidence and the stated Unicode counting convention.
  2. Enter plainSpanishText using the field table and calculation rules, then run the tool.
  3. Read matchedInvertedPunctuationPairCount, unmatchedOpeningCodePointIndices, unmatchedClosingCodePointIndices, observedInvertedPairsBalanced. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
Input fieldMeaningValue type; see rules belowRequirement
plainSpanishTextPlain spanish textstringRequired

Enter plain text. Scan Unicode code points with a stack for ¿/? and ¡/!; return matched count and remaining opening/mismatched closing indices, plus balance flag.

close matches only the most recent compatible opening mark

Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.

Output fieldMeaningValue type
matchedInvertedPunctuationPairCountMatched inverted punctuation pair countnumber
unmatchedOpeningCodePointIndicesUnmatched opening code point indiceslist of number
unmatchedClosingCodePointIndicesUnmatched closing code point indiceslist of number
observedInvertedPairsBalancedObserved inverted pairs balancedboolean
json
{
  "input": {
    "plainSpanishText": "¿Qué? ¡Sí!"
  },
  "output": {
    "matchedInvertedPunctuationPairCount": 2,
    "unmatchedOpeningCodePointIndices": [],
    "unmatchedClosingCodePointIndices": [],
    "observedInvertedPairsBalanced": true
  }
}

Limitations and assumptions

Indices count code points, not UTF-16 units. Unmarked prose can be structurally balanced; grammar and missing punctuation are not inferred.

Numeric inputs, where present, must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Extremely large text inputs are rejected. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors. A successfully returned false flag is an evaluated outcome; its meaning is explained above.

Alternative or Complementary methods

Use Greek Question Mark Semicolon Quirk: Greek question-mark code point U+037E is canonically equivalent to a semicolon. Interpreting semicolons as questions requires the caller’s Greek context. For a complementary task, use French Space-Before-Punctuation Rule: French punctuation spacing follows a declared style and region. Nonbreaking and narrow nonbreaking spaces have different layout behavior.

References

  1. Spanish Inverted Punctuation Placement Rule — tool.io

Similar or alternative tools

  • Greek Question Mark Semicolon Quirk

    Greek question-mark code point U+037E is canonically equivalent to a semicolon. Interpreting semicolons as questions requires the caller’s Greek context.

  • French Space-Before-Punctuation Rule

    French punctuation spacing follows a declared style and region. Nonbreaking and narrow nonbreaking spaces have different layout behavior.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies