This paper presents a new idea for lexical analysis: lolo (language-oriented lexer objects) is strictly based on the object orientation paradigm. We introduce the idea behind the system, describe the implementation, and compare it to the conventional approach using lex or flex.lolo extracts symbols from a sequence of input characters belonging to the ASCII or Unicode sets. lolo scanners can be extended without access to the source code: symbol recognizers can be derived by inheritance and an executing scanner can be reconfigured for different contexts. Recognizer actions are represented by objects which may be replaced at any time. Recognizers need not be based on finite state automata; therefore, lolo can recognize symbols that systems like lex cannot recognize directly.
Department, Program, or Center
Center for Advancing the Study of CyberInfrastructure
Kuhl, Bernd and Schreiner, Axel-Tobias, "Objects for lexical analysis" (2002). ACM SIGPLAN Notices, Vol. 37 (No. 2),Accessed from
RIT – Main Campus
Copyright ACM, 2002. This is the author's version of the work. It is posted here by permission of ACM for your personal use. Not for redistribution. The definitive version was published in ACM SIGPLAN Notices, Volume 37, Issue 2 (February 2002). http://doi.acm.org/10.1145/568600.568610 ISSN:0362-1340 Note: imported from RIT’s Digital Media Library running on DSpace to RIT Scholar Works in February 2014.