Commit 1bd2689f authored by jfschaefer's avatar jfschaefer
Browse files

minor extensions to cover more examples for paper

parent 721efd67
......@@ -20,6 +20,8 @@ abstract FGrammar = MCats ** {
fstatement_to_statement : FStatement -> Statement;
fcomplexidentifier_to_identifer : FComplexIdentifier -> Identifier; -- mi ( n ) => $ mi ( cn ) $
fcid_fbinrel_fexpr_to_identifier : -- introduces one identifier (like in 1 < n < 10)
FComplexIdentifier -> FBinRelation -> FExpression -> Identifier;
fexpr_fbinrel_fcid_fbinrel_fexpr_to_identifier : -- introduces one identifier (like in 1 < n < 10)
FExpression -> FBinRelation -> FComplexIdentifier -> FBinRelation -> FExpression -> Identifier;
}
......@@ -10,7 +10,5 @@ concrete FGrammarEng of FGrammar = FGrammarI, MCatsEng, CatEng ** open Paradigms
_ => table { _ => table { _ => table { _ => "???" } } } } };
fcomplexidentifier_to_identifer fci = { s = "$" ++ fci ++ "$"; m = one };
fexpr_fbinrel_fcid_fbinrel_fexpr_to_identifier a r1 b r2 c =
{ s = "$" ++ (wrap_mml "mrow" (a ++ (wrap_mml "mo" r1) ++ b ++ (wrap_mml "mo" r2) ++ c)) ++ "$"; m = one };
-- mkMathCN_sg ("$" ++ (wrap_mml "mrow" (a ++ (wrap_mml "mo" r1) ++ b ++ (wrap_mml "mo" r2) ++ c)) ++ "$");
}
......@@ -18,4 +18,8 @@ incomplete concrete FGrammarI of FGrammar = {
fexpression_row expr = wrap_mml "mrow" expr;
apply_bin_rel rel a b = wrap_mml "mrow" (a ++ (wrap_mml "mo" rel) ++ b);
fcid_fbinrel_fexpr_to_identifier a r1 b =
{ s = "$" ++ (wrap_mml "mrow" (a ++ (wrap_mml "mo" r1) ++ b)) ++ "$"; m = one };
fexpr_fbinrel_fcid_fbinrel_fexpr_to_identifier a r1 b r2 c =
{ s = "$" ++ (wrap_mml "mrow" (a ++ (wrap_mml "mo" r1) ++ b ++ (wrap_mml "mo" r2) ++ c)) ++ "$"; m = one };
}
......@@ -23,6 +23,11 @@ concrete FGrammarLog of FGrammar = MCatsLog ** {
core = fci;
hasFormula = false;
};
fcid_fbinrel_fexpr_to_identifier a r1 b = {
formula = r1 ++ "(" ++ a ++ "," ++ b ++ ")";
core = b;
hasFormula = true;
};
fexpr_fbinrel_fcid_fbinrel_fexpr_to_identifier a r1 b r2 c = {
formula = r1 ++ "(" ++ a ++ "," ++ b ++ ")" ++ "∧" ++ r2 ++ "(" ++ b ++ "," ++ c ++ ")";
core = b;
......
......@@ -11,5 +11,6 @@ abstract FLexicon = FGrammar ** {
two_FNumeral : FNumeral;
lessThan_FBinRelation : FBinRelation;
greaterThan_FBinRelation : FBinRelation;
divides_FBinRelation : FBinRelation;
}
......@@ -9,5 +9,6 @@ concrete FLexiconEng of FLexicon = FGrammarEng ** {
two_FNumeral = "2";
lessThan_FBinRelation = "<";
greaterThan_FBinRelation = ">";
divides_FBinRelation = "|";
}
......@@ -9,5 +9,6 @@ concrete FLexiconLog of FLexicon = FGrammarLog ** {
two_FNumeral = "2";
lessThan_FBinRelation = "less";
greaterThan_FBinRelation = "greater";
divides_FBinRelation = "divides";
}
......@@ -10,6 +10,7 @@ concrete NGrammarEng of NGrammar = MCatsEng, GrammarEng, ExtraEng ** open Syntax
restrict_mobj prop obj = mobjPrepMObjProp obj prop;
mobj_such_that obj restr = mobjAddSuffix obj restr.rs;
-- def_descr_mobj obj = mkNP the_Art obj;
-- appo_mobj obj mcn = lin CN { s = \\number,case_ => obj.s ! number ! case_ ++ mcn.s ! number ! case_; g = obj.g };
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment