Skip to content
This repository has been archived by the owner on Jul 26, 2018. It is now read-only.

Commit

Permalink
lib/src/*/Numeral*.gf: fix inconsistent inheritance form Cat
Browse files Browse the repository at this point in the history
While the abstract Numeral inherits only Cat[Numeral,Digits], some of the
concrete NumeralNNN of Numeral inherited everything from CatNNN.

Normally the compiler outputs a warning message when a concrete syntax 
contains superflous lincats, but apparently not when they get included
through inheritance...

This does not seem to cause problems in the Haskell run-time system, but the 
C run-time system fails to load PGFs with superflous lincats.

This problems shows up when creating application grammars that inherit Numeral.
The Phrasebook is an example of such a grammar.
  • Loading branch information
Thomas-H committed Aug 26, 2015
1 parent 685f810 commit 1ea9f7c
Show file tree
Hide file tree
Showing 24 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion lib/src/afrikaans/NumeralAfr.gf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

concrete NumeralAfr of Numeral = CatAfr ** open ResAfr, Prelude in {
concrete NumeralAfr of Numeral = CatAfr [Numeral,Digits] ** open ResAfr, Prelude in {

flags optimize = all_subs ;
coding=utf8 ;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/amharic/NumeralAmh.gf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

concrete NumeralAmh of Numeral = CatAmh ** open ResAmh,ParamX,Prelude in {
concrete NumeralAmh of Numeral = CatAmh [Numeral,Digits] ** open ResAmh,ParamX,Prelude in {
flags coding = utf8;
lincat

Expand Down
2 changes: 1 addition & 1 deletion lib/src/arabic/NumeralAra.gf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
concrete NumeralAra of Numeral = CatAra **
concrete NumeralAra of Numeral = CatAra [Numeral,Digits] **
open Predef, Prelude, ResAra, MorphoAra in {

flags coding=utf8 ;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/bulgarian/NumeralBul.gf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--# -coding=cp1251
concrete NumeralBul of Numeral = CatBul ** open Prelude, ResBul in {
concrete NumeralBul of Numeral = CatBul [Numeral,Digits] ** open Prelude, ResBul in {
flags coding=cp1251 ;


Expand Down
2 changes: 1 addition & 1 deletion lib/src/chinese/NumeralChi.gf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
concrete NumeralChi of Numeral = CatChi ** open ResChi, Prelude in {
concrete NumeralChi of Numeral = CatChi [Numeral,Digits] ** open ResChi, Prelude in {

flags coding = utf8 ;

Expand Down
2 changes: 1 addition & 1 deletion lib/src/danish/NumeralDan.gf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
concrete NumeralDan of Numeral = CatDan ** open MorphoDan,Prelude in {
concrete NumeralDan of Numeral = CatDan [Numeral,Digits] ** open MorphoDan,Prelude in {
flags coding=utf8 ;


Expand Down
2 changes: 1 addition & 1 deletion lib/src/greek/NumeralGre.gf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
concrete NumeralGre of Numeral = CatGre ** open ResGre,Prelude in {
concrete NumeralGre of Numeral = CatGre [Numeral,Digits] ** open ResGre,Prelude in {

flags coding= utf8 ;

Expand Down
2 changes: 1 addition & 1 deletion lib/src/hindi/NumeralHin.gf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- Modification for Urdu Shafqat Virk


concrete NumeralHin of Numeral = CatHin ** open ResHin,CommonHindustani,ParamX, Prelude in {
concrete NumeralHin of Numeral = CatHin [Numeral,Digits] ** open ResHin,CommonHindustani,ParamX, Prelude in {
flags coding=utf8 ;

param DForm = unit | ten ;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/interlingua/NumeralIna.gf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
concrete NumeralIna of Numeral = CatIna ** open ResIna,Prelude in {
concrete NumeralIna of Numeral = CatIna [Numeral,Digits] ** open ResIna,Prelude in {

lincat
Digit = {s : DForm => CardOrd => Str} ;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/japanese/NumeralJpn.gf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
concrete NumeralJpn of Numeral = CatJpn ** open ResJpn, ParadigmsJpn, Prelude in {
concrete NumeralJpn of Numeral = CatJpn [Numeral,Digits] ** open ResJpn, ParadigmsJpn, Prelude in {

flags coding = utf8 ;

Expand Down
2 changes: 1 addition & 1 deletion lib/src/latin/NumeralLat.gf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
concrete NumeralLat of Numeral = CatLat ** open ResLat,Prelude in {
concrete NumeralLat of Numeral = CatLat [Numeral,Digits] ** open ResLat,Prelude in {
--
--lincat
-- Digit = {s : DForm => CardOrd => Str} ;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/mongolian/NumeralMon.gf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--# -path=.:../abstract:../common:../prelude

concrete NumeralMon of Numeral = CatMon ** open ResMon, MorphoMon, Prelude in {
concrete NumeralMon of Numeral = CatMon [Numeral,Digits] ** open ResMon, MorphoMon, Prelude in {

flags coding=utf8 ;

Expand Down
2 changes: 1 addition & 1 deletion lib/src/nepali/NumeralNep.gf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
concrete NumeralNep of Numeral = CatNep ** open ResNep, Prelude in {
concrete NumeralNep of Numeral = CatNep [Numeral,Digits] ** open ResNep, Prelude in {
-- By Harald Hammarstroem
-- Modification for Nepali by Dinesh Simkhada and Shafqat Virk - 2011
flags coding=utf8 ;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/norwegian/NumeralNor.gf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
concrete NumeralNor of Numeral = CatNor ** open MorphoNor, Prelude in {
concrete NumeralNor of Numeral = CatNor [Numeral,Digits] ** open MorphoNor, Prelude in {
flags coding=utf8 ;

lincat
Expand Down
2 changes: 1 addition & 1 deletion lib/src/polish/NumeralPol.gf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

-- Adam Slaski, 2009, 2010 <adam.slaski@gmail.com>

concrete NumeralPol of Numeral = CatPol ** open ResPol,Prelude, AdjectiveMorphoPol in {
concrete NumeralPol of Numeral = CatPol [Numeral,Digits] ** open ResPol,Prelude, AdjectiveMorphoPol in {

flags coding=utf8 ;

Expand Down
2 changes: 1 addition & 1 deletion lib/src/punjabi/NumeralPnb.gf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
concrete NumeralPnb of Numeral = CatPnb ** open ResPnb, Prelude in {
concrete NumeralPnb of Numeral = CatPnb [Numeral,Digits] ** open ResPnb, Prelude in {
-- By Harald Hammarstroem
-- Modification for Punjabi by Shafqat Virk
flags coding=utf8 ;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/romanian/NumeralRon.gf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
concrete NumeralRon of Numeral = CatRon **
concrete NumeralRon of Numeral = CatRon [Numeral,Digits] **
open MorphoRon, CatRon, Prelude in {

flags coding = utf8 ;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/russian/NumeralRus.gf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--# -path=.:../abstract:../common:../../prelude

concrete NumeralRus of Numeral = CatRus ** open ResRus, Prelude in {
concrete NumeralRus of Numeral = CatRus [Numeral,Digits] ** open ResRus, Prelude in {

flags coding=utf8 ;

Expand Down
2 changes: 1 addition & 1 deletion lib/src/sindhi/NumeralSnd.gf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
concrete NumeralSnd of Numeral = CatSnd ** open ResSnd, Prelude in {
concrete NumeralSnd of Numeral = CatSnd [Numeral,Digits] ** open ResSnd, Prelude in {
-- By Harald Hammarstroem
-- Modification for Punjabi by Shafqat Virk
flags coding=utf8 ;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/swahili/NumeralSwa.gf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
concrete NumeralSwa of Numeral = CatSwa ** open ResSwa in {
concrete NumeralSwa of Numeral = CatSwa [Numeral,Digits] ** open ResSwa in {


}
2 changes: 1 addition & 1 deletion lib/src/telugu/NumeralTel.gf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--concrete NumeralTel of Numeral = CatTel ** open ResTel in {
--concrete NumeralTel of Numeral = CatTel [Numeral,Digits] ** open ResTel in {
----
----lincat
---- Digit = {s : DForm => CardOrd => Str} ;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/thai/NumeralTha.gf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
concrete NumeralTha of Numeral = CatTha ** open ResTha, StringsTha, Prelude in {
concrete NumeralTha of Numeral = CatTha [Numeral,Digits] ** open ResTha, StringsTha, Prelude in {

flags coding = utf8 ;

Expand Down
2 changes: 1 addition & 1 deletion lib/src/turkish/NumeralTur.gf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--# -path=.:../abstract:../common:../../prelude

concrete NumeralTur of Numeral = CatTur ** open Prelude, ResTur, ParadigmsTur in {
concrete NumeralTur of Numeral = CatTur [Numeral,Digits] ** open Prelude, ResTur, ParadigmsTur in {

flags
coding = utf8 ;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/urdu/NumeralUrd.gf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- Modification for Urdu Shafqat Virk


concrete NumeralUrd of Numeral = CatUrd ** open ResUrd,CommonHindustani,ParamX, Prelude in {
concrete NumeralUrd of Numeral = CatUrd [Numeral,Digits] ** open ResUrd,CommonHindustani,ParamX, Prelude in {
flags coding=utf8 ;

param DForm = unit | ten ;
Expand Down

0 comments on commit 1ea9f7c

Please sign in to comment.