Back to search

McGill University

The MetaLexer lexical specification language

Abstract

dc:description.abstract

Compiler toolkits make it possible to rapidly develop compilers and translators for new programming languages. Recently, toolkit writers have focused on supporting extensible languages and systems that mix the syntaxes of multiple programming languages. However, this work has not been extended down to the lexical analysis level. As a result, users of these toolkits have to rely on ad-hoc solutions when they extend or mix syntaxes. This thesis presents MetaLexer, a new lexical specification language that remedies this deficiency. MetaLexer has three key features: it abstracts lexical state transitions out of semantic actions, makes modules extensible by introducing multiple inheritance, and provides cross-platform support for a variety of programming languages and compiler front-end toolchains. In addition to designing this new language, we have constructed a number of practical tools. The most important are a pair of translators that map MetaLexer to the popular JFlex lexical specification language and vice versa. We have exercised MetaLexer by using it to create lexers for three real programming languages: AspectJ (and two extensions), a large subset of Matlab, and MetaLexer itself. The new specifications are easier to read and require much less action code than the originals.

Degree

thesis:*
Name thesis:degree_name
Master of Science
Grantor dc:publisher
McGill University
Year dc:date.issued
2009

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Casey, Andrew
Advisor dc:contributor.advisor
  • Hendren, Laurie (Internal/Supervisor)

Subjects

dc:subject × 1

Rights

dc:rights
Statement dc:rights
  • All items in eScholarship@McGill are protected by copyright with all rights reserved unless otherwise indicated.
Language dc:language.iso
en

Identifiers

dc:identifier.*
Dc Identifier Other
hyrax:hh63sw750

Chain of custody

source
Harvested from
McGill University
Base URL
mcgill.scholaris.ca/server/oai/request
Last updated
2026-11-27
Source record
OAI-PMH GetRecord
related terms
citation

Casey, Andrew. The MetaLexer lexical specification language. McGill University, 2009. https://doi.org/10.82308/46265