Commit Graph
140 Commits
Author SHA1 Message Date
John J. Camilleri 0b13d04ac4 Use Node.js 12 in CI 2021-10-18 14:42:37 +02:00
John J. Camilleri fc57f94e8a Finish unmarshalling of types. Add mkType et al. Add showType tests, but implementation is just stub. 2021-10-13 16:59:11 +02:00
John J. Camilleri 0e011955be Add tests for reading & equality of various expressions 2021-10-08 15:06:34 +02:00
John J. Camilleri 71536e8e37 Handle errors in readExpr 2021-10-08 12:54:36 +02:00
John J. Camilleri a27cf6a17b Implement all Expr unmarshalling (untested). Put wordsize logic in constants.ts. Some README additions. 2021-10-08 12:39:42 +02:00
John J. Camilleri dae39d8b10 Remove 'only' from test suite 2021-10-08 08:54:28 +02:00
John J. Camilleri 0d43ec8971 Unmarshalling for floats and strings, but strings crashes after multiple invocations 2021-10-07 23:25:25 +02:00
John J. Camilleri 16ee006735 Add stubs for all un/marshalling functions. Refactoring. 2021-10-07 15:58:59 +02:00
John J. Camilleri db0cbf60cb Support big and negative integers 2021-10-07 15:07:14 +02:00
John J. Camilleri db66144c25 Get marshalling of integers working 2021-10-07 12:54:02 +02:00
John J. Camilleri 1b3a197aac JavaScript unmarshalling WIP 2021-10-05 15:33:19 +02:00
John J. Camilleri b7e7319542 Switch to 'standard' linting 2021-10-05 13:56:41 +02:00
John J. Camilleri 869c5d094b Implement categoryProbability, functionProbability, functionIsConstructor, functionsByCategory 2021-10-05 13:39:51 +02:00
John J. Camilleri c1adbedc25 Implement bootNGF, readNGF, PgfText_FromString 2021-10-05 11:57:24 +02:00
John J. Camilleri ca2f2bfd89 Change from ffi to ffi-napi since the former seems unsupported
This should also fix installation problem of node-gyp in CI
2021-10-05 01:02:02 +02:00
John J. Camilleri 634508eaa8 Add linting 2021-10-04 15:26:50 +02:00
John J. Camilleri 1f72ef77c4 Add bootNGF. Organise tests better. 2021-10-04 15:07:23 +02:00
John J. Camilleri 7551926383 Add FFI bindings for all API functions. Implement getCategories and getFunctions 2021-10-04 14:15:35 +02:00
John J. Camilleri 45db11b669 Add proper tests, exception handling, implement getAbstractName 2021-10-04 12:10:29 +02:00
John J. Camilleri 314db3ea7f Beginnings of JavaScript bindings 2021-10-01 12:47:39 +02:00
John J. Camilleri 12079550f8 Remove TypeScript runtime and point to new repository
https://github.com/GrammaticalFramework/gf-typescript
2019-07-11 09:29:49 +02:00
John J. Camilleri 9ba4a42426 Add generated gflib.js under typescript/js. Add deprecation notice in javascript. 2019-06-10 10:15:03 +02:00
John J. Camilleri 63606fd2d0 Minor indentation fixes in gflib.js
Despite it being deprecated 🙈
2019-06-10 09:29:43 +02:00
John J. Camilleri c9b4318e9e Clean up whitespace in [old] gflib.js 2019-06-07 09:34:13 +02:00
Thomas Hallgren a5a019a124 runtime/javascript: use a grammar.js with two langauges
grammar.js contained only one langauge: FoodsEng. Now it contains
FoodsEng and FoodsIta, similar to what's shown in the gf-tutorial.
The grammar comes from gf-contrib/tutorial/foods.
2019-05-03 15:19:19 +02:00
Thomas Hallgren 61fe167392 gf-tutorial: fix link to JavaScript translator demo
After fixing trivial problem in translator.html, the demo works, but
the example grammar contains only one langauge, so it is not so
interesting. translator.html is located in src/runtime/javascript.
The editor.html in the same location also works.
2019-05-03 14:52:28 +02:00
kr.angelov 82815c8262 fix a typo in src/runtime/javascript/translator.html 2013-09-25 07:13:50 +00:00
kr.angelov eb013c0b06 almost functional version of the javascript runtime 2013-08-29 20:36:06 +00:00
hallgren 44d1a5a9f7 Improvements of "gf -server" mode and related setup
"gf -server" mode now contains everything needed to run the minibar and
the grammar editor (including example-based grammar writing).

