SlideShare a Scribd company logo
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools
Ruby AST Tools

More Related Content

PDF
Hacking with ruby2ruby
KEY
Basic Wicket and Scala
PDF
And the Greatest of These Is ... Space
PDF
Background Processing in Ruby on Rails
PDF
The Future of JRuby - Baruco 2013
KEY
Ruby: Beyond the Basics
ZIP
Ruby On Rails Presentation Barcamp Antwerp.Key
PDF
What we can learn from WordPress as a developer
Hacking with ruby2ruby
Basic Wicket and Scala
And the Greatest of These Is ... Space
Background Processing in Ruby on Rails
The Future of JRuby - Baruco 2013
Ruby: Beyond the Basics
Ruby On Rails Presentation Barcamp Antwerp.Key
What we can learn from WordPress as a developer

Similar to Ruby AST Tools (20)

PDF
Ruby para-programadores-php
PDF
What to do when things go wrong
PPT
Rubyforjavaprogrammers 1210167973516759-9
PPT
Rubyforjavaprogrammers 1210167973516759-9
PDF
Palestra no Grupo Sou Java
PDF
Symfony - Introduction
KEY
メタプログラミングPerl nagoya rubykaigi02
PPT
Ruby for C# Developers
PDF
Ruby and rails - Advanced Training (Cybage)
PDF
Ruby 2.0 / Rails 4.0, A selection of new features.
PDF
An introduction to Erlang and Elixir
PDF
Django Testing
ODP
A Toda Maquina Con Ruby on Rails
PDF
JRubyConf 2009
PDF
Ebay News 2001 4 19 Earnings
PDF
Ebay News 2000 10 19 Earnings
PDF
P4 P Update January 2009
KEY
Power Ruby
PDF
JavaOne 2013 - Clojure for Java Developers
PDF
The details of CI/CD environment for Ruby
Ruby para-programadores-php
What to do when things go wrong
Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9
Palestra no Grupo Sou Java
Symfony - Introduction
メタプログラミングPerl nagoya rubykaigi02
Ruby for C# Developers
Ruby and rails - Advanced Training (Cybage)
Ruby 2.0 / Rails 4.0, A selection of new features.
An introduction to Erlang and Elixir
Django Testing
A Toda Maquina Con Ruby on Rails
JRubyConf 2009
Ebay News 2001 4 19 Earnings
Ebay News 2000 10 19 Earnings
P4 P Update January 2009
Power Ruby
JavaOne 2013 - Clojure for Java Developers
The details of CI/CD environment for Ruby
Ad

Recently uploaded (20)

PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
A Presentation on Artificial Intelligence
PDF
Electronic commerce courselecture one. Pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
cuic standard and advanced reporting.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Encapsulation theory and applications.pdf
PPTX
Cloud computing and distributed systems.
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
A Presentation on Artificial Intelligence
Electronic commerce courselecture one. Pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Encapsulation_ Review paper, used for researhc scholars
NewMind AI Weekly Chronicles - August'25-Week II
Unlocking AI with Model Context Protocol (MCP)
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Assigned Numbers - 2025 - Bluetooth® Document
cuic standard and advanced reporting.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Review of recent advances in non-invasive hemoglobin estimation
Encapsulation theory and applications.pdf
Cloud computing and distributed systems.
Network Security Unit 5.pdf for BCA BBA.
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Diabetes mellitus diagnosis method based random forest with bat algorithm
Ad

Editor's Notes

  • #3: Ruby 1.8 uses a Bison Yacc-like parser Many different styles lead to the same Abstract Syntax tree or set of instructions.
  • #4: Best to thing of the AST not as a tree but a large container composed of inner nodes
  • #5: themselves composed of smaller nodes. until you get to an individual “token”
  • #6: Both by Ryan Davis
  • #9: Pure ruby implementation using racc. For those that don’t know RACC is a ruby based YACC parser. Slowness not a huge issue in my experience.
  • #10: Pure ruby implementation using racc. For those that don’t know RACC is a ruby based YACC parser. Slowness not a huge issue in my experience.
  • #11: Pure ruby implementation using racc. For those that don’t know RACC is a ruby based YACC parser. Slowness not a huge issue in my experience.
  • #12: Pure ruby implementation using racc. For those that don’t know RACC is a ruby based YACC parser. Slowness not a huge issue in my experience.
  • #13: Obtains the Parse tree and represents it as nested s-expresions.
  • #14: Obtains the Parse tree and represents it as nested s-expresions.
  • #15: composed of array’s, symbol’s and literals `structure` just returns the node type structure not the contents of the nodes. this is very handy for code structure analysis.
  • #16: Takes the sexp objects returned by ParseTree and processes returning output.
  • #29: Essentially turns the parse tree into an AST. It does this via a set of rewrite methods. By default ParseTree does this. To get the un-unified version you have to use RawParseTree. ParseTree does this by processing with a CompositeSexpProcessor called Unifier
  • #30: A Module that can be included in a SexpProcessor.
  • #31: Another good example of a SexpProcessor. Take a class or method and translates it into a string of valid Ruby code that would create that Class/method exactly. Useful for metaprogramming and dissecting dynamically created classes, methods, and procs
  • #32: Convert Methods, UnboundMethods and Procs to sexps and strings of ruby code. Helpful in debuging mysterious Procs.
  • #33: Often times I find libraries that use ParseTree but don't take advantage of SexpProcessor and often rebuild similar functionality. very sad.
  • #34: 2 Types of Libraries based on ParseTree
  • #35: Good at finding problem areas that may need refactoring
  • #37: Also adds to varying amounts to a score multiplier for specific types of nestings.
  • #39: with no options Ryan Davis has said to remember it's more about relative scores. Particularly bad scores I generally consider is those over 40 or if I'm being very rough those over 25.
  • #40: with group option, groups by class
  • #41: with detail version (old output) gives why each method earned it's score.
  • #42: Converted over by Ben Scofield Working on a site that will allow you to share and download those weightings.
  • #43: by Marty Andrews
  • #44: by Marty Andrews
  • #45: by Marty Andrews
  • #46: by Marty Andrews
  • #47: by Marty Andrews
  • #48: by Marty Andrews
  • #49: Once again, Very good at finding problem areas that need refactoring.
  • #54: by github’s Chris Wanstrath Allows you to express queries in clear and concise ruby code. Think of it as a Framework for specific API adapters, e.g. ActiveRecord Includes a Rubigen based adapter generator for any data-source API you want
  • #55: by github’s Chris Wanstrath Allows you to express queries in clear and concise ruby code. Think of it as a Framework for specific API adapters, e.g. ActiveRecord Includes a Rubigen based adapter generator for any data-source API you want
  • #56: by github’s Chris Wanstrath Allows you to express queries in clear and concise ruby code. Think of it as a Framework for specific API adapters, e.g. ActiveRecord Includes a Rubigen based adapter generator for any data-source API you want
  • #57: Just gives us another syntax for doing finds, the syntax may be preferable to some. Still needs lots of work to do everything you can do with find or SQL.
  • #63: No composite SexpProcessor equivalent yet.
  • #64: line and column, node/event type, “code” that produced it.
  • #65: Very similar output to ParseTree, but does include line and column info for inner most nodes.
  • #66: Uses Lexer and goes thru each node.