1 
2 /******************************************************************************
3 * MODULE     : language_internals.h
4 * COPYRIGHT  : (C) 1999  Joris van der Hoeven
5 *******************************************************************************
6 * This software falls under the GNU general public license version 3 or later.
7 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
8 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
9 ******************************************************************************/
10 
11 #ifndef IMPL_LANGUAGE_H
12 #define IMPL_LANGUAGE_H
13 #include "language.hpp"
14 
15 extern text_property_rep tp_normal_rep;
16 extern text_property_rep tp_hyph_rep;
17 extern text_property_rep tp_thin_space_rep;
18 extern text_property_rep tp_space_rep;
19 extern text_property_rep tp_dspace_rep;
20 extern text_property_rep tp_nb_thin_space_rep;
21 extern text_property_rep tp_nb_space_rep;
22 extern text_property_rep tp_nb_dspace_rep;
23 extern text_property_rep tp_period_rep;
24 extern text_property_rep tp_operator_rep;
25 extern text_property_rep tp_shortop_rep;
26 extern text_property_rep tp_cjk_normal_rep;
27 extern text_property_rep tp_cjk_no_break_rep;
28 extern text_property_rep tp_cjk_period_rep;
29 extern text_property_rep tp_cjk_no_break_period_rep;
30 
31 struct verb_language_rep: language_rep {
32   verb_language_rep (string name);
33   text_property advance (tree t, int& pos);
34   array<int> get_hyphens (string s);
35   void hyphenate (string s, int after, string& left, string& right);
36   string get_color (tree t, int start, int end);
37 };
38 
39 struct scheme_language_rep: language_rep {
40   hashmap<string,string> colored;
41   scheme_language_rep (string name);
42   text_property advance (tree t, int& pos);
43   array<int> get_hyphens (string s);
44   void hyphenate (string s, int after, string& left, string& right);
45   string get_color (tree t, int start, int end);
46 };
47 
48 struct mathemagix_language_rep: language_rep {
49   hashmap<string,string> colored;
50   mathemagix_language_rep (string name);
51   text_property advance (tree t, int& pos);
52   array<int> get_hyphens (string s);
53   void hyphenate (string s, int after, string& left, string& right);
54   string get_color (tree t, int start, int end);
55 };
56 
57 struct r_language_rep: language_rep {
58   hashmap<string,string> colored;
59   r_language_rep (string name);
60   text_property advance (tree t, int& pos);
61   array<int> get_hyphens (string s);
62   void hyphenate (string s, int after, string& left, string& right);
63   string get_color (tree t, int start, int end);
64 };
65 
66 
67 struct cpp_language_rep: language_rep {
68   hashmap<string,string> colored;
69   cpp_language_rep (string name);
70   text_property advance (tree t, int& pos);
71   array<int> get_hyphens (string s);
72   void hyphenate (string s, int after, string& left, string& right);
73   string get_color (tree t, int start, int end);
74 };
75 
76 struct scilab_language_rep: language_rep {
77   hashmap<string,string> colored;
78   scilab_language_rep (string name);
79   text_property advance (tree t, int& pos);
80   array<int> get_hyphens (string s);
81   void hyphenate (string s, int after, string& left, string& right);
82   string get_color (tree t, int start, int end);
83 };
84 
85 struct python_language_rep: language_rep {
86   hashmap<string,string> colored;
87   python_language_rep (string name);
88   text_property advance (tree t, int& pos);
89   array<int> get_hyphens (string s);
90   void hyphenate (string s, int after, string& left, string& right);
91   string get_color (tree t, int start, int end);
92 };
93 
94 #endif // defined IMPL_LANGUAGE_H
95