Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please show output in solution!! Your task for this project is to write a parser for a customer form. You need to develop a Java

Please show output in solution!!

Your task for this project is to write a parser for a customer form. You need to develop a Java application using Parboiled library. Your program should include a grammar for the parser and display the parse tree with no errors. Remember that your fourth and fifth assignments are very similar to this project and you can benefit from them.

The customer form should include the following structure:

First name, middle name (optional), last name Street address, city, state (or province), country Phone number

Rules

First name, middle name and last name should start with an uppercase letter followed by lower case letters. Middle name is an optional input meaning such an input may or may not exist.

The street address can include any type of letters or numbers. There is no lowercase/uppercase

restriction either.

The city name should start with an uppercase letter followed by lowercase/uppercase letters.

The state or province should start with an uppercase letter followed by lowercase/uppercase

letters.

The country name should start with an uppercase letter followed by lowercase/uppercase

letters.

The phone number should begin with area code in parenthesis, followed by a space, three digits,

a hyphen, and four digits.

Examples

Here are some input examples for your program:

John Doe 3609 Mynders Ave, Memphis, TN, United States of America (901) 345-9834

Joshua R. Clemens 982 Pryor St, Little Rock, AR, USA (501) 876-1234

Mary Smith 82 Main St., Toronto, Ontario, Canada (416) 509-6995

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

Students also viewed these Databases questions

Question

1 Why might people resist change?

Answered: 1 week ago

Question

1 . Television News channels importantance of our Life pattern ?

Answered: 1 week ago

Question

=+ Have they changed the way employers view IP?

Answered: 1 week ago