Разработка системы программирования для обработки данных строкового типа

  • Вид работы:
    Курсовая работа (т)
  • Предмет:
    Информационное обеспечение, программирование
  • Язык:
    Русский
    ,
    Формат файла:
    MS Word
    85,12 Кб
  • Опубликовано:
    2012-10-23
Вы можете узнать стоимость помощи в написании студенческой работы.
Помощь в написании работы, которую точно примут!

Разработка системы программирования для обработки данных строкового типа

ФЕДЕРАЛЬНОЕ АГЕНТСТВО ПО ОБРАЗОВАНИЮ

Государственное образовательное учреждение высшего профессионального образования

"САНКТ-ПЕТЕРБУРГСКИЙ ГОСУДАРСТВЕННЫЙ УНИВЕРСИТЕТ АЭРОКОСМИЧЕСКОГО ПРИБОРОСТРОЕНИЯ"

КАФЕДРА КОМПЬЮТЕРНОЙ МАТЕМАТИКИ И ПРОГРАММИРОВАНИЯ





ПОЯСНИТЕЛЬНАЯ ЗАПИСКА К КУРСОВОМУ ПРОЕКТУ

РАЗРАБОТКА СИСТЕМЫ ПРОГРАММИРОВАНИЯ ДЛЯ

ОБРАБОТКИ ДАННЫХ СТРОКОВОГО ТИПА

по дисциплине: ТЕОРИЯ ЯЗЫКОВ ПРОГРАММИРОВАНИЯ




Работу выполнила

Анохина А.О.





Санкт-Петербург 2008

Содержание

1. Введение

2. Постановка задачи

3. Грамматика языка программирования обработки строк

4. Описание детерминированной автоматной модели синтаксического анализатора

5. Описание структуры системы программирования

6. Руководство пользователя

7. Заключение

Список использованной литературы

Приложения

1. Введение


В качестве вводной части к курсовому проекту рассмотрим теоретические аспекты лексического и синтаксического анализов.

Лексический анализ - разбиение последовательности символов входного текста на последовательность слов, или лексем. Выделение лексем из текста обычно предшествует стадии синтаксического анализа, например, при построении компилятора с какого-нибудь языка программирования, хотя может потребоваться и для решения других задач, не связанных с синтаксическим анализом текстов. Обычно все лексемы делятся на классы. Примерами таких классов являются числа (целые, восьмеричные, шестнадцатеричные, действительные и т.д.), идентификаторы, строки. Отдельно выделяются ключевые слова и символы пунктуации (иногда их называют символы-ограничители). Как правило, ключевые слова - это некоторое конечное подмножество идентификаторов. В большинстве случаев лексический анализ выполняется перед синтаксическим. Программный компонент, осуществляющий подобную операцию, называется лексическим анализатором или сканером.

Синтаксическим анализом называют разбор цепочек лексем входного текста с целью проверки того факта, что данная цепочка удовлетворяет правилам некоторого формального языка. Формальный язык - это подмножество цепочек в некотором алфавите. Допустимая цепочка называется предложением языка. Для выделения лексем цепочки обычно применяются методы лексического анализа.

Задачу реализации синтаксического анализа приходится решать при разработке трансляторов с языков программирования в машинные коды, а также при необходимости разбора входных данных, записанных по определенным правилам в виде текстовых документов. Программный компонент-синтаксический анализатор часто является "пусковым механизмом", запускающим работу остальных компонентов программы, ответственных за обработку входных данных. Анализатор принимает или отвергает предложения языка и в процессе своей работы передает информацию о принятых предложениях в другие компоненты программной системы, такие, например, как построитель внутреннего представления данных. Таким образом, входом для синтаксического анализатора являются цепочки символов входного языка, а выходными данными являются законченные предложения того же языка, которые, в свою очередь, могут нести некоторый логический смысл, доступный другим компонентам программной системы.

Выделение синтаксического анализа в отдельную задачу позволяет применить формальные методы теории языков и упростить его реализацию путем использования существующего программного кода.

2. Постановка задачи


Разработать программный продукт для обработки данных строкового типа.

В разработку программного продукта входят:

         построение сканера текстов с использованием утилиты flex;

-        построение синтаксического анализатора с использованием утилиты bison.

Система программирования должна печатать таблицу сопоставления DN (Directory Numbers) именам пользователя (NAME). В качестве обрабатываемого файла система должна принимает файлы соответствующие указанному примеру.

Пример обрабатываемого файла:

DN 1002

CPND

NAME BRIAN WALSH

XPLN 27_FMT FIRST,LAST_COS 4_DN_DN_STATE CONFIGUREDSL1004 0 00 02 KEY 00 H MARP DES BRIAN 1 JUN 2001

(2008)

После обработки заданного файла на выходе система должна выдавать таблицу соответствия номеров именам пользователей по следующему шаблону:

DN First name Last name

=================================

1002 BRIAN WALSH

------------------------------------------------------

 

. Грамматика языка программирования обработки строк


Для задания синтаксического анализатора создается специальный текстовый файл, который впоследствии обрабатывается утилитой bison для построения исходного программного кода.

Файл включает в себя 4 секции: Определения, Настройки bison, Правила и Пользовательский код (не обязательная секция). Для разделения секций используется строка с символами %%

Описание используемого синтаксического анализатора:

%{

#include <stdlib. h>

#include <stdio. h>

int yylex ();yyerror (char const *msg);

%}

%union

{* string;

}

%token <string> AP_DN_KW AP_NUMBER AP_CPND_KW AP_NAME_KW AP_XPLN_KW AP_DISPLAYFMT_KW AP_FIRSTLAST_KW AP_VMB_KW AP_VMBCOS_KW AP_SECONDDN_KW AP_THIRDDN_KW AP_VMBSTATE_KW AP_CONFIGURED_KW AP_TYPE_KW AP_SL AP_TN_KW AP_TN AP_KEY AP_KEY_KW AP_H_KW AP_MARP_KW AP_DES_KW AP_NAME AP_DATE AP_YEAR

%type <string> list record userinfo dopinfo type summary

%%: record | list record;: userinfo dopinfo type summary;: AP_DN_KW AP_NUMBER AP_CPND_KW AP_NAME_KW AP_NAME AP_NAME AP_XPLN_KW AP_NUMBER AP_DISPLAYFMT_KW AP_FIRSTLAST_KW

{("%s\t", $2);("%s\t", $5);("\t%s", $6);("\n---------------------------------");("\n");

};: AP_VMB_KW AP_VMBCOS_KW AP_NUMBER AP_SECONDDN_KW AP_THIRDDN_KW AP_VMBSTATE_KW AP_CONFIGURED_KW

{};: AP_TYPE_KW

{};: AP_TN_KW AP_TN AP_KEY_KW AP_KEY AP_H_KW AP_MARP_KW AP_DES_KW AP_DATE AP_YEAR

{};

%%

4. Описание детерминированной автоматной модели синтаксического анализатора


Основная задача синтаксического анализа - разбор структуры программы. Как правило, под структурой понимается дерево, соответствующее разбору в контекстно-свободной грамматике языка. В настоящее время чаще всего используется либо LL (1) - анализ (и его вариант - рекурсивный спуск), либо LR (1) - анализ и его варианты (LR (0), SLR (1), LALR (1) и др.). Рекурсивный спуск чаще используется при ручном программировании синтаксического анализатора, LR (1) - при использовании систем автоматизации построения синтаксических анализаторов. Результатом синтаксического анализа является синтаксическое дерево со ссылками на таблицу имен. В процессе синтаксического анализа также обнаруживаются ошибки, связанные со структурой программы.

Синтаксический анализатор, генерируемый программой Bison строится на основе LR (1) - грамматики

Алгоритм синтаксического анализа на основе LR (k) - грамматики относится к классу алгоритмов восходящего разбора.

Строкам управляющей таблицы М (LR-таблица разбора) ставятся в соответствие состояния, в которых может находиться анализатор, столбцам - элементы множества {VÈTÈ$}. Каждая запись рабочего стека представляет собой пару: (символ, номер состояния).

Перед началом работы алгоритма в рабочий стек заносится пара (Λ,1), где 1 - символ начального состояния анализатора. Возможные значения элементов таблицы и их интерпретация алгоритмом разбора приведены в таблице.

программирование строковый синтаксический анализ

Таблица возможных значений элементов управляющей таблицы

Значение элемента управляющей таблицы

Интерпретация алгоритмом разбора

Номер n порождающего правила грамматики

Удаление из рабочего стека k записей (k - количество символов в правой части правила номер n); имитация считывания в качестве следующего входного символа нетерминала левой части правила номер n; запись n в выходную ленту

 ("сдвиг", номер j состояния)

Запись текущего входного символа в выходной стек и в паре с номером j - в рабочий стек; если этот символ нетерминал, установка указателей на него в ближайших к нему n записях выходного стека с пустыми указателями

"допуск"

Входная строка разобрана. Конец работы

"ошибка"

Входная строка ошибочна. Конец работы


Для построения управляющей таблицы М может быть выполнена разметка порождающих правил грамматики номерами состояний анализатора. Номера состояний устанавливаются в правой части каждого правила: перед первым символом, между любыми двумя символами и после последнего символа. При этом номер состояния, непосредственно справа от которого находится нетерминал, следует распространять на позиции перед первыми символами всех правых частей правил для данного нетерминала (и т.д. рекурсивно). А если непосредственно слева от одного и того же символа в каких-либо правилах установлены одинаковые метки, то и непосредственно справа от этого символа в этих правилах следует поставить одну и ту же метку. Начальные позиции правых частей правил для аксиомы отмечаются номером начального состояния анализатора.

После разметки грамматики выполняется построение таблицы М по следующему алгоритму.

.        Если символ А в правой части правила имеет непосредственно слева от себя метку m, а непосредственно справа от себя - метку j, то M (m,A) = ("сдвиг",j).

2.       Если метка j размещается за последним символом правой части правила номер n, то определяется множество Q символов, которые в какой-либо сентенциальной форме могут следовать за нетерминалом левой части правила номер n, и M (j,q) =n для всех qÎ Q.

3.       M (1,<S>) = "допуск", где 1 - символ начального состояния.

.        Оставшиеся незаполненными элементы таблицы M получают значение "ошибка".

5. Описание структуры системы программирования


Структура системы программирования представлена представляет собой общую схему взаимодействия файлов проекта.


6. Руководство пользователя


1.       Перед запуском исполняемого файла программы необходимо убедиться, что в папке с программой присутствует обрабатываемый файл. Обрабатываемый файл должен называться data. txt.

2.       Для запуска программы запустите исполняемый файл KP. exe.

.        В случае, если обрабатываемый файл корректен, то после запуска программы на экране отобразиться таблица соответствия DN именам пользователей. См. Приложение 2.

.        Тестовые случаи, Тест 1.

Корректный обрабатываемый файл, должен быть выполнен по следующему примеру:

DN <DN_Number><First_Name> <Last_Name>27_FMT FIRST,LAST_COS 4_DN_DN_STATE CONFIGUREDSL1024 0 06 14 KEY 00 H MARP DES LAM 29 JUN 2000

(2008)

<DN_Number> - номер, который будет выбираться для соответствия с именем пользователя;

<First_Name> и <Last_Name> - Имя и Фамилия пользователя соответственно.

.        В случае, если обрабатываемый файл некорректен, программа выдаст сообщение об ошибке. См. Приложение 2. Тестовые случаи, Тест 2.

6.       В случае, если обрабатываемый файл отсутствует в директории программы или неправильно поименован, в результате запуска программы отобразиться корректное сообщение об ошибке. См. Приложение 2. Тестовые случаи, Тест 3.

7. Заключение


Результатом выполнения курсового проекта стал программа для обработки данных строкового типа. Для разработки лексического и синтаксического анализаторов были использованы системы автоматической генерации программ Flex и Bison. Использование данных программ значительно упростило разработку данной программы.

Список использованной литературы


1.       Т.М. Максимова - Теория языков программирования и методы трансляции. Методические указания к выполнению лабораторных работ № 1-4, ГОУ ВПО СПбГУАП, СПб, 2007

