Input via the keyboard can be slow and tedious for many computer users, but the problem is particularly severe for those with motor disabilities. Strategies that reduce the number of keystrokes required can help limit the problems these users face. In a programming enviroment, word prediction has emerged as a highly successful strategy for saving keystrokes. The use of statistical measures such as the recency and repetitiveness of words can be used to guide the prediction process to a 40% keystroke saving. However, these measures ignore valuable information about the program structure. The goal of this study was to test whether the use of the syntax of a programming language can effectively assist these statistical prediction strategies. The results show that inclusion of syntactic information of the Pascal programming language can account for a further 3% increase in the number of keystrokes saved, as well as a 9% increase in the accuracy of predictions. This result was obtained by running a collection of Pascal programs on two separate applications that simulate text input in a predictive Pascal program editor. One of these simulators uses only statistical prediction, whereas the other includes the syntactical approach. The average savings returned by the two simulators were compared by performing a paired sample means t-test.