mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-11 05:49:31 -06:00
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.
This commit is contained in:
@@ -20,7 +20,6 @@ public class Test {
|
||||
System.out.println(gr.getAbstractName());
|
||||
for (Map.Entry<String,Concr> entry : gr.getLanguages().entrySet()) {
|
||||
System.out.println(entry.getKey()+" "+entry.getValue()+" "+entry.getValue().getName());
|
||||
entry.getValue().addLiteral("PN", new NercLiteralCallback(gr,entry.getValue()));
|
||||
}
|
||||
|
||||
Concr eng = gr.getLanguages().get("SimpleEng");
|
||||
|
||||
Reference in New Issue
Block a user