SlideShare une entreprise Scribd logo
1  sur  11
Suport IDE in Eclipse pentrulimbajul tau (DSL) folosindXtext Dorin Florian Ciuca dorin.ciuca at freescale.com June 2011 Eclipse DemoCamp Bucharest
Ce este un DSL? DSL (Domain-Specific Language) reprezinta un limbaj de programare minimal orientatpe un anumitdomeniu. Ex: SQL, limbaje XML cum e ANT etc  GPL (General Purpose Language) limbaj de programare general Ex: Java, C, C++ etc Folosireaunui GPL pentrurezolvareauneiproblemedintr-un anumitdomeniuesteposibila, dar nu e neaparatceamaiindicatasolutie. Un DSL pentruaceldomeniuartrebuisaajute la: crestereaproductivitatii, claritatiicodului, mentineresimodificarimaiusoare etc.  XML poatefifolositpentrudefinirea de DSL-uri, dar are ca dezavantaj major sintaxageneralizata care nu e usor de urmarit de catreoameni
Ce este Xtext? Conform http://www.eclipse.org/Xtexteste: un framework pentrudezvoltarea de limbaje conform  folositpentru a crea un limbajnou a adaugasuportpentru un limbaj existent un mic DSL un GPL complex Xtextpermiteadaugarea de IDE support in Eclipse pentru un limbaj, asemanator cu suportul existent dejapentru Java in Eclipse IDE.
Cum functioneaza?
Cum functioneaza? (continuare)  Porneste de la gramaticalimbajului care trebuiedefinita de user Foloseste ANTLR pentru a genera un parser conform gramaticii (http://www.antlr.org) Genereazametamodelulpentru abstract syntax tree (AST) bazatpeecore (de fapteste un graf, darilnumim traditional AST) Genereaza un eclipse plug-in care vacontinesuportulpentru IDE bazatpe AST siParseTree Genereaza optional un eclipse plug-in care contine un generator pentrulimbajuldefinit
Cum functioneaza? (continuare) La runtime, parserulpopuleazacele 2 modele AST siParseTreeactivandsuportul in IDE.
Alte detalii  AST-ulrezultatfiind un model EMF, se poateusorinterconecta cu alte framework-uribazatepe EMF ca GMF Xtext se poatefolosisi ca aplicatie java standalone, nu e bazatpe Eclipse OSGI.
Gramatica GramaticaesteinimaXtext-ului Format EBNF Reguli terminale de parsare Gramaticaasigura: lexing parsing linking validation
Demo – mem files - grammar
Demo – mem files - editor
2011 fsr democamp_xtext

Contenu connexe

En vedette

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

2011 fsr democamp_xtext

  • 1. Suport IDE in Eclipse pentrulimbajul tau (DSL) folosindXtext Dorin Florian Ciuca dorin.ciuca at freescale.com June 2011 Eclipse DemoCamp Bucharest
  • 2. Ce este un DSL? DSL (Domain-Specific Language) reprezinta un limbaj de programare minimal orientatpe un anumitdomeniu. Ex: SQL, limbaje XML cum e ANT etc GPL (General Purpose Language) limbaj de programare general Ex: Java, C, C++ etc Folosireaunui GPL pentrurezolvareauneiproblemedintr-un anumitdomeniuesteposibila, dar nu e neaparatceamaiindicatasolutie. Un DSL pentruaceldomeniuartrebuisaajute la: crestereaproductivitatii, claritatiicodului, mentineresimodificarimaiusoare etc. XML poatefifolositpentrudefinirea de DSL-uri, dar are ca dezavantaj major sintaxageneralizata care nu e usor de urmarit de catreoameni
  • 3. Ce este Xtext? Conform http://www.eclipse.org/Xtexteste: un framework pentrudezvoltarea de limbaje conform folositpentru a crea un limbajnou a adaugasuportpentru un limbaj existent un mic DSL un GPL complex Xtextpermiteadaugarea de IDE support in Eclipse pentru un limbaj, asemanator cu suportul existent dejapentru Java in Eclipse IDE.
  • 5. Cum functioneaza? (continuare) Porneste de la gramaticalimbajului care trebuiedefinita de user Foloseste ANTLR pentru a genera un parser conform gramaticii (http://www.antlr.org) Genereazametamodelulpentru abstract syntax tree (AST) bazatpeecore (de fapteste un graf, darilnumim traditional AST) Genereaza un eclipse plug-in care vacontinesuportulpentru IDE bazatpe AST siParseTree Genereaza optional un eclipse plug-in care contine un generator pentrulimbajuldefinit
  • 6. Cum functioneaza? (continuare) La runtime, parserulpopuleazacele 2 modele AST siParseTreeactivandsuportul in IDE.
  • 7. Alte detalii AST-ulrezultatfiind un model EMF, se poateusorinterconecta cu alte framework-uribazatepe EMF ca GMF Xtext se poatefolosisi ca aplicatie java standalone, nu e bazatpe Eclipse OSGI.
  • 8. Gramatica GramaticaesteinimaXtext-ului Format EBNF Reguli terminale de parsare Gramaticaasigura: lexing parsing linking validation
  • 9. Demo – mem files - grammar
  • 10. Demo – mem files - editor