All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.ppg.generator.ByteLiteral Maven / Gradle / Ivy

There is a newer version: 10.0.0.Beta3
Show newest version
package org.infinispan.ppg.generator;

import java.util.List;
import java.util.Set;

class ByteLiteral implements Element {
   private final int value;

   public ByteLiteral(int value) {
      this.value = value;
   }

   @Override
   public String toString() {
      return String.format("0x%02X", value);
   }

   @Override
   public void addReferences(Set references) {
   }

   @Override
   public Machine.State addStates(Machine.State prev, Machine.State target, Machine machine, Grammar grammar, List ruleStack) {
      return prev.requireReadByte(String.valueOf(value), target);
   }

   @Override
   public String analyzeType(Grammar grammar) {
      return "byte";
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy