Schrödinger's token
- 23 March 2001
- journal article
- research article
- Published by Wiley in Software: Practice and Experience
- Vol. 31 (8) , 803-814
- https://doi.org/10.1002/spe.390
Abstract
A common problem when writing compilers for programming languages or little, domain‐specific languages is that an input token may have several interpretations, depending on context. Solutions to this problem demand programmer intervention, obfuscate the language's grammar, and may introduce subtle bugs. We present a technique which is simple and without the above drawbacks—allowing a token to simultaneously have different types—and show how it can be applied to areas such as little language processing and fuzzy parsing. We also describe ways that compiler tools can support this technique. Copyright © 2001 John Wiley & Sons, Ltd.Keywords
Funding Information
- National Science and Engineering Research Council of Canada
This publication has 22 references indexed in Scilit:
- KeywordsACM SIGPLAN Notices, 1999
- Incremental analysis of real programming languagesACM SIGPLAN Notices, 1997
- Scannerless NSLR(1) parsing of programming languagesACM SIGPLAN Notices, 1989
- An Improved Context-Free RecognizerACM Transactions on Programming Languages and Systems, 1980
- LALR(1) parsing for languages without reserved wordsACM SIGPLAN Notices, 1979
- The CIMS PL/I compilerACM SIGPLAN Notices, 1979
- Implementation of a portable Fortran 77 compiler using modern toolsACM SIGPLAN Notices, 1979
- Understanding natural languageCognitive Psychology, 1972
- The classification of FORTRAN statementsThe Computer Journal, 1971
- An efficient context-free parsing algorithmCommunications of the ACM, 1970