Back to search

San Jose State University

MacRuby: User Defined Macro Support for Ruby

Abstract

dc:description.abstract

Ruby does not have a way to create custom syntax outside what the language already offers. Macros allow custom syntax creation. They achieve this by code generation that transforms a small set of instructions into a larger set of instructions. This gives programmers the opportunity to extend the language based on their own custom needs. Macros are a form of meta-programming that helps programmers in writing clean and concise code. MacRuby is a hygienic macro system. It works by parsing the Abstract Syntax Tree(AST) and replacing macro references with expanded Ruby code. MacRuby offers an intuitive way to declare macro and expand the source code based on the expansion rules. We validated MacRuby by adding some features to the Ruby language that didn’t exist before or were removed as the user base for the feature was small. We fulfilled this by creating a library using the simple and easy syntax of MacRuby, thus demonstrating the library’s utility.

Degree

thesis:*
Name thesis:degree_name
Master of Science (MS)
Discipline thesis:degree_discipline
Computer Science

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Singh, Arushi
Contributors dc:contributor
  • Thomas Austin
  • Chris Pollett
  • Rula Khayrallah

Subjects

dc:subject × 3

Identifiers

dc:identifier.*

Chain of custody

source
Harvested from
San Jose State University
Base URL
scholarworks.sjsu.edu/do/oai/
Last updated
2026-11-26
Source record
OAI-PMH GetRecord
citation

Singh, Arushi. MacRuby: User Defined Macro Support for Ruby. https://doi.org/10.31979/etd.zv6q-ghdc