SlideShare une entreprise Scribd logo
1  sur  1
Télécharger pour lire hors ligne
Using the parboiled Java library, implement the question 4 in the
Quiz 3. Please note that you had already designed the grammar of that
question.
Write a BNF grammar for the language of US address with the format of street number street
name, city, zip code (only five digits), state (two letters), country name. [25 pts]
Examples:
3609 Mynders Ave, Memphis, 38111, TN, United States of America
240 Pryor St, Little Rock, 71934, AR, United States of America
When your program receives an address in the mentioned format above, it
should run using the grammar without any errors and draw the parse tree.
When submitting, include screenshots of the input and output (parse tree)
Question 4 in Quiz 3:
Write a BNF grammar for the language of US address with the format of street number street
name, city, zip code (only four digits), state (two letters), country name.
Answer:
: :=
: :=: :=* |* : :=: :=: :=: :=: :=[a-z]
: :=[A-Z]
: :=[0-9]
: :=
: := []*
________________________________________
Please include the code and the output of the code, thank you.

Contenu connexe

Plus de amirthagiftsmadurai

using the code below write the public V add(K key, V value); that ad.pdf
using the code below write the public V add(K key, V value); that ad.pdfusing the code below write the public V add(K key, V value); that ad.pdf
using the code below write the public V add(K key, V value); that ad.pdf
amirthagiftsmadurai
 
Using the Ceasar Cipher encryption algorithm, you take each characte.pdf
Using the Ceasar Cipher encryption algorithm, you take each characte.pdfUsing the Ceasar Cipher encryption algorithm, you take each characte.pdf
Using the Ceasar Cipher encryption algorithm, you take each characte.pdf
amirthagiftsmadurai
 
Warren Buffy is an enormously wealthy investor who has built his for.pdf
Warren Buffy is an enormously wealthy investor who has built his for.pdfWarren Buffy is an enormously wealthy investor who has built his for.pdf
Warren Buffy is an enormously wealthy investor who has built his for.pdf
amirthagiftsmadurai
 
Vincent van Gogh es uno de los artistas postimpresionistas m�s conoc.pdf
Vincent van Gogh es uno de los artistas postimpresionistas m�s conoc.pdfVincent van Gogh es uno de los artistas postimpresionistas m�s conoc.pdf
Vincent van Gogh es uno de los artistas postimpresionistas m�s conoc.pdf
amirthagiftsmadurai
 

Plus de amirthagiftsmadurai (20)

using the code below write the public V add(K key, V value); that ad.pdf
using the code below write the public V add(K key, V value); that ad.pdfusing the code below write the public V add(K key, V value); that ad.pdf
using the code below write the public V add(K key, V value); that ad.pdf
 
Using the Ceasar Cipher encryption algorithm, you take each characte.pdf
Using the Ceasar Cipher encryption algorithm, you take each characte.pdfUsing the Ceasar Cipher encryption algorithm, you take each characte.pdf
Using the Ceasar Cipher encryption algorithm, you take each characte.pdf
 
Using the accidentdata dataset how to conduct a comprehensive EDA .pdf
Using the accidentdata dataset  how to conduct a comprehensive EDA .pdfUsing the accidentdata dataset  how to conduct a comprehensive EDA .pdf
Using the accidentdata dataset how to conduct a comprehensive EDA .pdf
 
Vuelva a resolver el problema 15 de la secci�n 2.2 de su texto, que .pdf
Vuelva a resolver el problema 15 de la secci�n 2.2 de su texto, que .pdfVuelva a resolver el problema 15 de la secci�n 2.2 de su texto, que .pdf
Vuelva a resolver el problema 15 de la secci�n 2.2 de su texto, que .pdf
 
Vuelve a escribir las oraciones usando los verbos provistos entre pa.pdf
Vuelve a escribir las oraciones usando los verbos provistos entre pa.pdfVuelve a escribir las oraciones usando los verbos provistos entre pa.pdf
Vuelve a escribir las oraciones usando los verbos provistos entre pa.pdf
 
We aim to upgrade the function �insert� of the class orderedLinkedLi.pdf
We aim to upgrade the function �insert� of the class orderedLinkedLi.pdfWe aim to upgrade the function �insert� of the class orderedLinkedLi.pdf
We aim to upgrade the function �insert� of the class orderedLinkedLi.pdf
 
Verdadero o falso 7. Los errores son errores no intencionales. .pdf
Verdadero o falso 7. Los errores son errores no intencionales. .pdfVerdadero o falso 7. Los errores son errores no intencionales. .pdf
Verdadero o falso 7. Los errores son errores no intencionales. .pdf
 
Verdadero o falso todas las especies, independientemente de los tax.pdf
Verdadero o falso todas las especies, independientemente de los tax.pdfVerdadero o falso todas las especies, independientemente de los tax.pdf
Verdadero o falso todas las especies, independientemente de los tax.pdf
 
