Commit 76344d43 authored by dickelbeck's avatar dickelbeck

more specctra dsn work

parent 879fceca
...@@ -81,6 +81,7 @@ const static KEYWORD tokens[] = { ...@@ -81,6 +81,7 @@ const static KEYWORD tokens[] = {
TOKDEF(boundary), TOKDEF(boundary),
TOKDEF(brickpat), TOKDEF(brickpat),
TOKDEF(bundle), TOKDEF(bundle),
TOKDEF(bus),
TOKDEF(bypass), TOKDEF(bypass),
TOKDEF(capacitance_resolution), TOKDEF(capacitance_resolution),
TOKDEF(capacitor), TOKDEF(capacitor),
...@@ -136,6 +137,7 @@ const static KEYWORD tokens[] = { ...@@ -136,6 +137,7 @@ const static KEYWORD tokens[] = {
TOKDEF(family), TOKDEF(family),
TOKDEF(family_family), TOKDEF(family_family),
TOKDEF(family_family_spacing), TOKDEF(family_family_spacing),
TOKDEF(fanout),
TOKDEF(farad), TOKDEF(farad),
TOKDEF(file), TOKDEF(file),
TOKDEF(fit), TOKDEF(fit),
...@@ -301,6 +303,7 @@ const static KEYWORD tokens[] = { ...@@ -301,6 +303,7 @@ const static KEYWORD tokens[] = {
TOKDEF(primary), TOKDEF(primary),
TOKDEF(priority), TOKDEF(priority),
TOKDEF(property), TOKDEF(property),
TOKDEF(protect),
TOKDEF(qarc), TOKDEF(qarc),
TOKDEF(quarter), TOKDEF(quarter),
TOKDEF(radius), TOKDEF(radius),
...@@ -355,6 +358,7 @@ const static KEYWORD tokens[] = { ...@@ -355,6 +358,7 @@ const static KEYWORD tokens[] = {
TOKDEF(smd), TOKDEF(smd),
TOKDEF(snap), TOKDEF(snap),
TOKDEF(snap_angle), TOKDEF(snap_angle),
TOKDEF(soft),
TOKDEF(source), TOKDEF(source),
TOKDEF(space_in_quoted_tokens), TOKDEF(space_in_quoted_tokens),
TOKDEF(spacing), TOKDEF(spacing),
...@@ -688,27 +692,28 @@ L_read: ...@@ -688,27 +692,28 @@ L_read:
head = cur+1; head = cur+1;
} }
// handle T_DASH or T_NUMBER /* get the dash out of a <pin_reference> which is embedded for example
like: U2-14 or "U2"-"14"
This is detectable by a non-space immediately preceeding the dash.
*/
else if( *cur == '-' && cur>start && !isspace( cur[-1] ) )
{
head = cur+1;
curText.clear();
curText += '-';
curTok = T_DASH;
}
// handle T_NUMBER
else if( strchr( "+-.0123456789", *cur ) ) else if( strchr( "+-.0123456789", *cur ) )
{ {
if( *cur=='-' && !strchr( ".0123456789", *(cur+1) ) ) head = cur+1;
{ while( head<limit && strchr( ".0123456789", *head ) )
head = cur+1; ++head;
curText.clear();
curText += *cur;
curTok = T_DASH;
}
else
{
head = cur+1;
while( head<limit && strchr( ".0123456789", *head ) )
++head;
curText.clear(); curText.clear();
curText.append( cur, head ); curText.append( cur, head );
curTok = T_NUMBER; curTok = T_NUMBER;
}
} }
// a quoted string // a quoted string
......
...@@ -81,6 +81,7 @@ enum DSN_T { ...@@ -81,6 +81,7 @@ enum DSN_T {
T_boundary, T_boundary,
T_brickpat, T_brickpat,
T_bundle, T_bundle,
T_bus,
T_bypass, T_bypass,
T_capacitance_resolution, T_capacitance_resolution,
T_capacitor, T_capacitor,
...@@ -136,6 +137,7 @@ enum DSN_T { ...@@ -136,6 +137,7 @@ enum DSN_T {
T_family, T_family,
T_family_family, T_family_family,
T_family_family_spacing, T_family_family_spacing,
T_fanout,
T_farad, T_farad,
T_file, T_file,
T_fit, T_fit,
...@@ -301,6 +303,7 @@ enum DSN_T { ...@@ -301,6 +303,7 @@ enum DSN_T {
T_primary, T_primary,
T_priority, T_priority,
T_property, T_property,
T_protect,
T_qarc, T_qarc,
T_quarter, T_quarter,
T_radius, T_radius,
...@@ -355,6 +358,7 @@ enum DSN_T { ...@@ -355,6 +358,7 @@ enum DSN_T {
T_smd, T_smd,
T_snap, T_snap,
T_snap_angle, T_snap_angle,
T_soft,
T_source, T_source,
T_space_in_quoted_tokens, T_space_in_quoted_tokens,
T_spacing, T_spacing,
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment