Preview

Typography and Keyword End

Satisfactory Essays
Open Document
Open Document
470 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Typography and Keyword End
Exercise 1 Give a BNF grammar for each of the languages below. For example, a correct answer for “the set of all strings consisting of zero or more concatenated copies of the string ab” would be this grammar: ::= ab |
There are often many correct answers.
a. The set of all strings consisting of zero or more as.
b. The set of all strings consisting of an uppercase letter followed by zero or more additional characters, each of which is either an uppercase letter or one of the digits 0 through 9.
c. The set of all strings consisting of one or more as.
d. The set of all strings consisting of one or more digits. (Each digit is one of the characters 0 through 9.)
e. The set of all strings consisting of zero or more as with a semicolon after each one.
f. The set of all strings consisting of the keyword begin, followed by zero or more statements with a semicolon after each one, followed by the keyword end. Use the non-terminal for statements, and do not give productions for it.
g. The set of all strings consisting of one or more as with a semicolon after each one.
h. The set of all strings consisting of the keyword begin, followed by one or more statements with a semicolon after each one, followed by the keyword end. Use the non-terminal for statements, and do not give productions for it.
i. The set of all strings consisting of one or more as, with a comma between each a and the next. (There should be no comma before the first or after the last.)
j. The set of all strings consisting of an open bracket (the symbol [) followed by a list of one or more digits separated by commas, followed by a closing bracket (the symbol ]).
k. The set of all strings consisting of zero or more as, with a comma between each a and the next. (There should be no comma before the first or after the last.)
l. The set of all strings consisting of an open bracket (the symbol [) followed by a list of zero or more digits separated by commas, followed by a closing bracket (the

You May Also Find These Documents Helpful

  • Powerful Essays

    Nt1330 Unit 4

    • 3225 Words
    • 13 Pages

    Identify the letter of the choice that best completes the statement or answers the question.…

    • 3225 Words
    • 13 Pages
    Powerful Essays
  • Satisfactory Essays

    For instance, one of the strings in the set aS(a^(-1) ) may be 〗aa^(-1) b which, because of the “forbidden” rule that I discussed earlier which states that a must not appear next to a^(-1), aa^(-1)gets cancelled and reduced to the string b. Similarly, the set contains all the strings that start with 〗a^(-1) (for example the string 〗〖aa〗^(-1) a^(-1) which reduces to〗〖 a〗^(-1)). In this way, the set aS(a^(-1) ) contains all the strings that start with b, b^(-1) and〖 a〗^(-1).…

    • 493 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    c. A device that works with binary data is called a DIGITAL device. (pg. 11)…

    • 388 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    4. The form of the verb that we translate into English as ‘to be’ is called an ___________________.…

    • 743 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    graph poop

    • 802 Words
    • 8 Pages

    Identify the letter of the choice that best completes the statement or answers the question.…

    • 802 Words
    • 8 Pages
    Satisfactory Essays
  • Good Essays

    For each of the following definitions, indicate the key term from the list above that best matches by placing the appropriate letter in the blank space next to the definition.…

    • 2163 Words
    • 9 Pages
    Good Essays
  • Powerful Essays

    c. Nominal: Variable with values that are categories (that is, they are names rather than numbers). Also called categorical variables (Aron, 2013).…

    • 1224 Words
    • 5 Pages
    Powerful Essays
  • Good Essays

    AP Vocab List 1

    • 711 Words
    • 21 Pages

    8. hiatus (n) a gap, opening, break (in the sense of having an element missing)…

    • 711 Words
    • 21 Pages
    Good Essays
  • Good Essays

    c. An arrangement of pieces in a circular shape that represents the component parts of a single group or variable…

    • 460 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    migrations , south and west regions increase growth after 1950 , higher rate more demand.…

    • 431 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Adam Smith Outline

    • 420 Words
    • 2 Pages

    d. it is common to all men, and to be found in no other race of animals, which seem to know neither this nor any other species of contracts…

    • 420 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    java answers

    • 15737 Words
    • 160 Pages

    Building Java Programs 2nd edition Exercise Solutions Chapter 1 Chapter 2 Chapter 3a Chapter 3 G Supplement Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 Chapter 10 Chapter 11 Chapter 12 Chapter 15 Chapter 16 Chapter 17 Chapter 1 Exercise 1.1: Stewie public class Stewie { public static void main(String[] args) { System.out.println("//////////////////////"); System.out.println("|| Victory is mine! ||"); System.out.println("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"); } } Exercise 1.2: Spikey public class Spikey { public static void main(String[] args) { System.out.println(" \\/"); System.out.println(" \\\\//"); System.out.println("\\\\\\///"); System.out.println("///\\\\\\"); System.out.println(" //\\\\"); System.out.println(" /\\"); } } Exercise 1.3: WellFormed public class WellFormed { public static void main(String[] args) { System.out.println("A well-formed Java program has"); System.out.println("a main method with { and }"); System.out.println("braces."); System.out.println(); System.out.println("A System.out.println statement"); System.out.println("has ( and ) and usually a");…

    • 15737 Words
    • 160 Pages
    Powerful Essays
  • Satisfactory Essays

    Set Theory

    • 578 Words
    • 3 Pages

    A Venn diagram usually is a drawing, in which circular areas represent groups of items sharing common properties. The drawing consists of two or more circles, each representing a specific group or set. This process of visualizing logical relationships was devised by John Venn (1834-1923).…

    • 578 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    K12 Math Grade 7

    • 1113 Words
    • 5 Pages

    So the empty set really has just 1 subset (which is itself, the empty set).…

    • 1113 Words
    • 5 Pages
    Good Essays
  • Good Essays

    For each term below, find the best definition from the list on the right. Enter the correct definition’s answer letter on the term’s blank line.…

    • 1582 Words
    • 7 Pages
    Good Essays

Related Topics