summaryrefslogtreecommitdiff
path: root/src/byte_class.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-12-19 00:16:17 +0000
committerVincent Sanders <vince@kyllikki.org>2017-12-19 00:16:17 +0000
commitd26bc9f19191e5dd7d233302f73f226c89cb797f (patch)
treecefc93be2ea2dcc5b07073e70ebedd82a96aced0 /src/byte_class.c
parent5de69a618c7858f997e9944c06837d951fc129aa (diff)
downloadlibnspdf-d26bc9f19191e5dd7d233302f73f226c89cb797f.tar.gz
libnspdf-d26bc9f19191e5dd7d233302f73f226c89cb797f.tar.bz2
write parse of strings
Diffstat (limited to 'src/byte_class.c')
-rw-r--r--src/byte_class.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/byte_class.c b/src/byte_class.c
index a8ab735..59c0206 100644
--- a/src/byte_class.c
+++ b/src/byte_class.c
@@ -11,6 +11,7 @@
* decimal - characters that appear in decimal values 0123456789
* hexidecimal - characters that appear in hex values 0123456789ABCDEF
* delimiter - The characters used to separate tokens ()[]{}<>/%
+ * comment - the % character used to introduce a comment
* whitespace - separate syntactic constructs like names and numbers treated
* as a single character except in comments, strings and streams
* end of line - characters that signify an end of line
@@ -52,8 +53,8 @@ const uint8_t byte_classification[] = {
BC_RGLR,
BC_RGLR,
BC_RGLR, /* 20 - 23 */
- BC_RGLR,
- BC_DELM, /* '$' '%' */
+ BC_RGLR, /* 24 - '$' */
+ BC_DELM | BC_CMNT, /* 25 - '%' */
BC_RGLR,
BC_RGLR, /* 26 - 27 */
BC_DELM,
@@ -64,14 +65,14 @@ const uint8_t byte_classification[] = {
BC_RGLR, /* 2C - 2D */
BC_RGLR,
BC_DELM, /* '.' '/' */
- BC_DCML | BC_HEXL,
- BC_DCML | BC_HEXL, /* '0' '1' */
- BC_DCML | BC_HEXL,
- BC_DCML | BC_HEXL, /* '2' '3' */
- BC_DCML | BC_HEXL,
- BC_DCML | BC_HEXL, /* '4' '5' */
- BC_DCML | BC_HEXL,
- BC_DCML | BC_HEXL, /* '6' '7' */
+ BC_OCTL | BC_DCML | BC_HEXL, /* 30 - '0' */
+ BC_OCTL | BC_DCML | BC_HEXL, /* 31 - '1' */
+ BC_OCTL | BC_DCML | BC_HEXL, /* 32 - '2' */
+ BC_OCTL | BC_DCML | BC_HEXL, /* 33 - '3' */
+ BC_OCTL | BC_DCML | BC_HEXL, /* 34 - '4' */
+ BC_OCTL | BC_DCML | BC_HEXL, /* 35 - '5' */
+ BC_OCTL | BC_DCML | BC_HEXL, /* 36 - '6' */
+ BC_OCTL | BC_DCML | BC_HEXL, /* 37 - '7' */
BC_DCML | BC_HEXL,
BC_DCML | BC_HEXL, /* '8' '9' */
BC_RGLR,
@@ -181,4 +182,4 @@ const uint8_t byte_classification[] = {
BC_RGLR, BC_RGLR, BC_RGLR, BC_RGLR, /* F8 - FF */
};
-const uint8_t *blcass = &byte_classification[0];
+const uint8_t *bclass = &byte_classification[0];