Warren Buffy is an enormously wealthy investor who has built his for.pdf
Warren Buffy is an enormously wealthy investor who has built his for.pdfWarren Buffy is an enormously wealthy investor who has built his for.pdf
Warren Buffy is an enormously wealthy investor who has built his for.pdf
 
Watch Podcast SpanxWrite a response to the podcast using the cor.pdf
Watch Podcast SpanxWrite a response to the podcast using the cor.pdfWatch Podcast SpanxWrite a response to the podcast using the cor.pdf
Watch Podcast SpanxWrite a response to the podcast using the cor.pdf
 
Vincent van Gogh es uno de los artistas postimpresionistas m�s conoc.pdf
Vincent van Gogh es uno de los artistas postimpresionistas m�s conoc.pdfVincent van Gogh es uno de los artistas postimpresionistas m�s conoc.pdf
Vincent van Gogh es uno de los artistas postimpresionistas m�s conoc.pdf
 
Wanda, a retired electrical engineer, suffered a stroke, Her memorie.pdf
Wanda, a retired electrical engineer, suffered a stroke, Her memorie.pdfWanda, a retired electrical engineer, suffered a stroke, Her memorie.pdf
Wanda, a retired electrical engineer, suffered a stroke, Her memorie.pdf
 
W1X2Y3ZA chemolithoautotroph uses as an energy source, as an electr.pdf
W1X2Y3ZA chemolithoautotroph uses as an energy source, as an electr.pdfW1X2Y3ZA chemolithoautotroph uses as an energy source, as an electr.pdf
W1X2Y3ZA chemolithoautotroph uses as an energy source, as an electr.pdf
 
Verdadero Falso. Dado que Yt es una serie de tiempo multivariante, s.pdf
Verdadero Falso. Dado que Yt es una serie de tiempo multivariante, s.pdfVerdadero Falso. Dado que Yt es una serie de tiempo multivariante, s.pdf
Verdadero Falso. Dado que Yt es una serie de tiempo multivariante, s.pdf
 
VR systemsGroup of answer choicesconsolidate mixed-media traini.pdf
VR systemsGroup of answer choicesconsolidate mixed-media traini.pdfVR systemsGroup of answer choicesconsolidate mixed-media traini.pdf
VR systemsGroup of answer choicesconsolidate mixed-media traini.pdf
 
Using Python #2 Fifty Ask the user to enter a number and tell them .pdf
Using Python #2 Fifty Ask the user to enter a number and tell them .pdfUsing Python #2 Fifty Ask the user to enter a number and tell them .pdf
Using Python #2 Fifty Ask the user to enter a number and tell them .pdf
 
verdadero o falso Al preparar el estado de flujos de efectivo, no .pdf
verdadero o falso Al preparar el estado de flujos de efectivo, no .pdfverdadero o falso Al preparar el estado de flujos de efectivo, no .pdf
verdadero o falso Al preparar el estado de flujos de efectivo, no .pdf
 
Verdadero o falso1.La m�dula espinal es parte del sistema nervioso.pdf
Verdadero o falso1.La m�dula espinal es parte del sistema nervioso.pdfVerdadero o falso1.La m�dula espinal es parte del sistema nervioso.pdf
Verdadero o falso1.La m�dula espinal es parte del sistema nervioso.pdf
 
Verdadero o falso 1. El esp�ritu empresarial abarca m�s que solo i.pdf
Verdadero o falso 1. El esp�ritu empresarial abarca m�s que solo i.pdfVerdadero o falso 1. El esp�ritu empresarial abarca m�s que solo i.pdf
Verdadero o falso 1. El esp�ritu empresarial abarca m�s que solo i.pdf
 
Vaughn v. Edel answer the following questions.1). Do you agree w.pdf
Vaughn v. Edel answer the following questions.1). Do you agree w.pdfVaughn v. Edel answer the following questions.1). Do you agree w.pdf
Vaughn v. Edel answer the following questions.1). Do you agree w.pdf
 

Dernier

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Dernier (20)

ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 

Using the parboiled Java library, implement the question 4 in the .pdf

  • 1. Using the parboiled Java library, implement the question 4 in the Quiz 3. Please note that you had already designed the grammar of that question. Write a BNF grammar for the language of US address with the format of street number street name, city, zip code (only five digits), state (two letters), country name. [25 pts] Examples: 3609 Mynders Ave, Memphis, 38111, TN, United States of America 240 Pryor St, Little Rock, 71934, AR, United States of America When your program receives an address in the mentioned format above, it should run using the grammar without any errors and draw the parse tree. When submitting, include screenshots of the input and output (parse tree) Question 4 in Quiz 3: Write a BNF grammar for the language of US address with the format of street number street name, city, zip code (only four digits), state (two letters), country name. Answer: : := : :=: :=* |* : :=: :=: :=: :=: :=[a-z] : :=[A-Z] : :=[0-9] : := : := []* ________________________________________ Please include the code and the output of the code, thank you.