The documentation states:
The combination of sglr and implode-asfix has the same effect as directly invoking sglri.

The following module defines a list of bools:
====
module Main
exports
context-free start-symbols Bool Bools

context-free syntax
“true” -> Bool {cons(“True”)}

Bool* -> Bools {cons(“Bools”)}

lexical syntax
[
] -> LAYOUT

context-free restrictions
LAYOUT? -/- [
]
====

But the output of invoking sglri and sglr/implode-asfix differs:
====
[eric@~/workspace/dev]$ cat exp
true true
====
sglri (expected):
====
[eric@~/workspace/dev]$ sglri -i exp -p Main.tbl -s Bools | pp-aterm
Bools([True(), True()])
====
sglr … | implode-asfix
====
[eric@~/workspace/dev]$ sglr -i exp -p Main.tbl -s Bools | implode-asfix | pp-aterm
Bools(
appl(
list(cf(iter-star(sort(“Bool”))))
, [True(), Some(" "), True()]
)
)
====

Submitted on 29 January 2007 at 21:58

On 30 January 2007 at 01:02 Jira commented:

STR-694, martin:
Well, it only has the same effect with the right flags. sglr needs to be invoked with the flag -2 (which specified the parse tree format) and the flags -fe and -fi for disabling the heuristic filters.

sglr -2 -fi -fe | implode-asfix

Maybe this should be fixed somewhere in the docs (where did you read this?), but this is not a bug.

Log in to post comments