2.       А.В. Бржезовский, Т.М. Максимова, А.А. Янкелевич - Теория языков программирования и методы трансляции. Средства автоматизации построения синтаксических анализаторов. Методические указания к выполнению лабораторных работ № 1-2, ГОУ ВПО СПбГУАП, СПб, 2006

.        Автономно-лингвистические и алгоритмические основы разработки и програмной реализации трансляторов, компиляторов и интерпритаторов, А.Б. Мартемьянов:

4.       http://cf. viplast.ru/programming/development/index. shtml <http://cf.viplast.ru/programming/development/index.shtml>

Приложения


Приложение 1. Текст программы

 

/* A Bison parser, made by GNU Bison 2.1 */

/* Identify Bison output. */

#define YYBISON 1

/* Bison version. */

#define YYBISON_VERSION "2.1"

/* Skeleton name. */

#define YYSKELETON_NAME "yacc. c"

/* Pure parsers. */

#define YYPURE 0

/* Using locations. */

#define YYLSP_NEEDED 0

/* Tokens. */

#ifndef YYTOKENTYPE

# define YYTOKENTYPE

/* Put the tokens into the symbol table, so that GDB and other debuggersabout them. */yytokentype {_DN_KW = 258,AP_NUMBER = 259,AP_CPND_KW = 260,AP_NAME_KW = 261,AP_XPLN_KW = 262,AP_DISPLAYFMT_KW = 263,AP_FIRSTLAST_KW = 264,AP_VMB_KW = 265,AP_VMBCOS_KW = 266,AP_SECONDDN_KW = 267,AP_THIRDDN_KW = 268,AP_VMBSTATE_KW = 269,AP_CONFIGURED_KW = 270,AP_TYPE_KW = 271,AP_SL = 272,AP_TN_KW = 273,AP_TN = 274,AP_KEY = 275,AP_KEY_KW = 276,AP_H_KW = 277,AP_MARP_KW = 278,AP_DES_KW = 279,AP_NAME = 280,AP_DATE = 281,AP_YEAR = 282

};

#endif

/* Tokens. */

#define AP_DN_KW 258

#define AP_NUMBER 259

#define AP_CPND_KW 260

#define AP_NAME_KW 261

#define AP_XPLN_KW 262

#define AP_DISPLAYFMT_KW 263

#define AP_FIRSTLAST_KW 264

#define AP_VMB_KW 265

#define AP_VMBCOS_KW 266

#define AP_SECONDDN_KW 267

#define AP_THIRDDN_KW 268

#define AP_VMBSTATE_KW 269

#define AP_CONFIGURED_KW 270

#define AP_TYPE_KW 271

#define AP_SL 272

#define AP_TN_KW 273

#define AP_TN 274

#define AP_KEY 275

#define AP_KEY_KW 276

#define AP_H_KW 277

#define AP_MARP_KW 278

#define AP_DES_KW 279

#define AP_NAME 280

#define AP_DATE 281

#define AP_YEAR 282

/* Copy the first part of user declarations. */

#line 1 "bison. txt"

#include <stdlib. h>

#include <stdio. h>yylex ();yyerror (char const *msg);

/* Enabling traces. */

#ifndef YYDEBUG

# define YYDEBUG 0

#endif

/* Enabling verbose error messages. */

#ifdef YYERROR_VERBOSE

# undef YYERROR_VERBOSE

# define YYERROR_VERBOSE 1

#else

# define YYERROR_VERBOSE 0

#endif

/* Enabling the token table. */

#ifndef YYTOKEN_TABLE

# define YYTOKEN_TABLE 0

#endif

#if! defined (YYSTYPE) &&! defined (YYSTYPE_IS_DECLARED)

#line 9 "bison. txt"union YYSTYPE {* string;

} YYSTYPE;

/* Line 196 of yacc. c. */

#line 150 "bison. c"

# define yystype YYSTYPE /* obsolescent; will be withdrawn */

# define YYSTYPE_IS_DECLARED 1

# define YYSTYPE_IS_TRIVIAL 1

#endif

/* Copy the second part of user declarations. */

/* Line 219 of yacc. c. */

#line 162 "bison. c"

#if! defined (YYSIZE_T) && defined (__SIZE_TYPE__)

# define YYSIZE_T __SIZE_TYPE__

#endif

#if! defined (YYSIZE_T) && defined (size_t)

# define YYSIZE_T size_t

#endif

#if! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))

# include <stddef. h> /* INFRINGES ON USER NAME SPACE */

# define YYSIZE_T size_t

#endif

#if! defined (YYSIZE_T)

# define YYSIZE_T unsigned int

#endif

#ifndef YY_

# if YYENABLE_NLS

# if ENABLE_NLS

# include <libintl. h> /* INFRINGES ON USER NAME SPACE */

# define YY_ (msgid) dgettext ("bison-runtime", msgid)

# endif

# endif

# ifndef YY_

# define YY_ (msgid) msgid

# endif

#endif

#if! defined (yyoverflow) || YYERROR_VERBOSE

/* The parser invokes alloca or malloc; define the necessary symbols. */

# ifdef YYSTACK_USE_ALLOCA

# if YYSTACK_USE_ALLOCA

# ifdef __GNUC__

# define YYSTACK_ALLOC __builtin_alloca

# else

# define YYSTACK_ALLOC alloca

# if defined (__STDC__) || defined (__cplusplus)

# include <stdlib. h> /* INFRINGES ON USER NAME SPACE */

# define YYINCLUDED_STDLIB_H

# endif

# endif

# endif

# endif

# ifdef YYSTACK_ALLOC

/* Pacify GCC's `empty if-body' warning. */

# define YYSTACK_FREE (Ptr) do { /* empty */; } while (0)

# ifndef YYSTACK_ALLOC_MAXIMUM

/* The OS might guarantee only one guard page at the bottom of the stack,a page size can be as small as 4096 bytes. So we cannot safelyalloca (N) if N exceeds 4096. Use a slightly smaller numberallow for a few compiler-allocated temporary stack slots. */

# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */

# endif

# else

# define YYSTACK_ALLOC YYMALLOC

# define YYSTACK_FREE YYFREE

# ifndef YYSTACK_ALLOC_MAXIMUM

# define YYSTACK_ALLOC_MAXIMUM ( (YYSIZE_T) - 1)

# endif

# ifdef __cplusplus"C" {

