more distinction
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@1073 59561ff5-6e30-0410-9f3c-9617f08c8826
diff --git a/libasn1parser/asn1p_y.y b/libasn1parser/asn1p_y.y
index f39bd12..323ebe7 100644
--- a/libasn1parser/asn1p_y.y
+++ b/libasn1parser/asn1p_y.y
@@ -107,6 +107,7 @@
* Token types returned by scanner.
*/
%token TOK_PPEQ /* "::=", Pseudo Pascal EQuality */
+%token <tv_opaque> TOK_whitespace /* A span of whitespace */
%token <tv_opaque> TOK_opaque /* opaque data (driven from .y) */
%token <tv_str> TOK_bstring
%token <tv_opaque> TOK_cstring
@@ -1073,8 +1074,9 @@
;
WithSyntaxToken:
- TOK_opaque {
+ TOK_whitespace {
$$ = asn1p_wsyntx_chunk_frombuf($1.buf, $1.len, 0);
+ $$->type = WC_WHITESPACE;
}
| TOK_Literal {
$$ = asn1p_wsyntx_chunk_frombuf($1, strlen($1), 0);