Search in sources :

Example 26 with RuntimeCodePage

use of priv.bajdcc.LALR1.grammar.runtime.RuntimeCodePage in project jMiniLang by bajdcc.

the class ModuleRemote method getCodePage.

@Override
public RuntimeCodePage getCodePage() throws Exception {
    if (runtimeCodePage != null)
        return runtimeCodePage;
    String base = ResourceLoader.load(getClass());
    Grammar grammar = new Grammar(base);
    RuntimeCodePage page = grammar.getCodePage();
    IRuntimeDebugInfo info = page.getInfo();
    buildRemoteMethods(info);
    return runtimeCodePage = page;
}
Also used : Grammar(priv.bajdcc.LALR1.grammar.Grammar)

Example 27 with RuntimeCodePage

use of priv.bajdcc.LALR1.grammar.runtime.RuntimeCodePage in project jMiniLang by bajdcc.

the class ModuleTask method getCodePage.

@Override
public RuntimeCodePage getCodePage() throws Exception {
    if (runtimeCodePage != null)
        return runtimeCodePage;
    String base = ResourceLoader.load(getClass());
    Grammar grammar = new Grammar(base);
    RuntimeCodePage page = grammar.getCodePage();
    IRuntimeDebugInfo info = page.getInfo();
    buildSystemMethod(info);
    buildUtilMethod(info);
    return runtimeCodePage = page;
}
Also used : Grammar(priv.bajdcc.LALR1.grammar.Grammar)

Example 28 with RuntimeCodePage

use of priv.bajdcc.LALR1.grammar.runtime.RuntimeCodePage in project jMiniLang by bajdcc.

the class ModuleFunction method getCodePage.

@Override
public RuntimeCodePage getCodePage() throws Exception {
    if (runtimeCodePage != null)
        return runtimeCodePage;
    String base = ResourceLoader.load(getClass());
    Grammar grammar = new Grammar(base);
    RuntimeCodePage page = grammar.getCodePage();
    IRuntimeDebugInfo info = page.getInfo();
    info.addExternalValue("g__", () -> new RuntimeObject(null));
    return runtimeCodePage = page;
}
Also used : RuntimeObject(priv.bajdcc.LALR1.grammar.runtime.RuntimeObject) Grammar(priv.bajdcc.LALR1.grammar.Grammar) RuntimeCodePage(priv.bajdcc.LALR1.grammar.runtime.RuntimeCodePage) IRuntimeDebugInfo(priv.bajdcc.LALR1.grammar.runtime.IRuntimeDebugInfo)

Example 29 with RuntimeCodePage

use of priv.bajdcc.LALR1.grammar.runtime.RuntimeCodePage in project jMiniLang by bajdcc.

the class ModuleLisp method getCodePage.

@Override
public RuntimeCodePage getCodePage() throws Exception {
    if (runtimeCodePage != null)
        return runtimeCodePage;
    String base = ResourceLoader.load(getClass());
    Grammar grammar = new Grammar(base);
    RuntimeCodePage page = grammar.getCodePage();
    IRuntimeDebugInfo info = page.getInfo();
    return runtimeCodePage = page;
}
Also used : Grammar(priv.bajdcc.LALR1.grammar.Grammar) RuntimeCodePage(priv.bajdcc.LALR1.grammar.runtime.RuntimeCodePage) IRuntimeDebugInfo(priv.bajdcc.LALR1.grammar.runtime.IRuntimeDebugInfo)

Example 30 with RuntimeCodePage

use of priv.bajdcc.LALR1.grammar.runtime.RuntimeCodePage in project jMiniLang by bajdcc.

the class ModuleProc method getCodePage.

@Override
public RuntimeCodePage getCodePage() throws Exception {
    if (runtimeCodePage != null)
        return runtimeCodePage;
    String base = ResourceLoader.load(getClass());
    Grammar grammar = new Grammar(base);
    RuntimeCodePage page = grammar.getCodePage();
    IRuntimeDebugInfo info = page.getInfo();
    buildMethod(info);
    buildPipeMethod(info);
    buildShareMethod(info);
    return runtimeCodePage = page;
}
Also used : Grammar(priv.bajdcc.LALR1.grammar.Grammar)

Aggregations

Grammar (priv.bajdcc.LALR1.grammar.Grammar)32 RuntimeCodePage (priv.bajdcc.LALR1.grammar.runtime.RuntimeCodePage)21 RuntimeException (priv.bajdcc.LALR1.grammar.runtime.RuntimeException)17 SyntaxException (priv.bajdcc.LALR1.syntax.handler.SyntaxException)16 RegexException (priv.bajdcc.util.lexer.error.RegexException)16 ByteArrayInputStream (java.io.ByteArrayInputStream)14 ByteArrayOutputStream (java.io.ByteArrayOutputStream)14 Interpreter (priv.bajdcc.LALR1.interpret.Interpreter)14 IRuntimeDebugInfo (priv.bajdcc.LALR1.grammar.runtime.IRuntimeDebugInfo)5 BigInteger (java.math.BigInteger)2 RuntimeMachine (priv.bajdcc.LALR1.grammar.runtime.RuntimeMachine)2 RuntimeObject (priv.bajdcc.LALR1.grammar.runtime.RuntimeObject)2 RuntimeFuncObject (priv.bajdcc.LALR1.grammar.runtime.data.RuntimeFuncObject)2 BufferedReader (java.io.BufferedReader)1 FileReader (java.io.FileReader)1 Scanner (java.util.Scanner)1 IRuntimeDebugExec (priv.bajdcc.LALR1.grammar.runtime.IRuntimeDebugExec)1 IRuntimeStatus (priv.bajdcc.LALR1.grammar.runtime.IRuntimeStatus)1 RuntimeArray (priv.bajdcc.LALR1.grammar.runtime.data.RuntimeArray)1 RuntimeMap (priv.bajdcc.LALR1.grammar.runtime.data.RuntimeMap)1