# endif

# ifndef YYMALLOC

# define YYMALLOC malloc

# if (! defined (malloc) &&! defined (YYINCLUDED_STDLIB_H) \

&& (defined (__STDC__) || defined (__cplusplus)))*malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */

# endif

# endif

# ifndef YYFREE

# define YYFREE free

# if (! defined (free) &&! defined (YYINCLUDED_STDLIB_H) \

&& (defined (__STDC__) || defined (__cplusplus)))free (void *); /* INFRINGES ON USER NAME SPACE */

# endif

# endif

# ifdef __cplusplus

}

# endif

# endif

#endif /*! defined (yyoverflow) || YYERROR_VERBOSE */

#if (! defined (yyoverflow) \

&& (! defined (__cplusplus) \

|| (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))

/* A type that is properly aligned for any stack member. */yyalloc

{int yyss;yyvs;

};

/* The size of the maximum gap between one aligned stack and the next. */

# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)

/* The size of an array large to enough to hold all stacks, each withelements. */

# define YYSTACK_BYTES (N) \

( (N) * (sizeof (short int) + sizeof (YYSTYPE)) \

+ YYSTACK_GAP_MAXIMUM)

/* Copy COUNT objects from FROM to TO. The source and destination dooverlap. */

# ifndef YYCOPY

# if defined (__GNUC__) && 1 < __GNUC__

# define YYCOPY (To, From, Count) \

__builtin_memcpy (To, From, (Count) * sizeof (* (From)))

# else

# define YYCOPY (To, From, Count) \\

{\_T yyi; \(yyi = 0; yyi < (Count); yyi++) \

(To) [yyi] = (From) [yyi]; \

}\(0)

# endif

# endif

/* Relocate STACK from its old location to the new one. Thevariables YYSIZE and YYSTACKSIZE give the old and new number ofin the stack, and YYPTR gives the new location of the. Advance YYPTR to a properly aligned location for the next. */

# define YYSTACK_RELOCATE (Stack) \\

{\_T yynewbytes; \(&yyptr->Stack, Stack, yysize); \= &yyptr->Stack; \= yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \+= yynewbytes / sizeof (*yyptr); \

}\(0)

#endif

#if defined (__STDC__) || defined (__cplusplus)signed char yysigned_char;

#elseshort int yysigned_char;

#endif

/* YYFINAL - State number of the termination state. */

#define YYFINAL 6

/* YYLAST - Last index in YYTABLE. */

#define YYLAST 41

/* YYNTOKENS - Number of terminals. */

#define YYNTOKENS 28

/* YYNNTS - Number of nonterminals. */

#define YYNNTS 7

/* YYNRULES - Number of rules. */

#define YYNRULES 8

/* YYNRULES - Number of states. */

#define YYNSTATES 36

/* YYTRANSLATE (YYLEX) - Bison symbol number corresponding to YYLEX. */

#define YYUNDEFTOK 2

#define YYMAXUTOK 282

#define YYTRANSLATE (YYX) \

( (unsigned int) (YYX) <= YYMAXUTOK? yytranslate [YYX]: YYUNDEFTOK)

/* YYTRANSLATE [YYLEX] - Bison symbol number corresponding to YYLEX. */const unsigned char yytranslate [] =

{

, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 2, 2, 2, 2,2, 2, 2, 2, 2, 2, 1, 2, 3, 4,5, 6, 7, 8, 9, 10, 11, 12, 13, 14,15, 16, 17, 18, 19, 20, 21, 22, 23, 24,25, 26, 27

};

#if YYDEBUG

/* YYPRHS [YYN] - Index of the first RHS symbol of rule number YYN in. */const unsigned char yyprhs [] =

{

, 0, 3, 5, 8, 13, 24, 32, 34

};

/* YYRHS - A `-1'-separated list of the rules' RHS. */const yysigned_char yyrhs [] =

{

, 0, - 1, 30, - 1, 29, 30, - 1, 31, 32,33, 34, - 1, 3, 4, 5, 6, 25, 25, 7,4, 8, 9, - 1, 10, 11, 4, 12, 13, 14,15, - 1, 16, - 1, 18, 19, 21, 20, 22, 23,24, 26, 27, - 1

};

/* YYRLINE [YYN] - source line where rule number YYN was defined. */const unsigned char yyrline [] =

{

, 18, 18, 18, 19, 20, 28, 30, 32

};

#endif

#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE

/* YYTNAME [SYMBOL-NUM] - String name of the symbol SYMBOL-NUM., the terminals, then, starting at YYNTOKENS, nonterminals. */const char *const yytname [] =

{

"$end", "error", "$undefined", "AP_DN_KW", "AP_NUMBER", "AP_CPND_KW",

"AP_NAME_KW", "AP_XPLN_KW", "AP_DISPLAYFMT_KW", "AP_FIRSTLAST_KW",

"AP_VMB_KW", "AP_VMBCOS_KW", "AP_SECONDDN_KW", "AP_THIRDDN_KW",

"AP_VMBSTATE_KW", "AP_CONFIGURED_KW", "AP_TYPE_KW", "AP_SL", "AP_TN_KW",

"AP_TN", "AP_KEY", "AP_KEY_KW", "AP_H_KW", "AP_MARP_KW", "AP_DES_KW",

"AP_NAME", "AP_DATE", "AP_YEAR", "$accept", "list", "record", "userinfo",

"dopinfo", "type", "summary", 0

};

#endif

# ifdef YYPRINT

/* YYTOKNUM [YYLEX-NUM] - Internal token number corresponding toYYLEX-NUM. */const unsigned short int yytoknum [] =

{

, 256, 257, 258, 259, 260, 261, 262, 263, 264,265, 266, 267, 268, 269, 270, 271, 272, 273, 274,275, 276, 277, 278, 279, 280, 281, 282

};

# endif

/* YYR1 [YYN] - Symbol number of symbol that rule YYN derives. */const unsigned char yyr1 [] =

{

, 28, 29, 29, 30, 31, 32, 33, 34

};

/* YYR2 [YYN] - Number of symbols composing right hand side of rule YYN. */const unsigned char yyr2 [] =

{

, 2, 1, 2, 4, 10, 7, 1, 9

};

/* YYDEFACT [STATE-NAME] - Default rule to reduce with in stateNUM when YYTABLE doesn't specify something else to do. Zerothe default is an error. */const unsigned char yydefact [] =

{

, 0, 0, 2, 0, 0, 1, 3, 0, 0,0, 0, 7, 0, 0, 0, 0, 4, 0, 0,0, 0, 0, 0, 0, 0, 0, 0, 6, 0,0, 0, 5, 0, 0, 8

};

/* YYDEFGOTO [NTERM-NUM]. */const yysigned_char yydefgoto [] =

{

, 2, 3, 4, 9, 13, 17

/* YYPACT [STATE-NUM] - Index in YYTABLE of the portion describingNUM. */

#define YYPACT_NINF - 16const yysigned_char yypact [] =

{

, 1, 0, - 16, - 8, - 1, - 16, - 16, - 5, - 9,2, 5, - 16, - 7, - 15, 3, - 6, - 16, - 13, 4,3, 7, 6, - 4, 15, 8, 9, 13, - 16, 10,16, 11, - 16, 12, 14, - 16

};

/* YYPGOTO [NTERM-NUM]. */const yysigned_char yypgoto [] =

{

, - 16, 20, - 16, - 16, - 16, - 16

};

/* YYTABLE [YYPACT [STATE-NUM]]. What to do in state STATE-NUM. If, shift that token. If negative, reduce the rule whichis the opposite. If zero, do what YYDEFACT says.YYTABLE_NINF, syntax error. */

#define YYTABLE_NINF - 1const unsigned char yytable [] =

{

, 1, 8, 1, 10, 5, 11, 12, 14, 15,18, 16, 21, 20, 24, 19, 26, 22, 23, 27,25, 30, 7, 28, 0, 32, 0, 0, 0, 0,0, 29, 0, 31, 0, 33, 0, 0, 34, 0,0, 35

};const yysigned_char yycheck [] =

{

, 3, 10, 3, 5, 4, 11, 16, 6, 4,25, 18, 25, 19, 7, 12, 20, 13, 21, 4,14, 8, 2, 15, - 1, 9, - 1, - 1, - 1, - 1,1, 22, - 1, 23, - 1, 24, - 1, - 1, 26, - 1,1, 27

};

/* YYSTOS [STATE-NUM] - The (internal number of the) accessingof state STATE-NUM. */const unsigned char yystos [] =

{

, 3, 29, 30, 31, 4, 0, 30, 10, 32,5, 11, 16, 33, 6, 4, 18, 34, 25, 12,19, 25, 13, 21, 7, 14, 20, 4, 15, 22,8, 23, 9, 24, 26, 27

};

#define yyerrok (yyerrstatus = 0)

#define yyclearin (yychar = YYEMPTY)

#define YYEMPTY (-2)

#define YYEOF0

#define YYACCEPTgoto yyacceptlab

#define YYABORTgoto yyabortlab

#define YYERRORgoto yyerrorlab

/* Like YYERROR except do call yyerror. This remains here temporarilyease the transition to the new meaning of YYERROR, for GCC.GCC version 2 has supplanted version 1, this can go. */

#define YYFAILgoto yyerrlab

#define YYRECOVERING () (!! yyerrstatus)

#define YYBACKUP (Token, Value) \\(yychar == YYEMPTY && yylen == 1) \

{\= (Token); \= (Value); \= YYTRANSLATE (yychar); \; \yybackup; \

}\\

{\(YY_ ("syntax error: cannot back up")); \; \

}\(0)

#define YYTERROR1

#define YYERRCODE256

/* YYLLOC_DEFAULT - Set CURRENT to span from RHS [1] to RHS [N].N is 0, then set CURRENT to the empty location which endsprevious symbol: RHS [0] (always defined). */

#define YYRHSLOC (Rhs, K) ( (Rhs) [K])

#ifndef YYLLOC_DEFAULT

# define YYLLOC_DEFAULT (Current, Rhs, N) \\(N) \

{\

(Current). first_line = YYRHSLOC (Rhs, 1). first_line; \

(Current). first_column = YYRHSLOC (Rhs, 1). first_column; \

(Current). last_line = YYRHSLOC (Rhs, N). last_line; \

(Current). last_column = YYRHSLOC (Rhs, N). last_column; \

}\\

{\

(Current). first_line = (Current). last_line =\(Rhs, 0). last_line; \

(Current). first_column = (Current). last_column =\(Rhs, 0). last_column; \

}\(0)

#endif

/* YY_LOCATION_PRINT - Print the location on the stream.macro was not mandated originally: define only if we knowwon't break user code: when these are the locations we know. */

#ifndef YY_LOCATION_PRINT

# if YYLTYPE_IS_TRIVIAL

# define YY_LOCATION_PRINT (File, Loc) \(File, "%d. %d-%d. %d",\

(Loc). first_line, (Loc). first_column,\

(Loc). last_line, (Loc). last_column)

# else

# define YY_LOCATION_PRINT (File, Loc) ( (void) 0)

# endif

#endif

/* YYLEX - calling `yylex' with the right arguments. */

#ifdef YYLEX_PARAM

# define YYLEX yylex (YYLEX_PARAM)

#else

# define YYLEX yylex ()

#endif

/* Enable debugging if requested. */

#if YYDEBUG

# ifndef YYFPRINTF

# include <stdio. h> /* INFRINGES ON USER NAME SPACE */

# define YYFPRINTF fprintf

# endif

# define YYDPRINTF (Args) \{\(yydebug) \Args; \

} while (0)

# define YY_SYMBOL_PRINT (Title, Type, Value, Location) \{\(yydebug) \

{\(stderr, "%s", Title); \(stderr,\, Value); \(stderr, "\n"); \

}\

} while (0)

/*------------------------------------------------------------------.

| yy_stack_print - Print the state stack from its BOTTOM up to its |

| TOP (included). |

`------------------------------------------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)void_stack_print (short int *bottom, short int *top)

#elsevoid_stack_print (bottom, top)int *bottom;int *top;

#endif

{(stderr, "Stack now");(/* Nothing. */; bottom <= top; ++bottom)(stderr, " %d", *bottom);(stderr, "\n");

}

