Skip to content

Commit

Permalink
add example input
Browse files Browse the repository at this point in the history
  • Loading branch information
sjanssen2 committed Jan 13, 2024
1 parent 8c551bd commit e1a4953
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions doorplate.gap
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,16 @@ grammar gra_doorplate uses sig_doorplate(axiom=start) {
# h;
}

/*
example inputs: <floor><office><id>M3-114</id><person>Stefan</person></office><office><id>M3-107</id><person>Maddis</person><person>Jan</person></office></floor>
*/

instance test = gra_doorplate(alg_enum);
instance pp = gra_doorplate(alg_pretty);
instance count = gra_doorplate(alg_count);

// example input:
// "<floor><office><id>M3-114</id><person>Stefan</person></office><office><id>M3-107</id><person>Maddis</person><person>Jan</person></office></floor>"

// note that there are multiple parse tree possible, because e.g.
// algebra function "person" need to start with "<person>" and end with "</person>".
// A valid parse is "<person>Maddis</person>". However, also valid is "<person>Maddis</person><person>Jan</person>".
/*
note that there are multiple parse tree possible, because e.g.
algebra function "person" need to start with "<person>" and end with "</person>".
A valid parse is "<person>Maddis</person>". However, also valid is "<person>Maddis</person><person>Jan</person>".
/*

0 comments on commit e1a4953

Please sign in to comment.