Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your assignment is to use Java to write a recursive descent parser for a simplified HTML language. The lexical syntax is specified by regular expressions

image text in transcribed

image text in transcribed

image text in transcribed

Your assignment is to use Java to write a recursive descent parser for a simplified HTML language. The lexical syntax is specified by regular expressions definition Token Extended regular e STRING (LETTER | DIGIT)+ KEYWORD | | In the above, LETTER is any lower or upper-case letter and DIGIT is any digit. An arbitrary number of whitespace can appear between tokens. You may already know that . is the tag for bolded text in HTML, .. . for italicized text,
    .. .
for an uordered list and
  • . .
  • for a list item. Note in the above syntax we use a notation for non-terminals that is different from the notation we used in lectures. The reason is that symbols for non-terminals. Instead, we use names in upper-case letters for non-terminals. Therefore, in the above token syntax, KEYWORD is a non terminal, while is a string of terminals that starts with terminal Using the same notation, the syntax of the simplified HTML language is specified by the following E-BNF grammar, where WEBPAGE is the start non-terminal: WEBPAGE-> TEXT TEXT-> STRING | TEXT I TEXT |
      { LISTITEM }
    LISTITEM -
  • TEXT 1i> Note that and are meta-symbols in E-BNF An example expression in the language is as follows: google yahoo/x/i/> This programming project is broken down into the following series of tasks. Your assignment is to use Java to write a recursive descent parser for a simplified HTML language. The lexical syntax is specified by regular expressions definition Token Extended regular e STRING (LETTER | DIGIT)+ KEYWORD | | In the above, LETTER is any lower or upper-case letter and DIGIT is any digit. An arbitrary number of whitespace can appear between tokens. You may already know that . is the tag for bolded text in HTML, .. . for italicized text,
      .. .
    for an uordered list and
  • . .
  • for a list item. Note in the above syntax we use a notation for non-terminals that is different from the notation we used in lectures. The reason is that symbols for non-terminals. Instead, we use names in upper-case letters for non-terminals. Therefore, in the above token syntax, KEYWORD is a non terminal, while is a string of terminals that starts with terminal Using the same notation, the syntax of the simplified HTML language is specified by the following E-BNF grammar, where WEBPAGE is the start non-terminal: WEBPAGE-> TEXT TEXT-> STRING | TEXT I TEXT |
      { LISTITEM }
    LISTITEM -
  • TEXT 1i> Note that and are meta-symbols in E-BNF An example expression in the language is as follows: google yahoo/x/i/> This programming project is broken down into the following series of tasks
  • 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

    Oracle 10g Database Administrator Implementation And Administration

    Authors: Gavin Powell, Carol McCullough Dieter

    2nd Edition

    1418836656, 9781418836658

    More Books

    Students also viewed these Databases questions

    Question

    How would you assess the value of an approach like this?

    Answered: 1 week ago

    Question

    When would you use one approach, and when would you use another?

    Answered: 1 week ago

    Question

    3. How would this philosophy fit in your organization?

    Answered: 1 week ago