Skip to content

Implement gawk array sorting and type-introspection builtins #454

@bertysentry

Description

@bertysentry

This is a focused follow-up to umbrella issue #80. The latest mvn verify run for GawkCompatibilityIT shows a concrete compatibility cluster around gawk's array sorting and type-introspection features.

Observed impact:

  • 13 failing Gawk compatibility cases in the latest run
  • Representative cases: �sort, �sorti, �asort, �asorti, �sortbool, �sortsymtab, sort1, �rraytype, mdim1, ypeof2, ypeof4, ypeof5, ypeof6
  • Current failure mode is typically SemanticException: function ... (asort|asorti|typeof)

The failing cases suggest that we need more than stub builtin registration. Jawk also needs the corresponding runtime behavior that gawk expects for:

  • �sort()
  • �sorti()
  • ypeof()
  • typed / untyped / array value distinctions that those functions expose

Acceptance criteria:

  • the representative cases above pass in GawkCompatibilityIT
  • �sort() and �sorti() work on plain arrays and nested arrays where gawk allows them
  • ypeof() returns gawk-compatible categories for the cases covered by the suite
  • sorting and introspection behavior is wired into the real runtime model, not only the parser

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions