list-mode-rules
Lists all lexer rules in a specified ANTLR4 mode to inspect contents, debug issues, and understand mode structure.
Instructions
List all lexer rules in a specific mode.
When to use: Quick inspection of mode contents, debugging mode issues, understanding mode structure.
Returns:
List of rules with names, patterns, and line numbers
Total count of rules in the mode
Example - List rules in STRING_MODE: mode_name: "STRING_MODE"
Example - List rules in DEFAULT_MODE: mode_name: "DEFAULT_MODE"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from_file | No | Optional: path to a grammar file to read | |
| mode_name | Yes | Name of the mode to list rules from | |
| grammar_content | No | The ANTLR4 grammar file content |