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:
kr.angelov
2014-12-16 10:21:26 +00:00
parent d98bd34a33
commit 9bc5349e62
20 changed files with 425 additions and 440 deletions

View File

@@ -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");