# define YY_STACK_PRINT (Bottom, Top) \{\(yydebug) \_stack_print ( (Bottom), (Top)); \

} while (0)

/*------------------------------------------------.

| Report that the YYRULE is going to be reduced. |

`------------------------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)void_reduce_print (int yyrule)

#elsevoid_reduce_print (yyrule)yyrule;

#endif

{yyi;long int yylno = yyrline [yyrule];(stderr, "Reducing stack by rule %d (line %lu), ",- 1, yylno);

/* Print the symbols being reduced, and their result. */(yyi = yyprhs [yyrule]; 0 <= yyrhs [yyi]; yyi++)(stderr, "%s", yytname [yyrhs [yyi]]);(stderr, "-> %s\n", yytname [yyr1 [yyrule]]);

}

# define YY_REDUCE_PRINT (Rule) \{\(yydebug) \_reduce_print (Rule); \

} while (0)

/* Nonzero means print parse trace. It is left uninitialized so thatparsers can coexist. */yydebug;

#else /*! YYDEBUG */

# define YYDPRINTF (Args)

# define YY_SYMBOL_PRINT (Title, Type, Value, Location)

# define YY_STACK_PRINT (Bottom, Top)

# define YY_REDUCE_PRINT (Rule)

#endif /*! YYDEBUG */

/* YYINITDEPTH - initial size of the parser's stacks. */

#ifndefYYINITDEPTH

# define YYINITDEPTH 200

#endif

/* YYMAXDEPTH - maximum size the stacks can grow to (effective onlythe built-in stack extension method is used).not make this value too large; the results are undefined if_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)with infinite-precision integer arithmetic. */

#ifndef YYMAXDEPTH

# define YYMAXDEPTH 10000

#endif

#if YYERROR_VERBOSE

# ifndef yystrlen

# if defined (__GLIBC__) && defined (_STRING_H)

# define yystrlen strlen

# else

/* Return the length of YYSTR. */YYSIZE_T

# if defined (__STDC__) || defined (__cplusplus)(const char *yystr)

# else(yystr)char *yystr;

# endif

{char *yys = yystr;(*yys++! = '\0');yys - yystr - 1;

}

# endif

# endif

# ifndef yystpcpy

# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)

# define yystpcpy stpcpy

# else

/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in. */char *

# if defined (__STDC__) || defined (__cplusplus)(char *yydest, const char *yysrc)

# else(yydest, yysrc)*yydest;char *yysrc;

# endif

{*yyd = yydest;char *yys = yysrc;( (*yyd++ = *yys++)! = '\0');yyd - 1;

}

# endif

# endif

# ifndef yytnamerr

/* Copy to YYRES the contents of YYSTR after stripping away unnecessaryand backslashes, so that it's suitable for yyerror. Theis that double-quoting is unnecessary unless the stringan apostrophe, a comma, or backslash (other thanbackslash). YYSTR is taken from yytname. If YYRES is, do not copy; instead, return the length of what the resulthave been. */YYSIZE_T(char *yyres, const char *yystr)

{(*yystr == '"')

{_t yyn = 0;const *yyp = yystr;(;;)(*++yyp)

{'\'':',':do_not_strip_quotes;'\\':(*++yyp! = '\\')do_not_strip_quotes;

/* Fall through. */:(yyres)[yyn] = *yyp;++;;'"':(yyres)[yyn] = '\0';yyn;

}_not_strip_quotes:;

}(! yyres)yystrlen (yystr);yystpcpy (yyres, yystr) - yyres;

}

# endif

#endif /* YYERROR_VERBOSE */

#if YYDEBUG

/*--------------------------------.

| Print this symbol on YYOUTPUT. |

`--------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)void(FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)

#elsevoid(yyoutput, yytype, yyvaluep)*yyoutput;yytype;*yyvaluep;

#endif

{

/* Pacify ``unused variable'' warnings. */

(void) yyvaluep;(yytype < YYNTOKENS)(yyoutput, "token %s (", yytname [yytype]);(yyoutput, "nterm %s (", yytname [yytype]);

# ifdef YYPRINT(yytype < YYNTOKENS)(yyoutput, yytoknum [yytype], *yyvaluep);

# endif(yytype)

{:;

}(yyoutput, ")");

}

#endif /*! YYDEBUG */

/*-----------------------------------------------.

| Release the memory associated to this symbol. |

`-----------------------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)void(const char *yymsg, int yytype, YYSTYPE *yyvaluep)

#elsevoid(yymsg, yytype, yyvaluep)char *yymsg;yytype;*yyvaluep;

#endif

{

/* Pacify ``unused variable'' warnings. */

(void) yyvaluep;(! yymsg)= "Deleting";_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);(yytype)

{:;

}

}

/* Prevent warnings from - Wmissing-prototypes. */

#ifdef YYPARSE_PARAM

# if defined (__STDC__) || defined (__cplusplus)

int yyparse (void *YYPARSE_PARAM);

# elseyyparse ();

# endif

#else /*! YYPARSE_PARAM */

#if defined (__STDC__) || defined (__cplusplus)yyparse (void);

#elseyyparse ();

#endif

#endif /*! YYPARSE_PARAM */

/* The look-ahead symbol. */yychar;

/* The semantic value of the look-ahead symbol. */yylval;

/* Number of syntax errors so far. */yynerrs;

/*----------.

| yyparse. |

`----------*/

#ifdef YYPARSE_PARAM

# if defined (__STDC__) || defined (__cplusplus)

int yyparse (void *YYPARSE_PARAM)

# elseyyparse (YYPARSE_PARAM)*YYPARSE_PARAM;

# endif

#else /*! YYPARSE_PARAM */

#if defined (__STDC__) || defined (__cplusplus)(void)

#else()

;

#endif

#endif

