1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
solmaris [256]
3 years ago
8

What are attribute grammars used for?

Computers and Technology
1 answer:
umka21 [38]3 years ago
4 0

Explanation:

Attribute Grammars were invented by Don Knuth as a way to unify all of the stages of compiling into one. An attribute grammar links syntax with semantics and have values that hold semantic information about the (non)terminal.  

<em>They can perform several functions in specifying the syntax and semantics of a programming language, they can specify the context-sensitive aspects of the syntax of a language and operational semantics of a programming language.</em>

I hope you find this information useful and interesting! Good luck!

You might be interested in
If you wanted to include a chart in the new slide you are getting ready to create, you would most likely
torisob [31]

Answer:

select the insert slide dropdown box, then select a slide with a chart placeholder

Explanation:

8 0
3 years ago
Jerry has received an email on his company’s email system. The email is in regard to a new update the company plans to implement
Alla [95]

Answer:

The type of attack is <em>Phising Email.</em>

<em />

Explanation:

Phishing emails are mails purportedly sent by a company staff seeking some vital information from an employee or employees. Criminals often use such method to get sensitive information about a company and its details from its own employees who may not be able to differentiate such mails from the normal company mails. Thus the mail that Jerry receives regarding a new update the administrators of his company intends to implement can be regarded as a Phishing email.

5 0
3 years ago
This needs to be written in Java.
Slav-nsk [51]

Answer:

Here is Automobile.java

class Automobile {   //class name

   private int ID, year, milesPerGallon, speed = 0;   // private member variables of Automobile of int type

   private String model, vinNo, make, color;   // private member variables of Automobile of String type

   public void setID(int ID){   //mutator method to set ID

      if (ID >= 0 && ID <= 9999)  // checks ID should not be negative or more than 9999

      this.ID = ID;  

     else this.ID = 0;  }  //if ID is negative or greater than 9999 then set ID to 0

   public void setModel(String model){  // mutator method to set model

       this.model = model;      }  

   public void setYear(int year){// mutator method to set year

      if (year >= 2000 && year <= 2017) //checks that year should not be earlier than 2000 or later than 2017

         this.ID = ID;

       else this.year = 0;     } //if year is less than 2000 or greater than 2017 then set year to 0

   public void setVinNo(String vinNo){  //mutator method to set vin number

       this.vinNo = vinNo;      }

   public void setMilesPerGalon(int milesPerGallon){  //mutator method to set miles per gallon

      if (milesPerGallon >= 10 && year <= 60)  //checks that miles per gallon should not be less than 10 or more than 60

          this.milesPerGallon = milesPerGallon;

      else this.milesPerGallon = 0;      } //if it is more than 60 or less than 10 then set miles per gallon to 0

   public void setSpeed(int speed){ //mutator method to set speed

       this.speed = speed;      }

   public void setMake(String make){  //mutator method to set make

       this.make = make;    }

   public void setColor(String color){  //mutator method to set color

       this.color = color;    }

   public int getID() //accessor method to get or access ID

   {return ID;} //returns the current ID

   public String getModel() //accessor method to get or access model

   {return model;} //returns the current model

   public int getYear()// accessor method to get or access year

   {return year;} //returns the current year

   public String getVinNo() // accessor method to get or access vin number

   {return vinNo;} //returns the current vin number

   public int getMilesPerGallon() //accessor method to get or access miles per gallon

   {return milesPerGallon;} //returns the current miles per gallon

   public int getSpeed() //accessor method to get or access speed

   {return speed;} //returns the current speed

   public String getMake() //accessor method to get or access make

   {return make;} //returns the current make

   public String getColor() //accessor method to get or access color

   {return color;}    //returns the current color

  public int Accelerate() {  //method that increase speed by 5

      setSpeed(speed + 5); //calls set speed to add 5 to the speed field

      return speed;    } //returns the speed after increasing 5

  public int Brake() { //method that decreases speed by 5

      setSpeed(speed - 5);//calls set speed to subtract 5 from the speed field

      return speed;    } //returns the speed after decreasing 5

  public int Accelerate(int spd) {  //overloading methods for Accelerate()that accepts a single parameter spd

      setSpeed(speed + spd);  //increases speed up to specified value of spd

      return speed;    }

  public int Brake(int spd) {  //overloading methods for Brake()that accepts a single parameter spd

      setSpeed(speed - spd); //decreases speed up to specified value of spd

      return speed;    }

   public Automobile(int ID, String make, String model, int year, String vinNo, int milesPerGallon, int speed, String color){  //constructor  that accepts arguments for each field value and uses the set methods to assign the values

      setID(ID);  

      setModel(model);  

      setYear(year);  

      setVinNo(vinNo);

      setMilesPerGalon(milesPerGallon);  

      setSpeed(speed);  

      setMake(make);  

      setColor(color);      } }

Explanation:

Here is TestAutomobiles.java

public class TestAutomobiles {   //class name

  public static void main(String args[]) {  //start of main method

    Automobile auto = new Automobile(123, "ABC", "XYZ", 2010, "MMM", 30, 150, "White");   //creates an object of Automobile class and calls its constructor passing the values for each of the fields

 System.out.println("Initial Speed: " + auto.getSpeed());  //calls getSpeed method to get the current speed using object auto. The current speed is 150

 System.out.println("Speed after applying acceleration: " + auto.Accelerate());   //calls Accelerate() method to increase the current speed to 5

 System.out.println("Speed after applying brake: " + auto.Brake());  //calls Brake() method to decrease the current speed to 5

   System.out.println("Speed after applying acceleration: " + auto.Accelerate(180));  //calls overloading Accelerate() method to increase the current speed to 180

     System.out.println("Speed after applying brake: " + auto.Brake(50));     }  } //calls overloading Brake() method to decrease the current speed to 50

//The screenshot of the output of the program is attached.

5 0
3 years ago
The term ________ refers to fluid flow back to the pan to empty or drain a circuit.
Strike441 [17]

The term is: transmission flush

8 0
3 years ago
Which of the following is NOT AN EXAMPLE of personal identifying
alexgriva [62]

Answer:

Your Social security number .

Explanation:

  • Personal information is the information of. a person.
  • It includes The name,Address,number etc of the person .
  • the PAN,Debit and credit card number is also included .

6 0
3 years ago
Read 2 more answers
Other questions:
  • Write a full class definition for a class named Averager, and containing the following members:______An data member named sum of
    6·2 answers
  • Computer maker Dell realized the problems with keeping large inventories, especially because of the fast rate of obsolescence of
    7·1 answer
  • Reasons for the growth of decision-making systems include:
    13·1 answer
  • What is a short sequence of characters that appears at the end of a filename and is preceded by a period called __________
    5·1 answer
  • An interface does not have ____.
    13·1 answer
  • In this lab you will learn about the concept of Normal Forms for refining your database design. You will then apply the normaliz
    15·1 answer
  • Charlie makes pizza at a restaurant. The customers always compliment how great the pizza tastes. But Charlie takes a long time t
    7·2 answers
  • Explain any two features of a computer​
    15·1 answer
  • Name the first mechanical computer​
    11·1 answer
  • Amogus :0) owo have a good day y'all
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!