Blame common/mor.inc

Packit 1f3717
# This file is part of Suomi-malaga, description of Finnish morphology
Packit 1f3717
# written in malaga.
Packit 1f3717
# Copyright 2006 Harri Pitänen <hatapitk@iki.fi>
Packit 1f3717
#
Packit 1f3717
# This program is free software; you can redistribute it and/or modify
Packit 1f3717
# it under the terms of the GNU General Public License as published by
Packit 1f3717
# the Free Software Foundation; either version 2, or (at your option)
Packit 1f3717
# any later version.
Packit 1f3717
#
Packit 1f3717
# This program is distributed in the hope that it will be useful, but
Packit 1f3717
# WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 1f3717
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 1f3717
# General Public License for more details.
Packit 1f3717
#
Packit 1f3717
# You should have received a copy of the GNU General Public License
Packit 1f3717
# along with this program; see the file COPYING.  If not, write to the
Packit 1f3717
# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
Packit 1f3717
# 02110-1301, USA.
Packit 1f3717
Packit 1f3717
include "subrule.inc";
Packit 1f3717
Packit 1f3717
# Merkkijonon ensimmäinen merkki
Packit 1f3717
# Tekijä: Björn Beutel.
Packit 1f3717
subrule first ($string):
Packit 1f3717
  ! $string matches ".": $first, ".*";
Packit 1f3717
  return $first;
Packit 1f3717
end;
Packit 1f3717
Packit 1f3717
Packit 1f3717
# Palauttaa yes, jos annettu merkki on vokaali, muutoin palauttaa no
Packit 1f3717
subrule vokaali($merkki):
Packit 1f3717
  if $merkki in <"a", "e", "i", "o", "u", "y", "ä", "ö", "é"> then
Packit 1f3717
    return yes;
Packit 1f3717
  else
Packit 1f3717
    return no;
Packit 1f3717
  end;
Packit 1f3717
end;