Syntax checking/SRS: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| Line 3: | Line 3: | ||
= Parser = | = Parser = | ||
# Should only parse when neccessary, using | # Should only parse when neccessary: | ||
# Provide errors in adequate datastructure to visualisation components | ## When editing a new or correct expression: | ||
# | ### After typing a point, comma, colon, semi-colon, space, tab or line-break | ||
### After leaving the edited expression (using courser or mouse) | |||
## When editing a incorrect expression: | |||
### After each added character | |||
# Provide errors in adequate datastructure to visualisation components | |||
##linenumber | |||
##type of error | |||
##further information) | |||
# Whenever the visualisation of an expression should change, the parser should call an event handler provided by visualization components | |||
'''Note:''' | |||
* A new expression is correct until it becomes incorrect. | |||
* The state of an expression can only be changed when the cursor leaves it. | |||
= Visualization = | = Visualization = | ||
Revision as of 17:11, 2 May 2006
Goal
Provide adequate, but non intrusive feedback to user about syntax errors.
Parser
- Should only parse when neccessary:
- When editing a new or correct expression:
- After typing a point, comma, colon, semi-colon, space, tab or line-break
- After leaving the edited expression (using courser or mouse)
- When editing a incorrect expression:
- After each added character
- When editing a new or correct expression:
- Provide errors in adequate datastructure to visualisation components
- linenumber
- type of error
- further information)
- Whenever the visualisation of an expression should change, the parser should call an event handler provided by visualization components
Note: * A new expression is correct until it becomes incorrect. * The state of an expression can only be changed when the cursor leaves it.
Visualization
- Provides event handler and register it to parser error-event
- Underline syntax errors using a (preferably wavy) red line
- On mouse over, show information on error
- Information window could be clickabel to provide further error information
Suggestions
- To be implemented after parser and visualization components are feature complete
- Suggestions based on information from parse tree
- Analyzation based on soundex or other algorithm