All Packages Class Hierarchy This Package Previous Next Index
Class aioli.ppml.Compile
java.lang.Object
|
+----antlr.Parser
|
+----antlr.LLkParser
|
+----aioli.ppml.Compile
- public class Compile
- extends LLkParser
- implements ppmlTokenTypes
This class has been automatically generated by the antlr Tool.
It compiles a metal file and generates two files BBstd.java
and PPstd.java that are in the packacke lang.language_name.
To run the compiler just call
java aioli.ppml.Compile file.ppml
Here is an example of a ppml specification for the toy language:
prettyprinter std of toy is
x!0 -> "...";
tlist[*x,**y,*z] -> [ *z "a" ("b" **y "c") *x];
app(*x, *y) ->
[
"(" [ in class = left : [ *x] in class = right : [ *y]]
")"];
abs(*x, *y) -> [ "(" [ [ "lambda" [ *x "."]] *y] ")"];
var *x -> [ identitypp(*x)];
null1() -> [ "()"];
null2() -> [ "0"];
end prettyprinter
-
_tokenNames
-
-
_tokenSet_0
-
-
_tokenSet_1
-
-
_tokenSet_10
-
-
_tokenSet_11
-
-
_tokenSet_12
-
-
_tokenSet_13
-
-
_tokenSet_14
-
-
_tokenSet_15
-
-
_tokenSet_16
-
-
_tokenSet_17
-
-
_tokenSet_18
-
-
_tokenSet_19
-
-
_tokenSet_2
-
-
_tokenSet_20
-
-
_tokenSet_21
-
-
_tokenSet_22
-
-
_tokenSet_3
-
-
_tokenSet_4
-
-
_tokenSet_5
-
-
_tokenSet_6
-
-
_tokenSet_7
-
-
_tokenSet_8
-
-
_tokenSet_9
-
-
Compile(TokenBuffer)
-
-
Compile(Tokenizer)
-
-
addOperator(String)
-
-
args()
-
-
box()
-
-
bsons()
-
-
bsonsv()
-
-
bvar()
-
-
bvar1()
-
-
combinator()
-
-
cpattern(Formalism)
-
-
ext(Rules)
-
-
farg()
-
-
fargs()
-
-
fname()
-
-
fun(boolean)
-
-
getAnnot(String)
-
-
getContext(String)
-
-
initAVector()
-
-
initCVector()
-
-
initOperator()
-
-
main(String[])
-
-
nodename()
-
-
pattern(Formalism)
-
-
program()
-
-
psons(Formalism)
-
-
pvar()
-
-
rule(Formalism)
-
-
sint()
-
_tokenNames
public static final String _tokenNames[]
_tokenSet_0
public static final BitSet _tokenSet_0
_tokenSet_1
public static final BitSet _tokenSet_1
_tokenSet_2
public static final BitSet _tokenSet_2
_tokenSet_3
public static final BitSet _tokenSet_3
_tokenSet_4
public static final BitSet _tokenSet_4
_tokenSet_5
public static final BitSet _tokenSet_5
_tokenSet_6
public static final BitSet _tokenSet_6
_tokenSet_7
public static final BitSet _tokenSet_7
_tokenSet_8
public static final BitSet _tokenSet_8
_tokenSet_9
public static final BitSet _tokenSet_9
_tokenSet_10
public static final BitSet _tokenSet_10
_tokenSet_11
public static final BitSet _tokenSet_11
_tokenSet_12
public static final BitSet _tokenSet_12
_tokenSet_13
public static final BitSet _tokenSet_13
_tokenSet_14
public static final BitSet _tokenSet_14
_tokenSet_15
public static final BitSet _tokenSet_15
_tokenSet_16
public static final BitSet _tokenSet_16
_tokenSet_17
public static final BitSet _tokenSet_17
_tokenSet_18
public static final BitSet _tokenSet_18
_tokenSet_19
public static final BitSet _tokenSet_19
_tokenSet_20
public static final BitSet _tokenSet_20
_tokenSet_21
public static final BitSet _tokenSet_21
_tokenSet_22
public static final BitSet _tokenSet_22
Compile
public Compile(TokenBuffer tokenBuf)
Compile
public Compile(Tokenizer lexer)
initCVector
public static void initCVector()
initAVector
public static void initAVector()
getContext
public int getContext(String str)
getAnnot
public int getAnnot(String str)
initOperator
public static void initOperator()
addOperator
public void addOperator(String str)
main
public static void main(String args[]) throws Exception
program
public final Rules program() throws ParserException, IOException
ext
public final void ext(Rules rules) throws ParserException, IOException
rule
public final Rule rule(Formalism fm) throws ParserException, IOException
cpattern
public final CPattern cpattern(Formalism fm) throws ParserException, IOException
box
public final Box box() throws ParserException, IOException
pattern
public final Pattern pattern(Formalism fm) throws ParserException, IOException
fun
public final Fun fun(boolean b) throws ParserException, IOException
pvar
public final Pattern pvar() throws ParserException, IOException
nodename
public final String nodename() throws ParserException, IOException
psons
public final PSons psons(Formalism fm) throws ParserException, IOException
fname
public final String fname() throws ParserException, IOException
fargs
public final Fargs fargs() throws ParserException, IOException
farg
public final Fargs farg() throws ParserException, IOException
sint
public final int sint() throws ParserException, IOException
bvar
public final Box bvar() throws ParserException, IOException
bvar1
public final Box bvar1() throws ParserException, IOException
bsons
public final BSons bsons() throws ParserException, IOException
combinator
public final Combinator combinator() throws ParserException, IOException
bsonsv
public final BSons bsonsv() throws ParserException, IOException
args
public final Args args() throws ParserException, IOException
All Packages Class Hierarchy This Package Previous Next Index