{yystate;yyn;yyresult;

/* Number of tokens to shift before error messages enabled. */yyerrstatus;

/* Look-ahead token as an internal (translated) token number. */yytoken = 0;

/* Three stacks and their tools:

`yyss': related to states,

`yyvs': related to semantic values,

`yyls': related to locations.to the stacks thru separate pointers, to allow yyoverflowreallocate them elsewhere. */

/* The state stack. */int yyssa [YYINITDEPTH];int *yyss = yyssa;int *yyssp;

/* The semantic value stack. */yyvsa [YYINITDEPTH];*yyvs = yyvsa;*yyvsp;

#define YYPOPSTACK (yyvsp--, yyssp--)_T yystacksize = YYINITDEPTH;

/* The variables used to return semantic value and location from theroutines. */yyval;

/* When reducing, the number of symbols on the RHS of the reduced. */yylen;( (stderr, "Starting parse\n"));= 0;= 0;= 0;= YYEMPTY; /* Cause a token to be read. */

/* Initialize stack pointers.one element of value and location stackthat they stay on the same level as the state stack.wasted elements are never initialized. */= yyss;= yyvs;yysetstate;

/*------------------------------------------------------------.

| yynewstate - Push a new state, which is found in yystate. |

`------------------------------------------------------------*/:

/* In all cases, when you get here, the value and location stacksjust been pushed. so pushing a state here evens the stacks.

*/++;:

*yyssp = yystate;(yyss + yystacksize - 1 <= yyssp)

{

/* Get the current used size of the three stacks, in elements. */_T yysize = yyssp - yyss + 1;

#ifdef yyoverflow

{

/* Give user a chance to reallocate the stack. Use copies ofso that the &'s don't force the real ones into. */*yyvs1 = yyvs;int *yyss1 = yyss;

/* Each stack pointer address is followed by the size of thein use in that stack, in bytes. This used to be aaround just the two extra args, but that mightundefined if yyoverflow is a macro. */(YY_ ("memory exhausted"),

&yyss1, yysize * sizeof (*yyssp),

&yyvs1, yysize * sizeof (*yyvsp),

&yystacksize);= yyss1;= yyvs1;

}

#else /* no yyoverflow */

# ifndef YYSTACK_RELOCATEyyexhaustedlab;

# else

/* Extend the stack our own way. */(YYMAXDEPTH <= yystacksize)yyexhaustedlab;*= 2;(YYMAXDEPTH < yystacksize)= YYMAXDEPTH;

{int *yyss1 = yyss;yyalloc *yyptr =

(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));(! yyptr)yyexhaustedlab;_RELOCATE (yyss);_RELOCATE (yyvs);

# undef YYSTACK_RELOCATE(yyss1! = yyssa)_FREE (yyss1);

}

# endif

#endif /* no yyoverflow */= yyss + yysize - 1;= yyvs + yysize - 1;( (stderr, "Stack size increased to %lu\n",

(unsigned long int) yystacksize));(yyss + yystacksize - 1 <= yyssp);

}( (stderr, "Entering state %d\n", yystate));yybackup;

/*-----------.

| yybackup. |

`-----------*/:

/* Do appropriate processing given the current state. */

/* Read a look-ahead token if we need one and don't already have one. */

/* yyresume: */

/* First try to decide what to do without reference to look-ahead token. */= yypact [yystate];(yyn == YYPACT_NINF)yydefault;

/* Not known => get a look-ahead token if don't already have one. */

/* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */(yychar == YYEMPTY)

{( (stderr, "Reading a token: "));= YYLEX;

}(yychar <= YYEOF)

{= yytoken = YYEOF;( (stderr, "Now at end of input. \n"));

}

{= YYTRANSLATE (yychar);_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);

}

/* If the proper action on seeing token YYTOKEN is to reduce or toan error, take that action. */+= yytoken;(yyn < 0 || YYLAST < yyn || yycheck [yyn]! = yytoken)yydefault;= yytable [yyn];(yyn <= 0)

{(yyn == 0 || yyn == YYTABLE_NINF)yyerrlab;= - yyn;yyreduce;

}(yyn == YYFINAL);

/* Shift the look-ahead token. */_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);

/* Discard the token being shifted unless it is eof. */(yychar! = YYEOF)= YYEMPTY;

*++yyvsp = yylval;

/* Count tokens shifted since error; after three, turn off error. */(yyerrstatus)-;= yyn;yynewstate;

/*-----------------------------------------------------------.

| yydefault - do the default action for the current state. |

`-----------------------------------------------------------*/:= yydefact [yystate];(yyn == 0)yyerrlab;yyreduce;

/*-----------------------------.

| yyreduce - Do a reduction. |

`-----------------------------*/:

/* yyn is the number of a rule to reduce with. */= yyr2 [yyn];

/* If YYLEN is nonzero, implement the default value of the action:

`$$ = $1'., the following line sets YYVAL to garbage.behavior is undocumented and Bisonshould not rely upon it. Assigning to YYVALmakes the parser a bit smaller, and it avoids awarning that YYVAL may be used uninitialized. */= yyvsp [1-yylen];_REDUCE_PRINT (yyn);(yyn)

{5:

#line 21 "bison. txt"

{("%s\t", (yyvsp [-8]. string));("%s\t", (yyvsp [-5]. string));("\t%s", (yyvsp [-4]. string));

printf ("\n---------------------------------");("\n");

; };

case 6:

#line 29 "bison. txt"

{; };7:

#line 31 "bison. txt"

{; };8:

#line 33 "bison. txt"

{; };: break;

}

/* Line 1126 of yacc. c. */

#line 1192 "bison. c"- = yylen;- = yylen;_STACK_PRINT (yyss, yyssp);

*++yyvsp = yyval;

/* Now `shift' the result of the reduction. Determine what stategoes to, based on the state we popped back to and the rulereduced by. */= yyr1 [yyn];= yypgoto [yyn - YYNTOKENS] + *yyssp;(0 <= yystate && yystate <= YYLAST && yycheck [yystate] == *yyssp)= yytable [yystate];= yydefgoto [yyn - YYNTOKENS];yynewstate;

/*------------------------------------.

| yyerrlab - here on detecting error |

`------------------------------------*/:

/* If not already recovering from an error, report this error. */(! yyerrstatus)

