module analysis::grammars::dramb::DrAmbiguity
rascal-0.40.17
drambiguity-0.3.5
Usage
import analysis::grammars::dramb::DrAmbiguity;
Source code
http://github.com/cwi-swat/drambiguity/blob/main/src/analysis/grammars/dramb/DrAmbiguity.rsc
Dependencies
extend analysis::grammars::dramb::Model;
import DateTime;
import salix::Core;
import salix::HTML;
import salix::Node;
import salix::Index;
import salix::App;
import salix::util::WithPopups;
import salix::lib::Bootstrap;
import lang::rascal::format::Grammar;
import ParseTree;
import IO;
import List;
import Set;
import String;
import Boolean;
import util::Math;
import analysis::grammars::dramb::Simplify;
import analysis::grammars::dramb::GenerateTrees;
import analysis::grammars::dramb::Popups;
import analysis::grammars::dramb::Detection;
import util::Reflective;
import analysis::grammars::dramb::Util;
import Grammar;
import analysis::grammars::dramb::Diagnose;
import analysis::grammars::dramb::Brackets;
import analysis::grammars::dramb::GrammarEditor;
import util::Maybe;
import ValueIO;
import vis::Text;
function drAmbiguity
Start DrAmbiguity with a fresh grammar and an example input sentence.
App[Model] drAmbiguity(type[&T <: Tree] grammar, loc input)
function drAmbiguity
Continue DrAmbiguity with a previously saved project.
App[Model] drAmbiguity(loc project)
function drAmbiguity
Start DrAmbiguity with a fresh grammar and an example input sentence.
App[Model] drAmbiguity(type[&T <: Tree] grammar, str input)
function drAmbiguity
Start DrAmbiguity with a fresh grammar and no input sentence yet.
App[Model] drAmbiguity(type[&T <: Tree] grammar)
function drAmbiguity
Start DrAmbiguity with a fresh grammar and a corresponding example (ambiguous) example tree.
App[Model] drAmbiguity(type[&T <: Tree] grammar, &T input)
function drAmbiguity
This is the internal work horse that boots up the Salix application that is called DrAmbiguity.
App[Model] drAmbiguity(Model m, str id="DrAmbiguity")
function docDrAmbiguity
App[Model] docDrAmbiguity(Model m)
data Msg
data Msg
= labels()
| literals()
| \layout()
| chars()
| focus()
| simplify()
| freshSentence()
| newInput(str x)
| selectExample(int count)
| removeExample(int count)
| changeGenerationEffort(int count)
| storeInput()
| newGrammar(str x)
| commitGrammar(int selector)
| setStartNonterminal(Symbol s)
| clearErrors()
| removeGrammar(int count)
| saveProject(loc file)
| loadProject(loc file)
| filename(loc file)
| nofilename()
| commitMessage(str msg)
| setTab(Tab t)
;
function update
Model update(setTab(Tab t), Model m)
Model update(clearErrors(), Model m)
Model update(labels(), Model m)
Model update(literals(), Model m)
Model update(\layout(), Model m)
Model update(Msg::chars(), Model m)
Model update(Msg::focus(), Model m)
Model update(Msg::filename(loc f), Model m)
Model update(nofilename(), Model m)
Model update(commitMessage(str msg), Model m)
Model update(removeGrammar(int count), Model m)
Model update(loadProject(loc f), Model m)
Model update(saveProject(loc f), Model m)
Model update(selectExample(int count), Model m)
Model update(removeExample(int count), Model m)
Model update(changeGenerationEffort(int count), Model m)
Model update(newGrammar(str x), Model m)
function status
str status(nothing())
str status(just(Tree x))
default str status(just(Tree x))
function update
Model update(storeInput(), Model m)
Model update(setStartNonterminal(Symbol s), Model m)
Model update(Msg::commitGrammar(int selector), Model m)
Model update(newInput(str new), Model m)
Model update(Msg::simplify(), Model m)
Model update(Msg::freshSentence(), Model m)
function freshSentences
Model freshSentences(Model m)
function graphic
void graphic(Model m)
function onNewSentenceInput
Msg onNewSentenceInput(str t)
function onNewGrammarInput
Msg onNewGrammarInput(str t)
function onTab
Msg onTab(Tab t)
function view
void view(Model m)
function onCommitMessageInput
Msg onCommitMessageInput(str m)
function grammarPane
void grammarPane(Model m)
function newAmountInput
Msg newAmountInput(str i)
function loadProjectInput
Msg loadProjectInput(str file)
function onProjectNameInput
Msg onProjectNameInput(str f)
function fileUI
void fileUI(Model m)
function inputPane
void inputPane(Model m)
function focusButton
void focusButton()
function simplifyButton
void simplifyButton()
function graphicPane
void graphicPane(Model m)
function focus
Model focus(Model m)
function prodlabel
str prodlabel(regular(Symbol s))
str prodlabel(prod(label(str x,_),_,_))
str prodlabel(prod(_, list[Symbol] args:[*_,lit(_),*_],_))
default str prodlabel(prod(Symbol s, _,_ ))