The Setup.hs script installs the required files where gf -server can find them.
These files have been moved to a new directory: src/www.

The separate server program pgf-http is now obsolete.
2011-10-12 17:03:54 +00:00
hallgren 693b807cb5 minibar/support.js: added function encodeArgs. 2011-10-10 17:40:53 +00:00
hallgren c5086bda7c minibar: documentation update 2011-08-22 17:55:47 +00:00
hallgren d45b9edcd8 minibar: quick fix to allow literals to be entered.
If you press Enter, the current word will be accepted, even if there are no
matching completions.
(You can now use names of people when constructing sentences in the Letter
grammar, for example.)
2011-08-22 17:03:47 +00:00
hallgren f19c496b83 minibar: documentation fixes 2011-08-21 21:35:14 +00:00
hallgren 6c8c0cdc24 minibar: bug fix for "Try Google Translate" button 2011-08-19 13:56:12 +00:00
hallgren 4cad2daa29 minibar: adding pgf_offline.js
This file exports the same PGF runtime interface as pgf_online.js but calls
the hs2js translation of the PGF runtime library (which is not included
in darcs).
2011-08-16 16:29:51 +00:00
hallgren b2512234dd minibar: documentation and API work 2011-08-11 16:28:49 +00:00
hallgren 19d84b6de0 minibar: some functions were in the wrong file 2011-08-11 14:56:34 +00:00
hallgren 91cc4de1a2 minibar: more documentation (in minibar-api.html) 2011-08-09 15:57:40 +00:00
hallgren d4638f54ba minibar: refactoring for improved modularity
Two smaller objects have been factored out from the Minibar object:
Input and Translations. These have been placed in two separate files:
minibar_input.js and minibar_translations.js. Some common auxiliary functions
have also been moved to a separate file: minibar_support.js
2011-08-08 17:28:24 +00:00
hallgren e50731c511 minibar: resolve conflict 2011-08-08 14:08:55 +00:00
hallgren ab8ec58e08 minibar: improve pgf_online.js
pgf_online.js has been simplified and generalized to support the full
GF Web Service API. The changes are backwards incompatible, unfortunately.
The documentation and minibar.js have been updated accordingly.
2011-08-03 15:21:38 +00:00
hallgren a0ec59ccda minibar: small code and documentation tweaks 2011-08-03 14:24:47 +00:00
hallgren 8c620229e1 minibar: recording old configuration changes 2011-08-08 14:04:51 +00:00
aarne 848373e29e GenIP, GenRP in Extra and any_Quant in ExtraEng 2011-07-21 08:25:04 +00:00
hallgren 49c27436f5 minibar support.js: add function ajax_http_post for posting FormData 2011-06-21 16:10:44 +00:00
hallgren 6b8fa745e2 minibar: fix typo 2011-04-11 13:03:46 +00:00
hallgren ca335793de minibar: small documentation updates and corrections 2011-04-11 13:00:52 +00:00
hallgren 17f3b456ce minibar: don't force focus to the typed input field after every word
On touch-based devices, the on-screen keyboard kept popping up after every word,
which was very annoying if you were entering a sentence by tapping on the
magnets.
2011-03-22 15:17:48 +00:00
hallgren 5c7ebcc511 minibar: add trailing slash in suggested grammar URLs 2011-03-22 15:12:54 +00:00
hallgren 914ee33396 minibar: add icon for word alignment button 2011-03-03 19:19:47 +00:00