Download TABLE INPUT METHOD - Department of Computing and Software
Transcript
6.2 Verification and Error Analysis in TIM TIM verifies each newly loaded expression. If the expression is not correct, the user will be informed of the error. Further details about the error can be obtained from the TTS log when an appropriate logging level is set. 6.3 Free Input with Flexible Validation and Automatic Corrections in TIM The users of TIM can type in the expressions directly by typing in the text of the expression with all the characters and the symbols it contains. Then the entire text of the typed-in expression is parsed and validated for syntactic correctness governed by the currently selected grammar. Validation can be either dynamic or static. In the dynamic mode the text of the expression is validated constantly as being typed in. The user can control when the input validation will be triggered by adjusting the length of the delay between the last keystroke and the start of the parsing process. The effect of this is such that the validation does not occur until there is a pause in the text input. When the pause is long enough the input is validated. If the input has not been changed, validation will not be triggered. In the static mode the user activates the validation of the text of the expression explicitly, whenever the user deems it necessary – this allows the user to type in the entire expression unperturbed, without validation being triggered by the typing pauses. The expression validation will happen at the explicit request by the user, when the subexpression window is closed, or when the expression changes are being saved. 6.4 Choice of Preferred Notation in TIM In order to facilitate the user’s choice of notational representation, TIM supports the ability to define an input-validating grammar. This grammar is used to derive a parser that is responsible for validating the user’s input and converting it to an internally stored abstract syntax tree (AST) representation of the typed expression. 47