Skip to content

Section header: single token PROCEDURE: does not match PROCEDURE pattern #236

@cavazquez

Description

@cavazquez

Problem

The compiler recognizes the procedure section via line_like("PROCEDURE", tokens, state) (see src/aux/aux_compile_line.cpp), i.e. the model line is the word PROCEDURE with no trailing colon.

For DATA, the pattern is line_like("DATA:", ...)with a colon.

After tokenization (split on spaces, identifiers uppercased outside strings), a source line written as:

procedure:

often becomes one token PROCEDURE:, which does not equal PROCEDURE. The section is then not detected and compilation fails (e.g. Malformed statement on the next line).

A line with only:

procedure

produces token PROCEDURE and matches.

Suggestion

  • Align behavior with DATA: by also accepting PROCEDURE: (e.g. strip trailing : from the section token, or add an alternate line_like pattern), or
  • Document explicitly that the colon must not be attached (and show procedure alone in examples).

Reference

src/aux/aux_compile_line.cpp — section detection block (DATA: vs PROCEDURE).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions