summaryrefslogtreecommitdiff
path: root/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.h
blob: 51de2e9f6cfeb4f1b89fa915b7c25cd3965cf142 (plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
 * Gregorio is a program that translates gabc files to GregorioTeX
 * This header shares definitions between the score parser and lexer.
 *
 * Gregorio score determination from gabc.
 * Copyright (C) 2006-2021 The Gregorio Project (see CONTRIBUTORS.md)
 *
 * This file is part of Gregorio.
 * 
 * This program is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation, either version 3 of the License, or (at your option)
 * any later version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 * 
 * You should have received a copy of the GNU General Public License along with 
 * this program.  If not, see <http://www.gnu.org/licenses/>. 
 */

#ifndef GABC_SCORE_DETERMINATION_H
#define GABC_SCORE_DETERMINATION_H

#include "bool.h"
#include "struct.h"
#include "gabc.h"

/* The bits in this enum are named to correspond with the _BEGIN/_END tokens */
typedef enum {
    SB_I = 0x01,
    SB_B = 0x02,
    SB_TT = 0x04,
    SB_SC = 0x08,
    SB_UL = 0x10,
    SB_C = 0x20,
    SB_ELISION = 0x40
} gabc_style_bits;

typedef union gabc_score_determination_lval_t {
    char *text;
    char character;
} gabc_score_determination_lval_t;

#define YYSTYPE gabc_score_determination_lval_t
#define YYSTYPE_IS_DECLARED 1

#define YY_DECL \
    int gabc_score_determination_lex(gabc_style_bits *const styles)
YY_DECL;

#define YYLTYPE gregorio_scanner_location

void gabc_suppress_extra_custos_at_linebreak(gregorio_score *score);
void gabc_fix_custos_pitches(gregorio_score *score_to_check);
bool gabc_check_score_integrity(gregorio_score *score_to_check);
bool gabc_check_infos_integrity(gregorio_score *score_to_check);
void gabc_determine_oriscus_orientation(const gregorio_score *score);
void gabc_determine_punctum_inclinatum_orientation(const gregorio_score *score);
void gabc_determine_ledger_lines(const gregorio_score *const score);

#endif