Low-level parsing

  • syntax replaces parse for high-level parsing
  • tokenize replaces parse, parse() for low-level parsing

Program starts
program define mycmd6
    version 6.0
    syntax [varlist] [if]
    tokenize "`varlist'"
    ...
User types
mycmd6 mpg wei length
syntax fills in `varlist' with
mpg weight length
tokenize fills in positional macros
`1' `2' `3'
mpg weight length