mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 19:22:50 -06:00
*** empty log message ***
This commit is contained in:
@@ -60,6 +60,7 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
verbTa = {s = table {VPres Infinit _ => "ta" ; VPres Indicat _ => "tar" ; VPres Imperat _ => "ta"}; s1 =""} ;
|
verbTa = {s = table {VPres Infinit _ => "ta" ; VPres Indicat _ => "tar" ; VPres Imperat _ => "ta"}; s1 =""} ;
|
||||||
|
verbHa = {s = table {VPres Infinit _ => "ha" ; VPres Indicat _ => "har" ; VPres Imperat _ => "ha"}; s1 =""} ;
|
||||||
verbBehova = {s = table {VPres Infinit _ => "behöva" ; VPres Indicat _ => "behöver" ; VPres Imperat _ =>
|
verbBehova = {s = table {VPres Infinit _ => "behöva" ; VPres Indicat _ => "behöver" ; VPres Imperat _ =>
|
||||||
"behöv"}; s1 =""} ;
|
"behöv"}; s1 =""} ;
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ concrete HealthFre of Health = open PredicationFre, ResourceFre, Prelude, Syntax
|
|||||||
-- because of the UTF8 problem with non-utf8 resource grammars!
|
-- because of the UTF8 problem with non-utf8 resource grammars!
|
||||||
|
|
||||||
flags
|
flags
|
||||||
coding=utf8 ;
|
|
||||||
startcat=Phr ; lexer=text ; parser=chart ; unlexer=text ;
|
startcat=Phr ; lexer=text ; parser=chart ; unlexer=text ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
-- use this path to read the grammar from the same directory
|
-- use this path to read the grammar from the same directory
|
||||||
--# -path=.:../abstract:../../prelude:../italian:../romance
|
--# -path=.:../newresource/abstract:../prelude:../newresource/italian:../newresource/romance
|
||||||
concrete HealthResourceIta of HealthResource = open ResourceIta, Prelude, SyntaxIta, ExtraIta, MorphoIta in {
|
|
||||||
|
concrete HealthIta of Health = open ResourceIta, Prelude, SyntaxIta, ExtraIta, MorphoIta in {
|
||||||
|
|
||||||
flags
|
flags
|
||||||
startcat=Phr ; lexer=text ; parser=chart ; unlexer=text ;
|
startcat=Phr ; lexer=text ; parser=chart ; unlexer=text ;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
-- use this path to read the grammar from the same directory
|
-- use this path to read the grammar from the same directory
|
||||||
|
--# -path=.:../newresource/abstract:../prelude:../newresource/russian
|
||||||
|
|
||||||
concrete HealthRus of Health = open PredicationRus, ResourceRus, Prelude, SyntaxRus, ExtraRus in {
|
concrete HealthRus of Health = open PredicationRus, ResourceRus, Prelude, SyntaxRus, ExtraRus in {
|
||||||
--# -path=.:../newresource/abstract:../prelude:../newresource/russian
|
|
||||||
|
|
||||||
flags
|
flags
|
||||||
coding=utf8 ;
|
coding=utf8 ;
|
||||||
@@ -50,17 +50,17 @@ lin
|
|||||||
(extVerb verbSlomat Act Past)**{lock_TV = <>}) patient (mkNounPhrase patient.n painkiller ** {lock_NP = <>}) ;
|
(extVerb verbSlomat Act Past)**{lock_TV = <>}) patient (mkNounPhrase patient.n painkiller ** {lock_NP = <>}) ;
|
||||||
|
|
||||||
HaveIllness patient symptom = U_predTransVerb True tvHave
|
HaveIllness patient symptom = U_predTransVerb True tvHave
|
||||||
patient (mkNounPhrase Sg symptom) ;
|
patient (mkNounPhrase Sg symptom ** {lock_NP = <>}) ;
|
||||||
Complain = U_predTransVerb True tvHave ;
|
Complain = U_predTransVerb True tvHave ;
|
||||||
|
|
||||||
NeedDoctor = predNeedShortAdjective True ;
|
NeedDoctor = predNeedShortAdjective True ;
|
||||||
NeedMedicine = predNeedShortAdjective True ;
|
NeedMedicine = predNeedShortAdjective True ;
|
||||||
|
|
||||||
PainIn patient head = U_predTransVerb True (mkDirectVerb
|
PainIn patient head = U_predTransVerb True (mkDirectVerb
|
||||||
(extVerb verbBolet_2 Act Present )) patient (mkNounPhrase patient.n head) ;
|
(extVerb verbBolet_2 Act Present ) ** {lock_TV =<>}) patient (mkNounPhrase patient.n head ** {lock_NP =<>}) ;
|
||||||
|
|
||||||
PainInMod patient head degree = U_predTransVerb True (mkDirectVerb
|
PainInMod patient head degree = U_predTransVerb True (mkDirectVerb
|
||||||
(extVerb have Act Present)) patient (mkNounPhrase Sg (ModAdj degree
|
(extVerb have Act Present) ** {lock_TV =<>}) patient (mkNounPhrase Sg (ModAdj degree
|
||||||
(AppFun (mkFun bol "в" Prepos ** {lock_Fun = <>}) (mkNounPhrase patient.n head** {lock_NP = <>}))));
|
(AppFun (mkFun bol "в" Prepos ** {lock_Fun = <>}) (mkNounPhrase patient.n head** {lock_NP = <>}))) ** {lock_NP =<>});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ lin
|
|||||||
Terrible = AdjP1 (extAdjective (aFin "hemsk")** {lock_Adj1 = <>}) ;
|
Terrible = AdjP1 (extAdjective (aFin "hemsk")** {lock_Adj1 = <>}) ;
|
||||||
|
|
||||||
BeInCondition = PredVP ;
|
BeInCondition = PredVP ;
|
||||||
HaveIllness patient illness = predV2 (mkDirectVerb verbHava** {lock_TV =<>}) patient
|
HaveIllness patient illness = predV2 (mkDirectVerb verbHa** {lock_TV =<>}) patient
|
||||||
(DetNP (nullDet ** {lock_Det = <>}) illness) ;
|
(DetNP (nullDet ** {lock_Det = <>}) illness) ;
|
||||||
NeedMedicine patient illness = predV2 (mkDirectVerb verbBehova** {lock_TV =<>}) patient
|
NeedMedicine patient illness = predV2 (mkDirectVerb verbBehova** {lock_TV =<>}) patient
|
||||||
(DetNP (nullDet ** {lock_Det = <>}) illness) ;
|
(DetNP (nullDet ** {lock_Det = <>}) illness) ;
|
||||||
@@ -55,11 +55,11 @@ lin
|
|||||||
Fever = DetNP (nullDet ** {lock_Det = <>}) (n2n (extCommNoun NoMasc (sFeber "feb")) ** {lock_CN = <>}) ;
|
Fever = DetNP (nullDet ** {lock_Det = <>}) (n2n (extCommNoun NoMasc (sFeber "feb")) ** {lock_CN = <>}) ;
|
||||||
FeverMod degree = DetNP (nullDet ** {lock_Det = <>}) (ModAdj degree (n2n (extCommNoun NoMasc (sFeber "feb")) ** {lock_CN = <>})) ;
|
FeverMod degree = DetNP (nullDet ** {lock_Det = <>}) (ModAdj degree (n2n (extCommNoun NoMasc (sFeber "feb")) ** {lock_CN = <>})) ;
|
||||||
|
|
||||||
Complain = predV2 (mkDirectVerb verbHava ** {lock_TV =<>}) ;
|
Complain = predV2 (mkDirectVerb verbHa ** {lock_TV =<>}) ;
|
||||||
Broken patient head = predV2 (mkTransVerb verbHava "brutit" ** {lock_TV =<>} ) patient
|
Broken patient head = predV2 (mkTransVerb verbHa "brutit" ** {lock_TV =<>} ) patient
|
||||||
(defNounPhrase patient.n head ** {lock_NP =<>}) ;
|
(defNounPhrase patient.n head ** {lock_NP =<>}) ;
|
||||||
|
|
||||||
PainIn patient head = predV2 (mkDirectVerb verbHava** {lock_TV =<>}) patient
|
PainIn patient head = predV2 (mkDirectVerb verbHa** {lock_TV =<>}) patient
|
||||||
(
|
(
|
||||||
DetNP (nullDet ** {lock_Det = <>})
|
DetNP (nullDet ** {lock_Det = <>})
|
||||||
( AppFun
|
( AppFun
|
||||||
@@ -67,7 +67,7 @@ lin
|
|||||||
((defNounPhrase patient.n head)** {lock_NP = <>})
|
((defNounPhrase patient.n head)** {lock_NP = <>})
|
||||||
)
|
)
|
||||||
) ;
|
) ;
|
||||||
PainInMod patient head degree = predV2 (mkDirectVerb verbHava** {lock_TV =<>}) patient
|
PainInMod patient head degree = predV2 (mkDirectVerb verbHa** {lock_TV =<>}) patient
|
||||||
(
|
(
|
||||||
DetNP (nullDet ** {lock_Det = <>})
|
DetNP (nullDet ** {lock_Det = <>})
|
||||||
( modCommNounPhrase degree
|
( modCommNounPhrase degree
|
||||||
|
|||||||
@@ -14,6 +14,15 @@ import java.util.*;
|
|||||||
public class GFEditor2 extends JFrame implements ActionListener, CaretListener,
|
public class GFEditor2 extends JFrame implements ActionListener, CaretListener,
|
||||||
KeyListener, FocusListener {
|
KeyListener, FocusListener {
|
||||||
|
|
||||||
|
private int[] sizes = {10,12,16,20,25,30,36};
|
||||||
|
private String[] envfonts;
|
||||||
|
private Font[] fontObjs;
|
||||||
|
private static int DEFAULT_FONT_SIZE = 12;
|
||||||
|
private JComboBox fontList;
|
||||||
|
private JLabel fontLabel = new JLabel(" Font: ");
|
||||||
|
private JComboBox sizeList;
|
||||||
|
private JLabel sizeLabel = new JLabel(" Size: ");
|
||||||
|
|
||||||
public JPopupMenu popup2 = new JPopupMenu();
|
public JPopupMenu popup2 = new JPopupMenu();
|
||||||
public JMenuItem menuItem2;
|
public JMenuItem menuItem2;
|
||||||
public static JTextField field = new JTextField("textField!");
|
public static JTextField field = new JTextField("textField!");
|
||||||
@@ -22,8 +31,8 @@ public class GFEditor2 extends JFrame implements ActionListener, CaretListener,
|
|||||||
public static String selectedText="";
|
public static String selectedText="";
|
||||||
|
|
||||||
public static boolean debug = false;
|
public static boolean debug = false;
|
||||||
public static boolean debug3 = false;
|
public static boolean debug3 = true;
|
||||||
public static boolean debug2 = true;
|
public static boolean debug2 = false;
|
||||||
public static boolean selectionCheck = false;
|
public static boolean selectionCheck = false;
|
||||||
public static String focusPosition = "";
|
public static String focusPosition = "";
|
||||||
public static String stringToAppend = "";
|
public static String stringToAppend = "";
|
||||||
@@ -153,6 +162,7 @@ public class GFEditor2 extends JFrame implements ActionListener, CaretListener,
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//Add listener to components that can bring up popup menus.
|
//Add listener to components that can bring up popup menus.
|
||||||
MouseListener popupListener2 = new PopupListener();
|
MouseListener popupListener2 = new PopupListener();
|
||||||
output.addMouseListener(popupListener2);
|
output.addMouseListener(popupListener2);
|
||||||
@@ -311,14 +321,34 @@ public class GFEditor2 extends JFrame implements ActionListener, CaretListener,
|
|||||||
upPanel.add(open);
|
upPanel.add(open);
|
||||||
upPanel.add(save);
|
upPanel.add(save);
|
||||||
upPanel.add(newTopic);
|
upPanel.add(newTopic);
|
||||||
|
upPanel.add(filter);
|
||||||
|
|
||||||
filter.setToolTipText("Choosing the linearization representation format");
|
filter.setToolTipText("Choosing the linearization representation format");
|
||||||
modeMenu.setToolTipText("Choosing the refinement options' representation");
|
modeMenu.setToolTipText("Choosing the refinement options' representation");
|
||||||
statusLabel.setToolTipText("The current focus type");
|
statusLabel.setToolTipText("The current focus type");
|
||||||
list.setToolTipText("The list of current refinment options");
|
list.setToolTipText("The list of current refinment options");
|
||||||
|
|
||||||
|
GraphicsEnvironment gEnv = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
||||||
|
envfonts = gEnv.getAvailableFontFamilyNames();
|
||||||
|
fontObjs = new Font[envfonts.length];
|
||||||
|
for (int fi = 0; fi < envfonts.length; fi++) {
|
||||||
|
fontObjs[fi] = new Font(envfonts[fi], Font.PLAIN, DEFAULT_FONT_SIZE);
|
||||||
|
}
|
||||||
|
fontList = new JComboBox(envfonts);
|
||||||
|
fontList.addActionListener(this);
|
||||||
|
sizeList = new JComboBox();
|
||||||
|
for (int i = 0; i<sizes.length; i++)
|
||||||
|
{
|
||||||
|
sizeList.addItem(new Integer(sizes[i]));
|
||||||
|
}
|
||||||
|
sizeList.addActionListener(this);
|
||||||
|
|
||||||
|
upPanel.add(fontLabel);
|
||||||
|
upPanel.add(fontList);
|
||||||
|
upPanel.add(sizeLabel);
|
||||||
|
upPanel.add(sizeList);
|
||||||
|
|
||||||
tree.setToolTipText("The abstract syntax tree representation of the current editing object");
|
tree.setToolTipText("The abstract syntax tree representation of the current editing object");
|
||||||
upPanel.add(filter);
|
|
||||||
//upPanel.add(mode);
|
|
||||||
populateTree(tree);
|
populateTree(tree);
|
||||||
outputPanelUp.setLayout(new BorderLayout());
|
outputPanelUp.setLayout(new BorderLayout());
|
||||||
outputPanelUp.add(outputPanelCenter, BorderLayout.CENTER);
|
outputPanelUp.add(outputPanelCenter, BorderLayout.CENTER);
|
||||||
@@ -457,6 +487,7 @@ public class GFEditor2 extends JFrame implements ActionListener, CaretListener,
|
|||||||
inputPanel2.add(browse);
|
inputPanel2.add(browse);
|
||||||
dialog.setSize(350,135);
|
dialog.setSize(350,135);
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
result = fromProc.readLine();
|
result = fromProc.readLine();
|
||||||
while(result != null) {
|
while(result != null) {
|
||||||
@@ -909,6 +940,21 @@ public class GFEditor2 extends JFrame implements ActionListener, CaretListener,
|
|||||||
{
|
{
|
||||||
boolean abs = true;
|
boolean abs = true;
|
||||||
Object obj = ae.getSource();
|
Object obj = ae.getSource();
|
||||||
|
Font font;
|
||||||
|
|
||||||
|
if ( obj == fontList ) {
|
||||||
|
font = new Font((String)fontList.getSelectedItem(), Font.PLAIN, ((Integer)sizeList.getSelectedItem()).intValue());
|
||||||
|
output.setFont(font);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( obj == sizeList ) {
|
||||||
|
font = new Font((String)fontList.getSelectedItem(), Font.PLAIN, ((Integer)sizeList.getSelectedItem()).intValue());
|
||||||
|
output.setFont(font);
|
||||||
|
field.setFont(font);
|
||||||
|
tree.tree.setFont(font);
|
||||||
|
list.setFont(font);
|
||||||
|
}
|
||||||
|
|
||||||
if ( obj == menu ) {
|
if ( obj == menu ) {
|
||||||
if (!menu.getSelectedItem().equals("New"))
|
if (!menu.getSelectedItem().equals("New"))
|
||||||
{
|
{
|
||||||
@@ -1962,14 +2008,14 @@ public class GFEditor2 extends JFrame implements ActionListener, CaretListener,
|
|||||||
// middle click
|
// middle click
|
||||||
if (e.getButton() == MouseEvent.BUTTON2)
|
if (e.getButton() == MouseEvent.BUTTON2)
|
||||||
{
|
{
|
||||||
if (debug3) System.out.println("MIDDLE BUTTON!");
|
|
||||||
// selection Exists:
|
// selection Exists:
|
||||||
if (!selectedText.equals(""))
|
if (!selectedText.equals(""))
|
||||||
{
|
{
|
||||||
|
if (debug3) System.out.println(e.getX() + " " + e.getY());
|
||||||
if (selectedText.length()<5)
|
if (selectedText.length()<5)
|
||||||
field.setBounds(e.getX()+200, e.getY()+80, 140, 30);
|
field.setBounds(e.getX()+(int)Math.round(tree.getBounds().getWidth()), e.getY()+80, 400, 40);
|
||||||
else
|
else
|
||||||
field.setBounds(e.getX()+200, e.getY()+80, selectedText.length()*10, 30);
|
field.setBounds(e.getX()+(int)Math.round(tree.getBounds().getWidth()), e.getY()+80, selectedText.length()*20, 40);
|
||||||
getLayeredPane().add(field, new Integer(1), 0);
|
getLayeredPane().add(field, new Integer(1), 0);
|
||||||
field.setText(selectedText);
|
field.setText(selectedText);
|
||||||
field.requestFocusInWindow();
|
field.requestFocusInWindow();
|
||||||
|
|||||||
Reference in New Issue
Block a user