diff options
author | Aleš Smodiš <aless@guru.si> | 2015-07-14 17:57:06 +0200 |
---|---|---|
committer | Aleš Smodiš <aless@guru.si> | 2015-07-14 17:57:06 +0200 |
commit | 13399da7f5eea223db86ff4d30403bc714c5816c (patch) | |
tree | f49dd400b20c3ff84931994d9d99e5f58cc2be0c /sister.py | |
parent | 9a9c1113c90cf787a82312a548f2bf3776927d8e (diff) |
Implemented a parser of simple pythonic definitions.
Diffstat (limited to 'sister.py')
-rw-r--r-- | sister.py | 21 |
1 files changed, 18 insertions, 3 deletions
@@ -1,12 +1,11 @@ # najprej opis -description = """ +description = """\ <p>Predikat <code>sister(X, Y)</code> velja natanko takrat, kadar je <code>X</code> sestra od <code>Y</code>. Primer klica:</p> <p><code> ?- sister(X, patricia).<br> X = vanessa. -</code></p> -""" +</code></p>""" # in zdaj hinti hint = {} # to je komentar @@ -19,3 +18,19 @@ hint['must_have_common_parent'] = """ hint['x_must_be_female'] = "<code>X</code> mora biti ženskega spola." hint['x_cant_be_own_sister'] = "<code>X</code> ne more biti sestra sama sebi." hint['y_not_necessarily_woman'] = "<code>Y</code> ni nujno ženskega spola / relacija ni simetrična." + +# a drop-down hint must supply the arguments: start (int), end (int), choices (array of string) +hint['drop_down'] = { + 'type': 'dropdown' +} +# a pop-up hint must supply the arguments: start (int), end (int), args (object of key-value args for the template, optional) +hint['popup_unknown'] = { + 'type': 'popup', + 'message': 'nekaj si zabluzil v vrstici [%=row%]' +} +# a static hint can supply an optional argument: args (object of key-value args for the template) +# a static hint can also be defined as a string instead of an object +hint['sample_static'] = { + 'type': 'static', + 'message': 'A sample static hint' +} |