Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
c72857f4
Commit
c72857f4
authored
Jan 14, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more specctra dsn work
parent
f5f6bb6f
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
517 additions
and
108 deletions
+517
-108
dsn.cpp
pcbnew/dsn.cpp
+11
-3
dsn.h
pcbnew/dsn.h
+6
-0
specctra.cpp
pcbnew/specctra.cpp
+500
-105
No files found.
pcbnew/dsn.cpp
View file @
c72857f4
...
...
@@ -46,11 +46,13 @@ namespace DSN {
struct
KEYWORD
{
const
char
*
name
;
int
token
;
//
int token;
};
#define TOKDEF(x) { #x, T_##x }
//#define TOKDEF(x) { #x, T_##x }
#define TOKDEF(x) { #x }
// This MUST be sorted alphabetically, and also so MUST enum DSN_T {} be alphabetized.
// These MUST all be lower case because of the conversion to lowercase in findToken().
...
...
@@ -123,6 +125,7 @@ const static KEYWORD tokens[] = {
TOKDEF
(
diagonal
),
TOKDEF
(
direction
),
TOKDEF
(
directory
),
TOKDEF
(
discrete
),
TOKDEF
(
effective_via_length
),
TOKDEF
(
exclude
),
TOKDEF
(
expose
),
...
...
@@ -163,6 +166,7 @@ const static KEYWORD tokens[] = {
TOKDEF
(
image_image
),
TOKDEF
(
image_image_spacing
),
TOKDEF
(
image_outline_clearance
),
TOKDEF
(
image_set
),
TOKDEF
(
image_type
),
TOKDEF
(
inch
),
TOKDEF
(
include
),
...
...
@@ -310,6 +314,7 @@ const static KEYWORD tokens[] = {
TOKDEF
(
reorder
),
TOKDEF
(
reroute_order_viols
),
TOKDEF
(
resistance_resolution
),
TOKDEF
(
resistor
),
TOKDEF
(
resolution
),
TOKDEF
(
restricted_layer_length_factor
),
TOKDEF
(
room
),
...
...
@@ -341,6 +346,7 @@ const static KEYWORD tokens[] = {
TOKDEF
(
side
),
TOKDEF
(
signal
),
TOKDEF
(
site
),
TOKDEF
(
small
),
TOKDEF
(
smd
),
TOKDEF
(
snap
),
TOKDEF
(
snap_angle
),
...
...
@@ -420,6 +426,7 @@ const static KEYWORD tokens[] = {
TOKDEF
(
wiring
),
TOKDEF
(
write_resolution
),
TOKDEF
(
x
),
TOKDEF
(
xy
),
TOKDEF
(
y
),
};
...
...
@@ -513,7 +520,8 @@ int LEXER::findToken( const std::string& tok )
tokens
,
sizeof
(
tokens
)
/
sizeof
(
tokens
[
0
]),
sizeof
(
KEYWORD
),
compare
);
if
(
findings
)
return
findings
->
token
;
// return findings->token;
return
findings
-
tokens
;
else
return
-
1
;
}
...
...
pcbnew/dsn.h
View file @
c72857f4
...
...
@@ -42,6 +42,7 @@ namespace DSN {
enum
DSN_T
{
// the first few are special (the uppercase ones)
T_NONE
=
-
9
,
T_QUOTE_DEF
=
-
8
,
T_DASH
=
-
7
,
T_SYMBOL
=
-
6
,
...
...
@@ -123,6 +124,7 @@ enum DSN_T {
T_diagonal
,
T_direction
,
T_directory
,
T_discrete
,
T_effective_via_length
,
T_exclude
,
T_expose
,
...
...
@@ -163,6 +165,7 @@ enum DSN_T {
T_image_image
,
T_image_image_spacing
,
T_image_outline_clearance
,
T_image_set
,
T_image_type
,
T_inch
,
T_include
,
...
...
@@ -310,6 +313,7 @@ enum DSN_T {
T_reorder
,
T_reroute_order_viols
,
T_resistance_resolution
,
T_resistor
,
T_resolution
,
T_restricted_layer_length_factor
,
T_room
,
...
...
@@ -341,6 +345,7 @@ enum DSN_T {
T_side
,
T_signal
,
T_site
,
T_small
,
T_smd
,
T_snap
,
T_snap_angle
,
...
...
@@ -420,6 +425,7 @@ enum DSN_T {
T_wiring
,
T_write_resolution
,
T_x
,
T_xy
,
T_y
,
T_END
// just a sentinel, not a token
};
...
...
pcbnew/specctra.cpp
View file @
c72857f4
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment