Skip to content

Instantly share code, notes, and snippets.

@odanoburu
Last active May 8, 2018 19:05
Show Gist options
  • Save odanoburu/78d9fdcf41cd2e85eba530de4dc7d2e3 to your computer and use it in GitHub Desktop.
Save odanoburu/78d9fdcf41cd2e85eba530de4dc7d2e3 to your computer and use it in GitHub Desktop.
GF MRE
abstract Test = {
cat S ; -- entry
Thing ;
fun
A, B : Thing ;
mkTest : Thing -> Thing -> S ;
} ;
concrete TestConc of Test = open Prelude in {
lincat
S, Thing = SS ;
lin
A = ss "A" ;
B = ss "B" ;
mkTest a b = ss (a.s ++ "\t" ++ b.s) ;
} ;
@odanoburu
Copy link
Author

a TAB character in a grammar seems to break the identity of parse/linearize

> i TestConc.gf
- compiling TestConc.gf...   write file TestConc.gfo
linking ... OK

Languages: TestConc
12 msec
Test> gr -number=3 | l -lang=Conc | p -lang=Conc
The parser failed at token 2: "A"
The parser failed at token 2: "B"
The parser failed at token 2: "B"
4 msec

@odanoburu
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment