[06:15:40] *** Joins: drbean_ (~drbean@TC210-63-209-90.static.apol.com.tw) [06:15:40] *** Quits: drbean (~drbean@TC210-63-209-64.static.apol.com.tw) (Ping timeout: 256 seconds) [07:19:38] *** Quits: proteusguy (~proteusgu@cm-58-10-208-180.revip7.asianet.co.th) (Quit: Leaving) [07:20:32] *** Joins: proteusguy (~proteusgu@cm-58-10-208-180.revip7.asianet.co.th) [14:28:16] *** Joins: michmech (~Thunderbi@194.213.43.122) [14:28:25] *** Quits: michmech (~Thunderbi@194.213.43.122) (Client Quit) [15:34:08] i know that it's not exactly intended usage of GF, but is there a way of ouptputting newlines? [16:36:44] I would just output something else and postprocess [16:39:30] yes, that's what i'm thinking as well, but i was just wondering. [16:39:46] I don't really know, you should try and report what happens! [16:40:02] i tried and it doesn't like it. [16:40:09] https://groups.google.com/forum/#!topic/gf-dev/c4WNtExo2F4 [16:40:10] "https://groups.google.com/forum/#!topic/gf-dev/c4WNtExo2F4" [16:40:18] The explanation is that GF parsing and linearization ignores all whitespace, except as separator of tokens. Hence " " == " " == "\t" == "\n" == "\t\n \n\n\t" etc. From this follows that [16:40:18] - In the grammar compiler, an expression of type Str is hence normalized to a list of strings without whitespaces. [16:40:18] - Linearization, therefore, can never produce specific whitespace characters, but just (by default) single ' ' characters to separate tokens. [16:40:18] - The parser will read as its input a sequence of tokens. - in the GF shell, the "p" command expects the tokens to be separated by whitespace, more precisely, by any sequence defined by the regexp (' '|'\t'|'\n')+ - in the C runtime, special tokens such as BIND are inserted in accordance to the grammar, even if no whitespace is given in the input [16:40:18] The recommended way to control the whitespace characters is to encode them by some special tokens and use simple pre- and postprocessing. The ps command of the GF shell gives some support to this. In many application [16:40:31] the documentation could be a bit clearer here. [16:40:34] thanks! [16:40:41] that's clear enough!