krangelov
e2ddea6c7d
first version of a parser which returns chunks in case of failure
2019-08-30 13:31:57 +02:00
krangelov
8a5e7fa25d
fix the reader for patterns in a def rule
2019-02-14 15:32:12 +01:00
Krasimir Angelov
d103fe6755
make pgf_production_is_lexical public since it will be needed in the Haskell binding
2017-09-25 12:20:48 +02:00
Krasimir Angelov
bcb97a336e
make the API for indexing in the parser and the linearizer public since it will be needed in the Haskell binding
2017-09-14 18:11:24 +02:00
krasimir
a839bdc687
bugfix for print names in the C runtime and expose the functionality from Java
2017-05-11 09:11:30 +00:00
krasimir
7d72d99c2f
explicitly classify all functions in libpgf as either internal or API functions
2017-04-19 09:34:23 +00:00
krasimir
a8eaa2f2e5
a patch from Bjørnar Luteberget for compatibility with MSVC
2017-04-12 10:24:56 +00:00
krasimir
b3680b6025
merge the states for reasoning and evaluation into a single structure
2015-07-03 11:53:52 +00:00
krasimir
e352742b8c
the orthographic tokens were broken when they appear inside a dictionary entry. Now this is fixed by treating those as syntactic rules
2015-06-12 13:03:19 +00:00
krasimir
9b0edaacdb
print error message for missing abstract categories in the C runtime
2015-06-05 07:41:59 +00:00
krasimir
1e0d7be4f4
added all orthographic primitives
2015-05-11 13:01:39 +00:00
kr.angelov
9bc5349e62
change in the API for literals
...
The API in the C runtime as well as in the Haskell, Python and Java binding
is changed. Now instead of adding the literal callbacks to the concrete syntax
you need to supply them every time when you need to parse. The main reason is:
- referentially transparent API for Haskell
- when we start using memory mapped files we will not be allowed to change
anything in the grammar data structures. At that point the old API would
be impossible to use.
2014-12-16 10:21:26 +00:00
kr.angelov
f8b73d593c
Prelude.CAPIT is now a built-in primitive. It still generates &| in the Haskell runtime but will be intepreted in the C runtime
2014-10-09 19:34:12 +00:00
kr.angelov
86e9acc7a7
throw away the long obsolete runtime type information in the C runtime
2014-10-09 13:44:26 +00:00
kr.angelov
6c86e7fa91
replace the hash maps in the abstract syntax with binary search tables
2014-10-09 08:38:55 +00:00
kr.angelov
9c2f71b07a
now we statically allocate closures for all top-level functions and all nullary constructors. closures are dynamically allocated only for CAFs. this reduces memory use and time to allocate dynamic closures
2014-10-08 12:57:29 +00:00
kr.angelov
312d4ff52e
enough fixes to get the JIT compiler compile for ARM. It is still broken if you try to use it
2014-09-30 12:39:31 +00:00
kr.angelov
14e6eec5ec
now a complete JIT compiler and ByteCode compiler for the def rules in the abstract syntax. there might be some bugs yet to be found, meta variables and computation under lambda is only partially supported
2014-09-25 10:35:06 +00:00
kr.angelov
584d589041
a partial support for def rules in the C runtime
...
The def rules are now compiled to byte code by the compiler and then to
native code by the JIT compiler in the runtime. Not all constructions
are implemented yet. The partial implementation is now in the repository
but it is not activated by default since this requires changes in the
PGF format. I will enable it only after it is complete.
2014-08-11 10:59:10 +00:00
kr.angelov
1ca09448f9
now fully functional Java API for custom literals
2014-04-10 14:14:31 +00:00
kr.angelov
348c9c4233
bugfix in the C runtime
2014-04-10 07:42:49 +00:00
kr.angelov
d9f4c1598c
a quick hack to enable the NERC from bindings. This should be made available from the API but for now I just hacked the C runtime
2014-04-10 07:27:07 +00:00
kr.angelov
911ae42296
small fixes in the C runtime
2014-03-25 13:57:57 +00:00
hallgren
052ead6797
C run-time: protect from Windows specific #includes with #ifdef __MINGW32__
2014-03-06 13:42:27 +00:00
kr.angelov
2238d1e462
include malloc.h in a few places to avoid warnings on Windows
2014-02-27 19:34:14 +00:00
kr.angelov
a01e248ae6
make sure that pgf_concrete_load has no effect on grammars that are completely loaded
2013-12-17 13:57:16 +00:00
kr.angelov
0ece8f19ab
loading and unloading of languages in the C runtime and in the Python bindings
2013-12-10 15:00:52 +00:00
kr.angelov
b3149b7897
pgf_reader_done should do nothing if the reading has failed
2013-11-15 08:59:18 +00:00
kr.angelov
0095119ec0
added Predef.SOFT_BIND. This special token allows zero or more spaces between ordinary tokens. It is also used in the English RGL to attach the commas to the previous word.
2013-11-12 09:54:57 +00:00
kr.angelov
af4a1f628d
factor of 3 speedup for the translation without slowing down the grammar loading. The parser still seems to be 8 times slower than before I introduced the BIND. At least the Android UI now feels a lot more comfortable
2013-11-07 11:14:32 +00:00
kr.angelov
2483dc7728
the content of ParseEngAbs3.probs is now merged with ParseEngAbs.probs. The later is now retrained. Once the grammar is compiled with the .probs file now it doesn't need anything more to do robust parsing. The robustness itself is controlled by the flags 'heuristic_search_factor', 'meta_prob' and 'meta_token_prob' in ParseEngAbs.gf
2013-11-06 10:21:46 +00:00
kr.angelov
042243f08a
added the linref construction in GF. The PGF version number is now bumped
2013-10-30 12:53:36 +00:00
kr.angelov
151f86c1e9
fix the handling of 'pre' in the C runtime
2013-10-28 12:35:37 +00:00
kr.angelov
8cf03bc5b6
a major redesign in the C runtime. The parser and the linearizer now fully support BIND. The following things are still broken: parseval, word completion, handling 'pre', the robust mode
2013-10-09 12:08:51 +00:00
kr.angelov
e8335806af
GuString is now an ordinary C string - it makes live easier. In addition PgfSymbolKS, PgfExprFun and PgfLiteralStr now keep their strings as embedded flexible arrays. The latest change gives us the same compactness as the old representation but it is a lot easier to use.
2013-10-04 12:04:39 +00:00
kr.angelov
426bc49a52
a major refactoring in the C and the Haskell runtimes. Note incompatible change in the PGF format!!!
...
The following are the outcomes:
- Predef.nonExist is fully supported by both the Haskell and the C runtimes
- Predef.BIND is now an internal compiler defined token. For now
it behaves just as usual for the Haskell runtime, i.e. it generates &+.
However, the special treatment will let us to handle it properly in
the C runtime.
- This required a major change in the PGF format since both
nonExist and BIND may appear inside 'pre' and this was not supported
before.
2013-09-27 15:09:48 +00:00
kr.angelov
c08f42ce9f
the PGF reader now releases strings that are not used after the loading
2013-09-18 08:26:11 +00:00
kr.angelov
2a49e4e1d6
a major refactoring in the C runtime. GuList is now removed and replaced with GuSeq. The GuSeq/GuBuf API is simplified
2013-09-17 12:45:00 +00:00
kr.angelov
470eb46e96
remove leftcorner_cat_idx which is now redundant
2013-09-13 13:49:17 +00:00
kr.angelov
c721c5548e
minor optimization/refactoring in the grammar reader
2013-09-13 11:02:17 +00:00
kr.angelov
ba60e6f0e4
tiny optimization in pgf/reader
2013-09-13 09:50:44 +00:00
kr.angelov
2e8f055164
optimize the reading of strings in the grammar loader.
2013-09-13 08:28:20 +00:00
kr.angelov
2105188bd0
enable the PGF JIT compiler for Android
2013-09-12 09:05:43 +00:00
kr.angelov
14f8b96b56
remove the string internalization since it slows down grammar loading with little benefit
2013-09-05 13:34:49 +00:00
kr.angelov
7c0bad5092
remove the read and write modules from libgu. this simplifies the i/o layer
2013-09-05 11:20:39 +00:00
kr.angelov
35a98594be
added make file for compiling the C runtime for Android. The JIT compiler for Android is temporary disabled
2013-09-04 11:56:47 +00:00
kr.angelov
805f95eac6
remove the dependency on the HAVE_STATEMENT_EXPRESSIONS flag. This reduces the dependency on the ./configure script
2013-09-04 10:06:07 +00:00
kr.angelov
a20cd77d25
nonExist now does the expected thing
2013-08-23 13:17:45 +00:00
kr.angelov
155afdf9b7
a complete Python API for reading, printing and manipulation of abstract trees and types. This includes dependent types, high-order abstract syntax and implicit arguments
2013-06-27 09:39:15 +00:00
kr.angelov
d1410aba22
we no longer maintain an explicit list of functions per category since now it is implicitly kept in the JIT compiled code
2013-06-26 09:35:50 +00:00