working on 1.5h.
This commit is contained in:
parent
021c7297f1
commit
e35305bbf9
@ -47,7 +47,7 @@ static int scan(struct flights *const f,
|
|||||||
|
|
||||||
//unix_control = [\x01-\x08\x0b-\x1f\x7f];
|
//unix_control = [\x01-\x08\x0b-\x1f\x7f];
|
||||||
ws = [ \t];
|
ws = [ \t];
|
||||||
glyph = [^\x00-\x20\x7f]; // [^\n\t ] + all the other weird
|
glyph = [^\x00-\x20\x7f]; // [^\x00\n\t ] + all weird
|
||||||
semitext = glyph \ ";";
|
semitext = glyph \ ";";
|
||||||
natural = [1-9][0-9]*;
|
natural = [1-9][0-9]*;
|
||||||
minutes = [0-5][0-9];
|
minutes = [0-5][0-9];
|
||||||
@ -148,10 +148,11 @@ static int scan(struct flights *const f,
|
|||||||
<flight_airports> * { why = "airports unrecognized"; goto catch; }
|
<flight_airports> * { why = "airports unrecognized"; goto catch; }
|
||||||
<flight_pic> * { why = "pic unrecognized"; goto catch; }
|
<flight_pic> * { why = "pic unrecognized"; goto catch; }
|
||||||
<flight_sic> * { why = "sic unrecognized"; goto catch; }
|
<flight_sic> * { why = "sic unrecognized"; goto catch; }
|
||||||
<flight_dual> * { why = "dual unrecognized"; goto catch; }
|
<flight_dual> * { why = "dual time unrecognized"; goto catch; }
|
||||||
<flight_pilot> * { why = "pilot unrecognized"; goto catch; }
|
<flight_pilot> * { why = "pilot time unrecognized"; goto catch; }
|
||||||
<flight_ifrsim> * { why = "simulated ifr unrecognized"; goto catch; }
|
<flight_ifrsim> * { why = "simulated ifr time unrecognized";
|
||||||
<flight_ifr> * { why = "ifr unrecognized"; goto catch; }
|
goto catch; }
|
||||||
|
<flight_ifr> * { why = "ifr time unrecognized"; goto catch; }
|
||||||
<flight_remarks> * { why = "remarks unrecognized"; goto catch; }
|
<flight_remarks> * { why = "remarks unrecognized"; goto catch; }
|
||||||
<flight_type> ws* @s0 semitext+ @s1 ws* ";" => flight_reg {
|
<flight_type> ws* @s0 semitext+ @s1 ws* ";" => flight_reg {
|
||||||
const union line64 key
|
const union line64 key
|
||||||
@ -174,6 +175,14 @@ static int scan(struct flights *const f,
|
|||||||
flight->power.landing.a = t0, flight->power.landing.b = t1;
|
flight->power.landing.a = t0, flight->power.landing.b = t1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
<flight_pic> ws* @s0 semitext+ (ws+ semitext+)* @s1 ws* ";"
|
||||||
|
=> flight_sic { flight->power.pilot.a = s0,
|
||||||
|
flight->power.pilot.b = s1; continue; }
|
||||||
|
<flight_sic> ws* ";" => flight_dual
|
||||||
|
{ flight->power.copilot.a = flight->power.copilot.b = 0; continue; }
|
||||||
|
<flight_sic> ws* @s0 semitext+ (ws+ semitext+)* @s1 ws* ";"
|
||||||
|
=> flight_dual { flight->power.copilot.a = s0,
|
||||||
|
flight->power.copilot.b = s1; continue; }
|
||||||
|
|
||||||
|
|
||||||
*/ }
|
*/ }
|
||||||
|
@ -39,6 +39,11 @@ int pair_to_minutes(const char *h0, const char *const h1,
|
|||||||
? (*n = hours * 60 + minutes, 1) : 0;
|
? (*n = hours * 60 + minutes, 1) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** `h0` "1" `h1` "." `m0` "5" `m1` -> 90 `n` @return Valid. */
|
||||||
|
int pair_hours_to_minutes(const char *h0, const char *const h1,
|
||||||
|
const char *m0, const char *const m1, uint32_t *const n) {
|
||||||
|
}
|
||||||
|
|
||||||
int pair_is_equal(struct pair x, struct pair y) {
|
int pair_is_equal(struct pair x, struct pair y) {
|
||||||
assert(x.a <= x.b && y.a <= y.b);
|
assert(x.a <= x.b && y.a <= y.b);
|
||||||
if(!x.a) return !y.a;
|
if(!x.a) return !y.a;
|
||||||
|
Loading…
Reference in New Issue
Block a user