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

org.vesalainen.grammar.Eof Maven / Gradle / Ivy

Go to download

Java Lookahead Parser Generator. Generator produces LALR(k) parsers. Grammar rules are entered using annotations. Rule annotation can be attached to reducer method, which keeps rule and it's action together.

The newest version!
package org.vesalainen.grammar;

import java.io.IOException;
import org.vesalainen.parser.util.HtmlPrinter;
import org.vesalainen.regex.Regex.Option;

public class Eof extends GTerminal
{

    public Eof()
    {
        super(0, "Eof");
    }

    /**
     * Makes terminal act like eof. This is used in sub-grammars.
     * @param terminal 
     */
    Eof(int number, String name, String expression, int priority, int base, boolean whiteSpace, Option... options)
    {
        super(number, "Eof("+name+")", expression, priority, base, whiteSpace, "", options);
    }
    
    @Override
    public boolean isEof()
    {
        return true;
    }

    @Override
    public String toString()
    {
        return "Eof";
    }

    @Override
    public void print(HtmlPrinter p) throws IOException
    {
        p.print("Eof");
    }

    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy