SlideShare une entreprise Scribd logo
1  sur  32
Implementing External DSLs Using Scala Parser Combinators St. Louis Lambda Lounge Sept. 3, 2009 Tim Dalton Senior Software Engineer Object Computing Inc.
External vs Internal DSL ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What is a Combinator ? ,[object Object],[object Object],[object Object],[object Object],[object Object]
Scala’s Parser Implementation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Scala Combinator Parser Hierarchy ,[object Object],[object Object],[object Object],[object Object],[object Object]
A Simple Logo(-Like) Interpreter ,[object Object],[object Object],[object Object],[object Object],[object Object]
Grammar for Simple Logo ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Scala Code to Implement Parser ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Scala Code to Implement Parser ,[object Object],[object Object],[object Object]
A Closer Look ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Implicit Conversions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Back to the Parser ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Parser[T]’s and ParseResult[T]’s ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Combining Parser[T]’s ,[object Object],[object Object],[object Object],[object Object],[object Object]
Combining Parser[T]’s ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Forward March ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Repetition ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Repetition ,[object Object],[object Object],[object Object],[object Object]
Other Forms of Repetition ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Execution ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Not-so-Happy Path ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Making Something Useful ,[object Object],[object Object],[object Object],[object Object]
Eye Brows Example ,[object Object],[object Object],[object Object],[object Object],[object Object]
Implementing Commands ,[object Object],[object Object],[object Object],[object Object],[object Object]
Transforming into Commands ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Derivates of “~” ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Updated Parser ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Updated Parser Results ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Evaluation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Evaluation (More Functional) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Evaluation (More Imperative) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Demonstration

Contenu connexe

Tendances

Quicksort Presentation
Quicksort PresentationQuicksort Presentation
Quicksort Presentationirdginfo
 
Top Down Parsing, Predictive Parsing
Top Down Parsing, Predictive ParsingTop Down Parsing, Predictive Parsing
Top Down Parsing, Predictive ParsingTanzeela_Hussain
 
Nonrecursive predictive parsing
Nonrecursive predictive parsingNonrecursive predictive parsing
Nonrecursive predictive parsingalldesign
 
Recursive descent parsing
Recursive descent parsingRecursive descent parsing
Recursive descent parsingBoy Baukema
 
Parsing in Compiler Design
Parsing in Compiler DesignParsing in Compiler Design
Parsing in Compiler DesignAkhil Kaushik
 
Python (regular expression)
Python (regular expression)Python (regular expression)
Python (regular expression)Chirag Shetty
 
Control Structures in C
Control Structures in CControl Structures in C
Control Structures in Csana shaikh
 
Theory of automata and formal language lab manual
Theory of automata and formal language lab manualTheory of automata and formal language lab manual
Theory of automata and formal language lab manualNitesh Dubey
 
Top down and botttom up Parsing
Top down     and botttom up ParsingTop down     and botttom up Parsing
Top down and botttom up ParsingGerwin Ocsena
 

Tendances (19)

Topdown parsing
Topdown parsingTopdown parsing
Topdown parsing
 
Functions
FunctionsFunctions
Functions
 
Ch2
Ch2Ch2
Ch2
 
Ch4a
Ch4aCh4a
Ch4a
 
Operator precedence
Operator precedenceOperator precedence
Operator precedence
 
Types of Parser
Types of ParserTypes of Parser
Types of Parser
 
Quicksort Presentation
Quicksort PresentationQuicksort Presentation
Quicksort Presentation
 
Module 11
Module 11Module 11
Module 11
 
Top Down Parsing, Predictive Parsing
Top Down Parsing, Predictive ParsingTop Down Parsing, Predictive Parsing
Top Down Parsing, Predictive Parsing
 
Nonrecursive predictive parsing
Nonrecursive predictive parsingNonrecursive predictive parsing
Nonrecursive predictive parsing
 
Recursive descent parsing
Recursive descent parsingRecursive descent parsing
Recursive descent parsing
 
Parsing
ParsingParsing
Parsing
 
Left factor put
Left factor putLeft factor put
Left factor put
 
Parsing in Compiler Design
Parsing in Compiler DesignParsing in Compiler Design
Parsing in Compiler Design
 
