![JAR search and dependency download from the Maven repository](/logo.png)
org.modelcc.language.syntax.SyntaxSpecification Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ModelCC Show documentation
Show all versions of ModelCC Show documentation
ModelCC is a model-based parser generator (a.k.a. compiler compiler) that decouples language specification from language processing, avoiding some of the problems caused by grammar-driven parser generators. ModelCC receives a conceptual model as input, along with constraints that annotate it. It is then able to create a parser for the desired textual language and the generated parser fully automates the instantiation of the language conceptual model. ModelCC also includes a built-in reference resolution mechanism that results in abstract syntax graphs, rather than mere abstract syntax trees.
The newest version!
/*
* ModelCC, distributed under ModelCC Shared Software License, www.modelcc.org
*/
package org.modelcc.language.syntax;
import java.io.Serializable;
/**
* Syntactic specification.
*
* @author Luis Quesada ([email protected])
s */
public final class SyntaxSpecification implements Serializable {
/**
* Grammar.
*/
private Grammar grammar;
/**
* Constraints.
*/
private SyntaxConstraints constraints;
/**
* Constructor.
*/
public SyntaxSpecification()
{
this.grammar = null;
this.constraints = null;
}
/**
* Constructor.
* @param grammar the language grammar.
* @param constraints the language constraints.
*/
public SyntaxSpecification(Grammar grammar, SyntaxConstraints constraints)
{
this.grammar = grammar;
this.constraints = constraints;
}
// Getters & setters
public Grammar getGrammar()
{
return grammar;
}
public void setGrammar(Grammar grammar)
{
this.grammar = grammar;
}
public SyntaxConstraints getConstraints()
{
return constraints;
}
public void setConstraints(SyntaxConstraints constraints)
{
this.constraints = constraints;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy