#!/bin/awk -f
############################################################################
#                                                                          #
#                MLGlide 0.1: Interfacing Glide with O'Caml                #
#                                                                          #
#              Alexandre Miquel   <Alexandre.Miquel@inria.fr>              #
#                                                                          #
# Copyright (c) 1998-1999                                                  #
# This code can be re-used or modified without any restriction.            #
# This version is still under development.  There may be bugs and          #
# inefficient stuff, and I will not be responsible of what can happen      #
# to you and your environment if you use, read or do whatever you want     #
# with all this...                                                         #
#                                                                          #
#                   ... Enjoy!                                             #
#                                                                          #
############################################################################

BEGIN {
  IFS=" " ;
  CURRENT=""
}
 
{
  if ($1 == "#section")
    CURRENT=$2 ;
  else if ($1 == "#common")
    CURRENT="" ;
  else if (CURRENT == SECTION || CURRENT == "")
    print $0
}