Python (regular expression)
Python (regular expression)Python (regular expression)
Python (regular expression)
 
Bottom up parser
Bottom up parserBottom up parser
Bottom up parser
 
Control Structures in C
Control Structures in CControl Structures in C
Control Structures in C
 
Theory of automata and formal language lab manual
Theory of automata and formal language lab manualTheory of automata and formal language lab manual
Theory of automata and formal language lab manual
 
Top down and botttom up Parsing
Top down     and botttom up ParsingTop down     and botttom up Parsing
Top down and botttom up Parsing
 

En vedette

Writing DSL's in Scala
Writing DSL's in ScalaWriting DSL's in Scala
Writing DSL's in ScalaAbhijit Sharma
 
Virtualization
VirtualizationVirtualization
Virtualizationturnerwife
 
Markaların Logo Değişimleri
Markaların Logo  DeğişimleriMarkaların Logo  Değişimleri
Markaların Logo DeğişimleriYunus Emre
 
Coches Fantasticos
Coches FantasticosCoches Fantasticos
Coches Fantasticosjosevlc
 
NEDMAInno14: The Fundamental Things Still Apply: How to Deal with "Innovation...
NEDMAInno14: The Fundamental Things Still Apply: How to Deal with "Innovation...NEDMAInno14: The Fundamental Things Still Apply: How to Deal with "Innovation...
NEDMAInno14: The Fundamental Things Still Apply: How to Deal with "Innovation...New England Direct Marketing Association
 
MTech13: "How to Jump Start Sales Productivity with Content" - Paula Crerar
MTech13: "How to Jump Start Sales Productivity with Content" - Paula CrerarMTech13: "How to Jump Start Sales Productivity with Content" - Paula Crerar
MTech13: "How to Jump Start Sales Productivity with Content" - Paula CrerarNew England Direct Marketing Association
 
Yahoo Korea 10th anniversary Plan Concept
Yahoo Korea 10th anniversary Plan ConceptYahoo Korea 10th anniversary Plan Concept
Yahoo Korea 10th anniversary Plan ConceptJongjin Park
 
Google Places - Global Approach ISS 2012
Google Places - Global Approach ISS 2012Google Places - Global Approach ISS 2012
Google Places - Global Approach ISS 2012Lisa Myers
 
A Redesign of VisitPhilly.com by Happy Cog
A Redesign of VisitPhilly.com by Happy CogA Redesign of VisitPhilly.com by Happy Cog
A Redesign of VisitPhilly.com by Happy CogKevin Hoffman
 
everdo for ad
everdo for adeverdo for ad
everdo for adzopen
 
MTech13: "The Power of Marketing Automation in an Inbound World" - Nick Salva...
MTech13: "The Power of Marketing Automation in an Inbound World" - Nick Salva...MTech13: "The Power of Marketing Automation in an Inbound World" - Nick Salva...
MTech13: "The Power of Marketing Automation in an Inbound World" - Nick Salva...New England Direct Marketing Association
 
Istant report Open Spece Technology "Facciamo il Macello"
Istant report Open Spece Technology "Facciamo il Macello"Istant report Open Spece Technology "Facciamo il Macello"
Istant report Open Spece Technology "Facciamo il Macello"Conetica
 
Print Technology: Functional Printed Electronics - RFID & NFC versus QR Codes...
Print Technology: Functional Printed Electronics - RFID & NFC versus QR Codes...Print Technology: Functional Printed Electronics - RFID & NFC versus QR Codes...
Print Technology: Functional Printed Electronics - RFID & NFC versus QR Codes...New England Direct Marketing Association
 

En vedette (20)

Writing DSL's in Scala
Writing DSL's in ScalaWriting DSL's in Scala
Writing DSL's in Scala
 
Virtualization
VirtualizationVirtualization
Virtualization
 
Hpt performance
Hpt   performanceHpt   performance
Hpt performance
 
About Blogs
About BlogsAbout Blogs
About Blogs
 
PO
POPO
PO
 
Downtown Ferndale Business Guide 2011
Downtown Ferndale Business Guide 2011Downtown Ferndale Business Guide 2011
Downtown Ferndale Business Guide 2011
 
