Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Develop a Java application using Parboiled library to write a parser for a customer form. Your program should include a grammar for the parser and

Develop a Java application using Parboiled library to write a parser for a customer form. Your program should include a grammar for the parser and display the parse tree with no errors.

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.

Example:

John Doe

3609 Mynders Ave, Memphis, TN, United States of America

(901) 345-9834

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

More Books

Students also viewed these Databases questions