mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-29 22:42:52 -06:00
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.
This commit is contained in:
@@ -23,7 +23,7 @@ encodeUnicode enc s =
|
||||
where
|
||||
translate cod cbuf
|
||||
| i < w = do bbuf <- newByteBuffer 128 WriteBuffer
|
||||
(_,cbuf,bbuf) <- cod cbuf bbuf
|
||||
(cbuf,bbuf) <- cod cbuf bbuf
|
||||
if isEmptyBuffer bbuf
|
||||
then ioe_invalidCharacter1
|
||||
else do let bs = PS (bufRaw bbuf) (bufL bbuf) (bufR bbuf-bufL bbuf)
|
||||
@@ -48,7 +48,7 @@ decodeUnicodeIO enc (PS fptr l len) = do
|
||||
where
|
||||
translate cod bbuf cbuf
|
||||
| i < w = do
|
||||
(_,bbuf,cbuf) <- cod bbuf cbuf
|
||||
(bbuf,cbuf) <- cod bbuf cbuf
|
||||
if isEmptyBuffer cbuf
|
||||
then ioe_invalidCharacter2
|
||||
else unpack cod bbuf cbuf
|
||||
|
||||
Reference in New Issue
Block a user