Markaların Logo Değişimleri
Markaların Logo  DeğişimleriMarkaların Logo  Değişimleri
Markaların Logo Değişimleri
 
Coches Fantasticos
Coches FantasticosCoches Fantasticos
Coches Fantasticos
 
NEDMAInno14: The Fundamental Things Still Apply: How to Deal with "Innovation...
NEDMAInno14: The Fundamental Things Still Apply: How to Deal with "Innovation...NEDMAInno14: The Fundamental Things Still Apply: How to Deal with "Innovation...
NEDMAInno14: The Fundamental Things Still Apply: How to Deal with "Innovation...
 
MTech13: "How to Jump Start Sales Productivity with Content" - Paula Crerar
MTech13: "How to Jump Start Sales Productivity with Content" - Paula CrerarMTech13: "How to Jump Start Sales Productivity with Content" - Paula Crerar
MTech13: "How to Jump Start Sales Productivity with Content" - Paula Crerar
 
Yahoo Korea 10th anniversary Plan Concept
Yahoo Korea 10th anniversary Plan ConceptYahoo Korea 10th anniversary Plan Concept
Yahoo Korea 10th anniversary Plan Concept
 
Google Places - Global Approach ISS 2012
Google Places - Global Approach ISS 2012Google Places - Global Approach ISS 2012
Google Places - Global Approach ISS 2012
 
Учебные форматы МАСП
Учебные форматы МАСПУчебные форматы МАСП
Учебные форматы МАСП
 
A Redesign of VisitPhilly.com by Happy Cog
A Redesign of VisitPhilly.com by Happy CogA Redesign of VisitPhilly.com by Happy Cog
A Redesign of VisitPhilly.com by Happy Cog
 
everdo for ad
everdo for adeverdo for ad
everdo for ad
 
CEO Roundtable on Local and State Tax Laws
CEO Roundtable on Local and State Tax LawsCEO Roundtable on Local and State Tax Laws
CEO Roundtable on Local and State Tax Laws
 
MTech13: "The Power of Marketing Automation in an Inbound World" - Nick Salva...
MTech13: "The Power of Marketing Automation in an Inbound World" - Nick Salva...MTech13: "The Power of Marketing Automation in an Inbound World" - Nick Salva...
MTech13: "The Power of Marketing Automation in an Inbound World" - Nick Salva...
 
Istant report Open Spece Technology "Facciamo il Macello"
Istant report Open Spece Technology "Facciamo il Macello"Istant report Open Spece Technology "Facciamo il Macello"
Istant report Open Spece Technology "Facciamo il Macello"
 
Print Technology: Functional Printed Electronics - RFID & NFC versus QR Codes...
Print Technology: Functional Printed Electronics - RFID & NFC versus QR Codes...Print Technology: Functional Printed Electronics - RFID & NFC versus QR Codes...
Print Technology: Functional Printed Electronics - RFID & NFC versus QR Codes...
 
Workflow NPW2010
Workflow NPW2010Workflow NPW2010
Workflow NPW2010
 

Similaire à Implementing External DSLs Using Scala Parser Combinators

The Java Script Programming Language
The  Java Script  Programming  LanguageThe  Java Script  Programming  Language
The Java Script Programming Languagezone
 
Javascript by Yahoo
Javascript by YahooJavascript by Yahoo
Javascript by Yahoobirbal
 
The JavaScript Programming Language
The JavaScript Programming LanguageThe JavaScript Programming Language
The JavaScript Programming LanguageRaghavan Mohan
 
Les origines de Javascript
Les origines de JavascriptLes origines de Javascript
Les origines de JavascriptBernard Loire
 
TI1220 Lecture 9: Parsing & interpretation
TI1220 Lecture 9: Parsing & interpretationTI1220 Lecture 9: Parsing & interpretation
TI1220 Lecture 9: Parsing & interpretationEelco Visser
 
Beginning Scala Svcc 2009
Beginning Scala Svcc 2009Beginning Scala Svcc 2009
Beginning Scala Svcc 2009David Pollak
 
2 R Tutorial Programming
2 R Tutorial Programming2 R Tutorial Programming
2 R Tutorial ProgrammingSakthi Dasans
 