{

++yynerrs;

#if YYERROR_VERBOSE= yypact [yystate];(YYPACT_NINF < yyn && yyn < YYLAST)

{yytype = YYTRANSLATE (yychar);_T yysize0 = yytnamerr (0, yytname [yytype]);_T yysize = yysize0;_T yysize1;yysize_overflow = 0;*yymsg = 0;

# define YYERROR_VERBOSE_ARGS_MAXIMUM 5const *yyarg [YYERROR_VERBOSE_ARGS_MAXIMUM];yyx;

#if 0

/* This is so xgettext sees the translatable formats that areon the fly. */_ ("syntax error, unexpected %s");_ ("syntax error, unexpected %s, expecting %s");_ ("syntax error, unexpected %s, expecting %s or %s");_ ("syntax error, unexpected %s, expecting %s or %s or %s");_ ("syntax error, unexpected %s, expecting %s or %s or %s or %s");

#endif*yyfmt;const *yyf;char const yyunexpected [] = "syntax error, unexpected %s";char const yyexpecting [] =", expecting %s";char const yyor [] = " or %s";yyformat [sizeof yyunexpected

+ sizeof yyexpecting - 1

+ ( (YYERROR_VERBOSE_ARGS_MAXIMUM - 2)

* (sizeof yyor - 1))];const *yyprefix = yyexpecting;

/* Start YYX at - YYN if negative to avoid negative indexes in. */yyxbegin = yyn < 0? - yyn: 0;

/* Stay within bounds of both yycheck and yytname. */yychecklim = YYLAST - yyn;yyxend = yychecklim < YYNTOKENS? yychecklim: YYNTOKENS;yycount = 1;[0] = yytname [yytype];= yystpcpy (yyformat, yyunexpected);(yyx = yyxbegin; yyx < yyxend; ++yyx)(yycheck [yyx + yyn] == yyx && yyx! = YYTERROR)

{(yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)

{= 1;= yysize0;[sizeof yyunexpected - 1] = '\0';;

}[yycount++] = yytname [yyx];= yysize + yytnamerr (0, yytname [yyx]);_overflow |= yysize1 < yysize;= yysize1;= yystpcpy (yyfmt, yyprefix);= yyor;

}= YY_ (yyformat);= yysize + yystrlen (yyf);_overflow |= yysize1 < yysize;= yysize1;(! yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)= (char *) YYSTACK_ALLOC (yysize);(yymsg)

{

/* Avoid sprintf, as that infringes on the user's name space.'t have undefined behavior even if the translationa string with the wrong number of "%s"s. */*yyp = yymsg;yyi = 0;( (*yyp = *yyf))

{(*yyp == '%' && yyf [1] == 's' && yyi < yycount)

{+= yytnamerr (yyp, yyarg [yyi++]);+= 2;

}

{++;++;

}

}(yymsg);_FREE (yymsg);

}

{(YY_ ("syntax error"));yyexhaustedlab;

}

}

#endif /* YYERROR_VERBOSE */(YY_ ("syntax error"));

}(yyerrstatus == 3)

{

/* If just tried and failed to reuse look-ahead token after an, discard it. */(yychar <= YYEOF)

{

/* Return failure if at end of input. */(yychar == YYEOF);

}

{("Error: discarding", yytoken, &yylval);= YYEMPTY;

}

}

/* Else will try to reuse look-ahead token after shifting the error. */yyerrlab1;

/*---------------------------------------------------.

| yyerrorlab - error raised explicitly by YYERROR. |

`---------------------------------------------------*/:

/* Pacify compilers like GCC when the user code never invokesand the label yyerrorlab therefore never appears in user. */(0)yyerrorlab;- = yylen;- = yylen;= *yyssp;yyerrlab1;

/*-------------------------------------------------------------.

| yyerrlab1 - common code for both syntax error and YYERROR. |

`-------------------------------------------------------------*/:= 3; /* Each real token shifted decrements this. */(;;)

{+= YYTERROR;(0 <= yyn && yyn <= YYLAST && yycheck [yyn] == YYTERROR)

{= yytable [yyn];(0 < yyn);

}

}

/* Pop the current state because it cannot handle the error token. */(yyssp == yyss);("Error: popping", yystos [yystate], yyvsp);;= *yyssp;_STACK_PRINT (yyss, yyssp);

}(yyn == YYFINAL);

*++yyvsp = yylval;

/* Shift the error token. */_SYMBOL_PRINT ("Shifting", yystos [yyn], yyvsp, yylsp);= yyn;yynewstate;

/*-------------------------------------.

| yyacceptlab - YYACCEPT comes here. |

`-------------------------------------*/:= 0;yyreturn;

/*-----------------------------------.

| yyabortlab - YYABORT comes here. |

`-----------------------------------*/:= 1;yyreturn;

#ifndef yyoverflow

/*-------------------------------------------------.

| yyexhaustedlab - memory exhaustion comes here. |

`-------------------------------------------------*/:(YY_ ("memory exhausted"));= 2;

/* Fall through. */

#endif:(yychar! = YYEOF && yychar! = YYEMPTY)("Cleanup: discarding lookahead",, &yylval);(yyssp! = yyss)

{("Cleanup: popping",[*yyssp], yyvsp);;

}

#ifndef yyoverflow(yyss! = yyssa)_FREE (yyss);

#endifyyresult;

}

#line 34 "bison. txt"

Приложение 2. Тестовые случаи

Тест 1

Входные данные: На входе корректный файл

DN 1003Norris Lam27_FMT FIRST,LAST_COS 4_DN_DN_STATE CONFIGUREDSL1024 0 06 14 KEY 00 H MARP DES LAM 29 JUN 2000

(2008)

Выходные данные:of Directory Numbers with users' names.First name Last name

=================================

1002 BRIAN WALSH

-------------------------------

Norris Lam

-------------------------------

IRINA SEMENYURA

--------------------------------

Тест 2

Входные данные: На входе файл с некорректными данными (отсутствет номер)

DNNorris Lam27_FMT FIRST,LAST_COS 4_DN_DN_STATE CONFIGUREDSL1024 0 06 14 KEY 00 H MARP DES LAM 29 JUN 2000

(2008)

Выходные данные:of Directory Numbers with users' names.First name Last name

=================================

BRIAN WALSH

-------------------------------error!error [1]!

Тест 3

Входные данные: На входе отсутствует файл

Выходные данные: Error: Can't open file.

Похожие работы на - Разработка системы программирования для обработки данных строкового типа

 

Не нашли материал для своей работы?
Поможем написать уникальную работу
Без плагиата!