Abstract
In certain types of experiment, the subject controls an on-line computer by giving commands in a simple source language—possibly a subset of English or of a high level computer language. The commands must then be decoded before they can be obeved. One method is to write an ad hoc program for the specific purpose. An alternative is to write a general purpose translator to decode the source language into a more primitive target language. A suitable translator is described, driven principally by “paired” context-free grammars of the source and target languages but also able to accommodate context-sensitive rules. Using the translator has several advantages. It is obviously much easier to write an ad hoc recognizer for a very primitive language than for a subset of English. Also, for small languages it is very easy to write and check grammars; minor modifications are a trivial job, and the finished product is unlikely to contain hidden bugs. An example of the method is given.
Article PDF
Similar content being viewed by others
Avoid common mistakes on your manuscript.
References
Anderson, J. R., & Bower, G. H.Human associative memory. Washington, D.C.: Winston, 1973.
Fitter, M. J. An extensible system for controlling a scheduling task. Memo No. 51, MRC Social and Applied Psychology Unit, University of Sheffield. Sheffield, England, 1974.
Fitter, M. J., & Daly, A. C. An extensible touchboard for online experiments. Quarterly Journal of Experimental Psychology, 1975, 27, 673–676.
Foster, J. M.Automatic syntactic analysis. London, MacDonald/Elsevier, 1970.
Green, T. R. G., & Guest, D. J. An easily-implemented language for controlling complex experiments. International Journal of Man-Machine Studies, 1974, 6, 335–359.
Gries, D.Compiler construction for digital computers. New York, Wiley, 1971.
Ingerman, P. Z.A syntax oriented translator. London: Academic Press, 1966.
Sime, M. E., Green, T. R. G., & Guest, D. J. Psychological evaluation of two conditional constructions used in computer languages. International Journal of Man-Machine Studies, 1973, 5, 105–113.
Sime, M. E., Green, T. R. G., & Guest, D. J. Scope marking in in computer conditionals-a psychological evaluation. Memo No. 48, MRC Social and Applied Psychology Unit, University of Sheffield, England, 1974.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Green, T.R.G. Computer translation with paired grammars. Behavior Research Methods & Instrumentation 7, 557–562 (1975). https://doi.org/10.3758/BF03201633
Received:
Accepted:
Issue Date:
DOI: https://doi.org/10.3758/BF03201633