Java Code The traditional way to deal with these in Parsers is the .pdf
Java Code The traditional way to deal with these in Parsers is the .pdfJava Code The traditional way to deal with these in Parsers is the .pdf
Java Code The traditional way to deal with these in Parsers is the .pdfstopgolook
 
C intro
C introC intro
C introKamran
 
Php-Continuation
Php-ContinuationPhp-Continuation
Php-Continuationlotlot
 
C++ Function
C++ FunctionC++ Function
C++ FunctionHajar
 
Introduction to programming c and data structures
Introduction to programming c and data structuresIntroduction to programming c and data structures
Introduction to programming c and data structuresPradipta Mishra
 
Python regular expressions
Python regular expressionsPython regular expressions
Python regular expressionsKrishna Nanda
 
Php Reusing Code And Writing Functions
Php Reusing Code And Writing FunctionsPhp Reusing Code And Writing Functions
Php Reusing Code And Writing Functionsmussawir20
 

Similaire à Implementing External DSLs Using Scala Parser Combinators (20)

Perl Presentation
Perl PresentationPerl Presentation
Perl Presentation
 
The Java Script Programming Language
The  Java Script  Programming  LanguageThe  Java Script  Programming  Language
The Java Script Programming Language
 
Javascript by Yahoo
Javascript by YahooJavascript by Yahoo
Javascript by Yahoo
 
The JavaScript Programming Language
The JavaScript Programming LanguageThe JavaScript Programming Language
The JavaScript Programming Language
 
Javascript
JavascriptJavascript
Javascript
 
Les origines de Javascript
Les origines de JavascriptLes origines de Javascript
Les origines de Javascript
 
TI1220 Lecture 9: Parsing & interpretation
TI1220 Lecture 9: Parsing & interpretationTI1220 Lecture 9: Parsing & interpretation
TI1220 Lecture 9: Parsing & interpretation
 
Javascript
JavascriptJavascript
Javascript
 
Programming
ProgrammingProgramming
Programming
 
Beginning Scala Svcc 2009
Beginning Scala Svcc 2009Beginning Scala Svcc 2009
Beginning Scala Svcc 2009
 
Scala 2 + 2 > 4
Scala 2 + 2 > 4Scala 2 + 2 > 4
Scala 2 + 2 > 4
 
2 R Tutorial Programming
2 R Tutorial Programming2 R Tutorial Programming
2 R Tutorial Programming
 
Java Code The traditional way to deal with these in Parsers is the .pdf
Java Code The traditional way to deal with these in Parsers is the .pdfJava Code The traditional way to deal with these in Parsers is the .pdf
Java Code The traditional way to deal with these in Parsers is the .pdf
 
C intro
C introC intro
C intro
 
Php-Continuation
Php-ContinuationPhp-Continuation
Php-Continuation
 
Oscon 2010 Specs talk
Oscon 2010 Specs talkOscon 2010 Specs talk
Oscon 2010 Specs talk
 
C++ Function
C++ FunctionC++ Function
C++ Function
 
Introduction to programming c and data structures
Introduction to programming c and data structuresIntroduction to programming c and data structures
Introduction to programming c and data structures
 
Python regular expressions
Python regular expressionsPython regular expressions
Python regular expressions
 
Php Reusing Code And Writing Functions
Php Reusing Code And Writing FunctionsPhp Reusing Code And Writing Functions
Php Reusing Code And Writing Functions
 

Dernier

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Dernier (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Implementing External DSLs Using Scala Parser Combinators

  • 1. Implementing External DSLs Using Scala Parser Combinators St. Louis Lambda Lounge Sept. 3, 2009 Tim Dalton Senior Software Engineer Object Computing Inc.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.

Notes de l'éditeur

  1. (|) = OR logic { } = repetition
  2. The multiline string notation is used so escaping “\\” in the regex is not needed
  3. Internal DSLs in Scala leverage implicit conversion to a great degree to allow a more flexible “syntax”
  4. ~ is a case class.
  5. Because statement and repeat invoke each other and therefore can be invoked recursively, The return type for one must be specified
  6. There is also rep1sep
  7. Demonstrate no so precise message “RT” -> “ET”
  8. For some reason Scala compile didn’t like { Turn(-_) }
  9. Tail Recursive !!