SlideShare uma empresa Scribd logo
1 de 26
LR Parsers Canonical Collection LR
LR Parser 1 ,[object Object],[object Object],S T A C K Prg Ejem1 ; Real X2 Fig. 6.2  Aho, Ullman. “Principles of Compiler Design”  pág. 199 Parsing Table eof …
Driver Routine ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Shift ,[object Object],[object Object],[object Object]
Reduce ,[object Object],[object Object],[object Object],[object Object],[object Object]
Accept ,[object Object]
Error ,[object Object]
How to construct a simple LR 2 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],IBID. Fig. 6.5 pág. 207
How to construct a simple LR 2 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],IBID. Fig. 6.5 pág. 207
Example: G is a grammar with start symbol E E  E + T E  T T  T/F T  F F  (E) F  id
G’ is the augmented grammar with a new start symbol E’ E’    E E  E + T E  T T  T/F T  F F  (E) F  id Blue nucleous
Closure(E’) E’  ♥E Blue nucleous
Closure(E) E’  ♥E E  ♥ E + T E  ♥ T
Closure(T) E’  ♥E E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F
Closure(F) E’  ♥E E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id
State 1 E’  ♥E E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id
State 2=GoTo(1,E) E’  ♥E E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id E’  E♥ E  E♥ + T
State 3 =GoTo(1,T) E’  ♥E E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id E’  E♥ E  E♥ + T E’  T♥ T  T♥ /F
State 4=GoTo(1,F) E’  ♥E E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id E’  E♥ E  E♥ + T E’  T♥ T  T♥ /F T  F ♥
State 5: from state 1 with ( E’  ♥E E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id E’  E♥ E  E♥ + T E’  T♥ T  T♥ /F T  F ♥ F  (♥E) E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id
State 6:from state1 with id  E’  ♥E E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id E’  E♥ E  E♥ + T E’  T♥ T  T♥ /F T  F ♥ F  (♥E) E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id F  id ♥
States 1,2 ,3,4,5,6 E’  ♥E E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id E’  E♥ E  E♥ + T E’  T♥ T  T♥ /F T  F ♥ F  (♥E) E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id F  id ♥
States 7,8,9 E’  ♥E E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id E’  E♥ E  E♥ + T E’  T♥ T  T♥ /F T  F ♥ F  (♥E) E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id F  id ♥ E’  E+♥T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id T’  T/♥F F  ♥ (E) F  ♥ id F  (E♥) E  E♥+T
States 10,11,12 E’  ♥E E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id E’  E♥ E  E♥ + T E’  T♥ T  T♥ /F T  F ♥ F  (♥E) E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id F  id ♥ E’  E+♥T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id T’  T/♥F F  ♥ (E) F  ♥ id F  (E♥) E  E♥+T E’  E+T♥ T  T ♥ /F T’  T/F♥ F  (E)♥
States 1,2,3,4,... 12 E’  ♥E E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id E’  E♥ E  E♥ + T E’  T♥ T  T♥ /F T  F ♥ F  (♥E) E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id F  id ♥ E’  E+♥T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id T’  T/♥F F  ♥ (E) F  ♥ id F  (E♥) E  E♥+T E’  E+T♥ T  T ♥ /F T’  T/F♥ F  (E)♥
END Canonical Collection LR

Mais conteúdo relacionado

Destaque

Cooperrider mpod webcast 2011
Cooperrider mpod webcast 2011Cooperrider mpod webcast 2011
Cooperrider mpod webcast 2011dlc6
 
Ashridge 2008
Ashridge 2008Ashridge 2008
Ashridge 2008dlc6
 
Resultados Enlace 2009 Basica Ultimisima
Resultados Enlace 2009 Basica UltimisimaResultados Enlace 2009 Basica Ultimisima
Resultados Enlace 2009 Basica Ultimisimaulises73
 
Context Booster @ Photo Hack Day 3
Context Booster @ Photo Hack Day 3Context Booster @ Photo Hack Day 3
Context Booster @ Photo Hack Day 3Sebastian Küpers
 
Surgeons
SurgeonsSurgeons
Surgeonsanna_k
 
IBM Portal Web intro
IBM Portal Web introIBM Portal Web intro
IBM Portal Web introdanisman
 
Lotus Forms Web Intro
Lotus Forms Web IntroLotus Forms Web Intro
Lotus Forms Web Introdanisman
 
Creative Leadership for Marketers
Creative Leadership for MarketersCreative Leadership for Marketers
Creative Leadership for MarketersLaurent Bouty
 
Metaverse Marketing: Games and Virtual Worlds in Product Promotion
Metaverse Marketing: Games and Virtual Worlds in Product PromotionMetaverse Marketing: Games and Virtual Worlds in Product Promotion
Metaverse Marketing: Games and Virtual Worlds in Product PromotionSebastian Küpers
 
10 reasons your marketing should be human
10 reasons your marketing should be human10 reasons your marketing should be human
10 reasons your marketing should be humanLaurent Bouty
 
How to stand out as a brand in 2016 and beyond
How to stand out as a brand in 2016 and beyondHow to stand out as a brand in 2016 and beyond
How to stand out as a brand in 2016 and beyondLaurent Bouty
 
How to build a marketing plan 2015
How to build a marketing plan 2015How to build a marketing plan 2015
How to build a marketing plan 2015Laurent Bouty
 
CELEBRATE CREATIVITY
CELEBRATE CREATIVITYCELEBRATE CREATIVITY
CELEBRATE CREATIVITYLaurent Bouty
 

Destaque (16)

Cooperrider mpod webcast 2011
Cooperrider mpod webcast 2011Cooperrider mpod webcast 2011
Cooperrider mpod webcast 2011
 
2011 in 6 words
2011 in 6 words2011 in 6 words
2011 in 6 words
 
Ashridge 2008
Ashridge 2008Ashridge 2008
Ashridge 2008
 
Resultados Enlace 2009 Basica Ultimisima
Resultados Enlace 2009 Basica UltimisimaResultados Enlace 2009 Basica Ultimisima
Resultados Enlace 2009 Basica Ultimisima
 
Context Booster @ Photo Hack Day 3
Context Booster @ Photo Hack Day 3Context Booster @ Photo Hack Day 3
Context Booster @ Photo Hack Day 3
 
Surgeons
SurgeonsSurgeons
Surgeons
 
Marketing 0.0
Marketing 0.0Marketing 0.0
Marketing 0.0
 
Happy 2009
Happy 2009Happy 2009
Happy 2009
 
IBM Portal Web intro
IBM Portal Web introIBM Portal Web intro
IBM Portal Web intro
 
Lotus Forms Web Intro
Lotus Forms Web IntroLotus Forms Web Intro
Lotus Forms Web Intro
 
Creative Leadership for Marketers
Creative Leadership for MarketersCreative Leadership for Marketers
Creative Leadership for Marketers
 
Metaverse Marketing: Games and Virtual Worlds in Product Promotion
Metaverse Marketing: Games and Virtual Worlds in Product PromotionMetaverse Marketing: Games and Virtual Worlds in Product Promotion
Metaverse Marketing: Games and Virtual Worlds in Product Promotion
 
10 reasons your marketing should be human
10 reasons your marketing should be human10 reasons your marketing should be human
10 reasons your marketing should be human
 
How to stand out as a brand in 2016 and beyond
How to stand out as a brand in 2016 and beyondHow to stand out as a brand in 2016 and beyond
How to stand out as a brand in 2016 and beyond
 
How to build a marketing plan 2015
How to build a marketing plan 2015How to build a marketing plan 2015
How to build a marketing plan 2015
 
CELEBRATE CREATIVITY
CELEBRATE CREATIVITYCELEBRATE CREATIVITY
CELEBRATE CREATIVITY
 

Último

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 

Último (20)

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 

L Rparser Edos

  • 1. LR Parsers Canonical Collection LR
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10. Example: G is a grammar with start symbol E E  E + T E  T T  T/F T  F F  (E) F  id
  • 11. G’ is the augmented grammar with a new start symbol E’ E’  E E  E + T E  T T  T/F T  F F  (E) F  id Blue nucleous
  • 12. Closure(E’) E’  ♥E Blue nucleous
  • 13. Closure(E) E’  ♥E E  ♥ E + T E  ♥ T
  • 14. Closure(T) E’  ♥E E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F
  • 15. Closure(F) E’  ♥E E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id
  • 16. State 1 E’  ♥E E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id
  • 17. State 2=GoTo(1,E) E’  ♥E E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id E’  E♥ E  E♥ + T
  • 18. State 3 =GoTo(1,T) E’  ♥E E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id E’  E♥ E  E♥ + T E’  T♥ T  T♥ /F
  • 19. State 4=GoTo(1,F) E’  ♥E E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id E’  E♥ E  E♥ + T E’  T♥ T  T♥ /F T  F ♥
  • 20. State 5: from state 1 with ( E’  ♥E E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id E’  E♥ E  E♥ + T E’  T♥ T  T♥ /F T  F ♥ F  (♥E) E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id
  • 21. State 6:from state1 with id E’  ♥E E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id E’  E♥ E  E♥ + T E’  T♥ T  T♥ /F T  F ♥ F  (♥E) E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id F  id ♥
  • 22. States 1,2 ,3,4,5,6 E’  ♥E E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id E’  E♥ E  E♥ + T E’  T♥ T  T♥ /F T  F ♥ F  (♥E) E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id F  id ♥
  • 23. States 7,8,9 E’  ♥E E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id E’  E♥ E  E♥ + T E’  T♥ T  T♥ /F T  F ♥ F  (♥E) E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id F  id ♥ E’  E+♥T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id T’  T/♥F F  ♥ (E) F  ♥ id F  (E♥) E  E♥+T
  • 24. States 10,11,12 E’  ♥E E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id E’  E♥ E  E♥ + T E’  T♥ T  T♥ /F T  F ♥ F  (♥E) E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id F  id ♥ E’  E+♥T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id T’  T/♥F F  ♥ (E) F  ♥ id F  (E♥) E  E♥+T E’  E+T♥ T  T ♥ /F T’  T/F♥ F  (E)♥
  • 25. States 1,2,3,4,... 12 E’  ♥E E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id E’  E♥ E  E♥ + T E’  T♥ T  T♥ /F T  F ♥ F  (♥E) E  ♥ E + T E  ♥ T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id F  id ♥ E’  E+♥T T  ♥ T/F T  ♥ F F  ♥ (E) F  ♥ id T’  T/♥F F  ♥ (E) F  ♥ id F  (E♥) E  E♥+T E’  E+T♥ T  T ♥ /F T’  T/F♥ F  (E)♥