Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problems is to write a parser for a customer form. You need to develop a Java application using Parboiled library. Your program should include a

Problems 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.

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

Database Theory Icdt 97 6th International Conference Delphi Greece January 8 10 1997 Proceedings Lncs 1186

Authors: Foto N. Afrati ,Phokion G. Kolaitis

1st Edition

3540622225, 978-3540622222

More Books

Students also viewed these Databases questions

Question

What is the reasonable man or prudent person standard?

Answered: 1 week ago

Question

3. To retrieve information from memory.

Answered: 1 week ago