diff options
Diffstat (limited to 'doc/runtime-api.html')
| -rw-r--r-- | doc/runtime-api.html | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/doc/runtime-api.html b/doc/runtime-api.html index 966f5f15c..4ed05c3d3 100644 --- a/doc/runtime-api.html +++ b/doc/runtime-api.html @@ -154,12 +154,12 @@ or by calling __next__ if you are using Python 3: </pre> </span> <span class="haskell"> -This gives you a result of type <tt>Either String [(Expr, Float)]</tt>. -If the result is <tt>Left</tt> then the parser has failed and you will -get the token where the parser got stuck. If the parsing was successful -then you get a potentially infinite list of parse results: +This gives you a result of type <tt>ParseOutput</tt>. +If the result is <tt>ParseFailed</tt> then the parser has failed and you will +get the offset and the token where the parser got stuck. If the parsing was successful +then you get <tt>ParseOk</tt> with a potentially infinite list of parse results: <pre class="haskell"> -Prelude PGF2> let Right ((e,p):rest) = res +Prelude PGF2> let ParseOk ((e,p):rest) = res </pre> </span> <span class="java"> @@ -1034,9 +1034,16 @@ This is done by using the option <tt>-split-pgf</tt> in the compiler: <pre class="java"> $ gf -make -split-pgf App12.pgf </pre> +This creates the following files: +<pre class="java"> +Writing App.pgf... +Writing AppEng.pgf_c... +Writing AppSwe.pgf_c... +... +</pre> </p> -Now you can load the grammar as usual but this time only the +Now you can load the grammar <tt>App.pgf</tt> as usual but this time only the abstract syntax will be loaded. You can still use the <tt>languages</tt> property to get the list of languages and the corresponding concrete syntax objects: |
