Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

These need tree pattern matching to find subtrees with the right syntax. They need to check what's on the left-hand side of rewrites, so I also need to track a list of references within each alternative.

Errors we should trap together

Basics:

DONE 2/3/2010

A tree pattern matcher should work for all. record options on way down. We need a way to count elements too for things like repeated options spec.

  • FILE_AND_GRAMMAR_NAME_DIFFER
  • LEXER_RULES_NOT_ALLOWED
  • PARSER_RULES_NOT_ALLOWED
  • CANNOT_ALIAS_TOKENS_IN_LEXER
  • ARGS_ON_TOKEN_REF
  • ILLEGAL_OPTION
  • REWRITE_OR_OP_WITH_NO_OUTPUT_OPTION
  • NO_RULES
  • REWRITE_FOR_MULTI_ELEMENT_ALT
  • HETERO_ILLEGAL_IN_REWRITE_ALT
  • AST_OP_WITH_NON_AST_OUTPUT_OPTION
  • AST_OP_IN_ALT_WITH_REWRITE
  • CONFLICTING_OPTION_IN_TREE_FILTER
  • WILDCARD_AS_ROOT
  • INVALID_IMPORT
  • TOKEN_VOCAB_IN_DELEGATE
  • IMPORT_NAME_CLASH
  • new errors:
    • REPEATED_PREQUEL; repeated options or tokens spec (since we allow in any order now)
    • TOKEN_NAMES_MUST_START_UPPER

Symbols:

purely symbol related

I think I can do all of these simply by collecting a list of symbols of the various types then doing some checks.

DONE 2/8/2010

  • REWRITE_ELEMENT_NOT_PRESENT_ON_LHS (merged to include v3 UNDEFINED_LABEL_REF_IN_REWRITE, UNDEFINED_TOKEN_REF_IN_REWRITE)

...