jplevyak / dparser

A Scannerless GLR parser/parser generater.
https://github.com/jplevyak/dparser
BSD 3-Clause "New" or "Revised" License
105 stars 14 forks source link

support for aquiring a tokens matched string like $$.buf or yy.text #14

Open mgood7123 opened 5 years ago

mgood7123 commented 5 years ago

how can i obtain a tokens matched string as it is difficult to do so, for example

{
#include <stdio.h>

typedef struct My_Sym {
  int value;
} My_Sym;
#define D_UserSym My_Sym
typedef struct My_ParseNode {
  int value;
  struct D_Scope *scope;
} My_ParseNode;
#define D_ParseNode_User My_ParseNode
}

{
#include "libdparse.h"
#define f(x, y) if (y) x(y)
}

/* r: constant* [ puts("const"); ]; */

translation_unit: terminal* s;

terminal : identifier s ':' s rule* s ';' ;
rule : i* s rule* s ;

i : decimalint* s | hexint* s | octalint* s | character* s | float1* s | float2* s | string* s | identifier* s | integer* s | i* s;

s: [
    puts("speculative start");
    char * c = NULL;
    ps($n.start_loc.s);
    ps($n.end);
    ps($n.end_skip);
    for (c = $n.start_loc.s; c < $n.end_skip; c++) pc(*c);
    ps($n.start_loc.s)
    ps($n.end)
    puts("speculative end");
] 
{
    puts("final start");
    char * c = NULL;
    ps($n.start_loc.s);
    ps($n.end);
    ps($n.end_skip);
    for (c = $n.start_loc.s; c < $n.end_skip; c++) pc(*c);
    ps($n.start_loc.s)
    ps($n.end)
    puts("final end");
};

symbols : "[!~`@#$%^&*\-_+=|:;\\<,>.?/]";
character : "'([^'\\]|\\[^])*'";
float1 : "([0-9]+.[0-9]*|[0-9]*.[0-9]+)([eE][\-\+]?[0-9]+)?[fFlL]?" $term -4;
float2 : "[0-9]+[eE][\-\+]?[0-9]+[fFlL]?" $term -5;
string : "'([^'\\]|\\[^])*'";
regex : "\"([^\"\\]|\\[^])*\"";
unicode_char : "[uU]\+[0-9a-fA-F]+";
decimalint : "-?[1-9][0-9]*[uUlL]?";
hexint : "-?(0x|0X)[0-9a-fA-F]+[uUlL]?";
octalint : "-?0[0-7]*[uUlL]?";

statement 
  : expression ';'
  { printf("val %d\n", $0.value); }
  | '{' new_scope statement* '}'
  [ ${scope} = enter_D_Scope(${scope}, $n0.scope); ]
  ;

new_scope: [ ${scope} = new_D_Scope(${scope}); ];

expression 
  : identifier ':' expression 
  [ 
    D_Sym *s;
    ps($n.start_loc.s);
    ps($n.end);
    if (find_D_Sym_in_Scope(${scope}, ${scope}, $n0.start_loc.s, $n0.end))
      printf("duplicate identifier line %d\n", $n0.start_loc.line);
    s = NEW_D_SYM(${scope}, $n0.start_loc.s, $n0.end);
    s->user.value = $2.value;
    $$.value = s->user.value;
  ]
  | identifier '=' expression
  [ D_Sym *s = find_D_Sym(${scope}, $n0.start_loc.s, $n0.end);
    s = UPDATE_D_SYM(s, &${scope});
    s->user.value = $2.value;
    $$.value = s->user.value;
  ]
  | integer 
  [ $$.value = atoi($n0.start_loc.s); ]
  | identifier 
  [ D_Sym *s = find_D_Sym(${scope}, $n0.start_loc.s, $n0.end);
    if (s)
      $$.value = s->user.value;
  ]
  | expression '+' expression
  [ $$.value = $0.value + $1.value; ]
  ;

integer: "-?([0-9]|0(x|X))[0-9]*(u|U|b|B|w|W|L|l)*" $term -1;
identifier: "[a-zA-Z_][a-zA-Z_0-9]*";

results in:

mobile_c@Mobile-C:~/git/dparser$ ./make_dparser ./PARSER_GRAMMER.g && gcc PARSER_GRAMMER.c -lpthread && ./a.out PARSER_LEXER.g -v  -v
In file included from ../CCR/Scripts/Shell/shell.h:18:0,
                 from PARSER_GRAMMER.c:4:
../CCR/Scripts/Shell/builtins/env.h: In function ‘env__get_env’:
../CCR/Scripts/Shell/builtins/env.h:355:10: warning: return from incompatible pointer type [-Wincompatible-pointer-types]
   return *b;
          ^~
In file included from ../CCR/Scripts/Shell/shell.h:125:0,
                 from PARSER_GRAMMER.c:4:
../CCR/Scripts/Shell/builtins/whereis.h: In function ‘builtin__whereis’:
../CCR/Scripts/Shell/builtins/whereis.h:51:16: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  char * file = argv[skip_arg0];
                ^~~~
../CCR/Scripts/Shell/builtins/whereis.h:35:143: warning: function returns address of local variable [-Wreturn-local-addr]
 #define try DEBUG printf("trying %s\n", ph); if (access(ph, F_OK) == 0) { if (shell.builtin) printf("found '%s' at '%s'\n", file, ph); return ph; }
                                                                                                                                               ^
../CCR/Scripts/Shell/builtins/whereis.h:75:5: note: in expansion of macro ‘try’
     try
     ^~~
../CCR/Scripts/Shell/builtins/whereis.h:35:143: warning: function returns address of local variable [-Wreturn-local-addr]
 #define try DEBUG printf("trying %s\n", ph); if (access(ph, F_OK) == 0) { if (shell.builtin) printf("found '%s' at '%s'\n", file, ph); return ph; }
                                                                                                                                               ^
../CCR/Scripts/Shell/builtins/whereis.h:77:5: note: in expansion of macro ‘try’
     try
     ^~~
../CCR/Scripts/Shell/builtins/whereis.h:35:143: warning: function returns address of local variable [-Wreturn-local-addr]
 #define try DEBUG printf("trying %s\n", ph); if (access(ph, F_OK) == 0) { if (shell.builtin) printf("found '%s' at '%s'\n", file, ph); return ph; }
                                                                                                                                               ^
../CCR/Scripts/Shell/builtins/whereis.h:80:5: note: in expansion of macro ‘try’
     try
     ^~~
../CCR/Scripts/Shell/builtins/whereis.h:35:143: warning: function returns address of local variable [-Wreturn-local-addr]
 #define try DEBUG printf("trying %s\n", ph); if (access(ph, F_OK) == 0) { if (shell.builtin) printf("found '%s' at '%s'\n", file, ph); return ph; }
                                                                                                                                               ^
../CCR/Scripts/Shell/builtins/whereis.h:87:4: note: in expansion of macro ‘try’
    try
    ^~~
../CCR/Scripts/Shell/builtins/whereis.h:35:143: warning: function returns address of local variable [-Wreturn-local-addr]
 #define try DEBUG printf("trying %s\n", ph); if (access(ph, F_OK) == 0) { if (shell.builtin) printf("found '%s' at '%s'\n", file, ph); return ph; }
                                                                                                                                               ^
../CCR/Scripts/Shell/builtins/whereis.h:89:4: note: in expansion of macro ‘try’
    try
    ^~~
../CCR/Scripts/Shell/builtins/whereis.h:35:143: warning: function returns address of local variable [-Wreturn-local-addr]
 #define try DEBUG printf("trying %s\n", ph); if (access(ph, F_OK) == 0) { if (shell.builtin) printf("found '%s' at '%s'\n", file, ph); return ph; }
                                                                                                                                               ^
../CCR/Scripts/Shell/builtins/whereis.h:92:4: note: in expansion of macro ‘try’
    try
    ^~~
../CCR/Scripts/Shell/builtins/whereis.h:35:143: warning: function returns address of local variable [-Wreturn-local-addr]
 #define try DEBUG printf("trying %s\n", ph); if (access(ph, F_OK) == 0) { if (shell.builtin) printf("found '%s' at '%s'\n", file, ph); return ph; }
                                                                                                                                               ^
../CCR/Scripts/Shell/builtins/whereis.h:96:3: note: in expansion of macro ‘try’
   try
   ^~~
../CCR/Scripts/Shell/builtins/whereis.h:35:143: warning: function returns address of local variable [-Wreturn-local-addr]
 #define try DEBUG printf("trying %s\n", ph); if (access(ph, F_OK) == 0) { if (shell.builtin) printf("found '%s' at '%s'\n", file, ph); return ph; }
                                                                                                                                               ^
../CCR/Scripts/Shell/builtins/whereis.h:98:3: note: in expansion of macro ‘try’
   try
   ^~~
In file included from ../CCR/Scripts/Shell/shell.h:135:0,
                 from PARSER_GRAMMER.c:4:
../CCR/Scripts/Shell/builtins/argv.h: In function ‘Xmalloc’:
../CCR/Scripts/Shell/builtins/argv.h:30:25: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
         fprintf(stderr, nomem, sz);
                         ^~~~~
../CCR/Scripts/Shell/builtins/argv.h: In function ‘Xrealloc’:
../CCR/Scripts/Shell/builtins/argv.h:41:25: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
         fprintf(stderr, nomem, sz);
                         ^~~~~
In file included from PARSER_GRAMMER.c:4:0:
../CCR/Scripts/Shell/shell.h: In function ‘builtin’:
../CCR/Scripts/Shell/shell.h:179:43: warning: passing argument 2 of ‘builtin__hex’ from incompatible pointer type [-Wincompatible-pointer-types]
   ifb("hex") iftimeret(builtin__hex(argc, argv))
                                           ^
../CCR/Scripts/Shell/shell.h:161:24: note: in definition of macro ‘iftimeret’
 #define iftimeret(x) { x; }
                        ^
../CCR/Scripts/Shell/shell.h:164:5: note: expected ‘char **’ but argument is of type ‘const char **’
 int builtin__hex(int argc, char * argv[]) { return 0; }
     ^~~~~~~~~~~~
../CCR/Scripts/Shell/shell.h:180:45: warning: passing argument 2 of ‘builtin__cat’ from incompatible pointer type [-Wincompatible-pointer-types]
   elifb("cat") iftimeret(builtin__cat(argc, argv))
                                             ^
../CCR/Scripts/Shell/shell.h:161:24: note: in definition of macro ‘iftimeret’
 #define iftimeret(x) { x; }
                        ^
../CCR/Scripts/Shell/shell.h:165:5: note: expected ‘char **’ but argument is of type ‘const char **’
 int builtin__cat(int argc, char * argv[]) { return 0; }
     ^~~~~~~~~~~~
../CCR/Scripts/Shell/shell.h:181:52: warning: passing argument 2 of ‘builtin__json’ from incompatible pointer type [-Wincompatible-pointer-types]
   elifb("json") iftimeret(puts(builtin__json(argc, argv)))
                                                    ^
../CCR/Scripts/Shell/shell.h:161:24: note: in definition of macro ‘iftimeret’
 #define iftimeret(x) { x; }
                        ^
../CCR/Scripts/Shell/shell.h:166:5: note: expected ‘char **’ but argument is of type ‘const char **’
 int builtin__json(int argc, char * argv[]) { return 0; }
     ^~~~~~~~~~~~~
../CCR/Scripts/Shell/shell.h:181:32: warning: passing argument 1 of ‘puts’ makes pointer from integer without a cast [-Wint-conversion]
   elifb("json") iftimeret(puts(builtin__json(argc, argv)))
                                ^
../CCR/Scripts/Shell/shell.h:161:24: note: in definition of macro ‘iftimeret’
 #define iftimeret(x) { x; }
                        ^
In file included from ../CCR/Scripts/Shell/shell.h:6:0,
                 from PARSER_GRAMMER.c:4:
/usr/include/stdio.h:632:12: note: expected ‘const char *’ but argument is of type ‘int’
 extern int puts (const char *__s);
            ^~~~
In file included from PARSER_GRAMMER.c:4:0:
../CCR/Scripts/Shell/shell.h:182:45: warning: passing argument 2 of ‘builtin__xxd’ from incompatible pointer type [-Wincompatible-pointer-types]
   elifb("xxd") iftimeret(builtin__xxd(argc, argv))
                                             ^
../CCR/Scripts/Shell/shell.h:161:24: note: in definition of macro ‘iftimeret’
 #define iftimeret(x) { x; }
                        ^
../CCR/Scripts/Shell/shell.h:167:5: note: expected ‘char **’ but argument is of type ‘const char **’
 int builtin__xxd(int argc, char * argv[]) { return 0; }
     ^~~~~~~~~~~~
../CCR/Scripts/Shell/shell.h:183:54: warning: passing argument 2 of ‘builtin__CPU_Info’ from incompatible pointer type [-Wincompatible-pointer-types]
   elifb("CPUInfo") iftimeret(builtin__CPU_Info(argc, argv))
                                                      ^
../CCR/Scripts/Shell/shell.h:161:24: note: in definition of macro ‘iftimeret’
 #define iftimeret(x) { x; }
                        ^
../CCR/Scripts/Shell/shell.h:168:5: note: expected ‘char **’ but argument is of type ‘const char **’
 int builtin__CPU_Info(int argc, char * argv[]) { return 0; }
     ^~~~~~~~~~~~~~~~~
../CCR/Scripts/Shell/shell.h:184:43: warning: passing argument 2 of ‘builtin__ls’ from incompatible pointer type [-Wincompatible-pointer-types]
   elifb("ls") iftimeret(builtin__ls(argc, argv))
                                           ^
../CCR/Scripts/Shell/shell.h:161:24: note: in definition of macro ‘iftimeret’
 #define iftimeret(x) { x; }
                        ^
../CCR/Scripts/Shell/shell.h:169:5: note: expected ‘char **’ but argument is of type ‘const char **’
 int builtin__ls(int argc, char * argv[]) { return 0; }
     ^~~~~~~~~~~
../CCR/Scripts/Shell/shell.h:185:45: warning: passing argument 2 of ‘builtin__gcc’ from incompatible pointer type [-Wincompatible-pointer-types]
   elifb("gcc") iftimeret(builtin__gcc(argc, argv))
                                             ^
../CCR/Scripts/Shell/shell.h:161:24: note: in definition of macro ‘iftimeret’
 #define iftimeret(x) { x; }
                        ^
../CCR/Scripts/Shell/shell.h:170:5: note: expected ‘char **’ but argument is of type ‘const char **’
 int builtin__gcc(int argc, char * argv[]) { return 0; }
     ^~~~~~~~~~~~
In file included from PARSER_GRAMMER.c:4:0:
../CCR/Scripts/Shell/shell.h: In function ‘fix_string’:
../CCR/Scripts/Shell/shell.h:274:9: warning: passing argument 1 of ‘quote’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  mq(qt, fmt);
         ^
../CCR/Scripts/Shell/shell.h:133:35: note: in definition of macro ‘mq’
 #define mq(a, b) char * a = quote(b)
                                   ^
../CCR/Scripts/Shell/shell.h:127:8: note: expected ‘char *’ but argument is of type ‘const char *’
 char * quote (char * str) {
        ^~~~~
../CCR/Scripts/Shell/shell.h: In function ‘replace’:
../CCR/Scripts/Shell/shell.h:323:8: warning: passing argument 1 of ‘quote’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  mq(qt,str);
        ^
../CCR/Scripts/Shell/shell.h:133:35: note: in definition of macro ‘mq’
 #define mq(a, b) char * a = quote(b)
                                   ^
../CCR/Scripts/Shell/shell.h:127:8: note: expected ‘char *’ but argument is of type ‘const char *’
 char * quote (char * str) {
        ^~~~~
In file included from PARSER_GRAMMER.c:4:0:
../CCR/Scripts/Shell/shell.h: In function ‘execute’:
../CCR/Scripts/Shell/shell.h:430:106: warning: passing argument 3 of ‘builtin’ from incompatible pointer type [-Wincompatible-pointer-types]
  if (!ifbuiltin(cmd->vector_word[0])) return (void *) builtin(cmd->vector_word[0], cmd->vector_word_idx, cmd->vector_word);
                                                                                                          ^~~
In file included from PARSER_GRAMMER.c:4:0:
../CCR/Scripts/Shell/shell.h:177:5: note: expected ‘const char **’ but argument is of type ‘char **’
 int builtin(const char * builtin, const int argc, const char * argv[]) {
     ^~~~~~~
In file included from PARSER_GRAMMER.c:4:0:
../CCR/Scripts/Shell/shell.h:430:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  if (!ifbuiltin(cmd->vector_word[0])) return (void *) builtin(cmd->vector_word[0], cmd->vector_word_idx, cmd->vector_word);
                                              ^
../CCR/Scripts/Shell/shell.h:459:85: warning: passing argument 3 of ‘builtin’ from incompatible pointer type [-Wincompatible-pointer-types]
              builtin(cmd->vector_sub[idx].vector_sub_word[1], cmd->vector_word_idx, cmd->vector_word);
                                                                                     ^~~
In file included from PARSER_GRAMMER.c:4:0:
../CCR/Scripts/Shell/shell.h:177:5: note: expected ‘const char **’ but argument is of type ‘char **’
 int builtin(const char * builtin, const int argc, const char * argv[]) {
     ^~~~~~~
In file included from PARSER_GRAMMER.c:4:0:
../CCR/Scripts/Shell/shell.h:478:51: warning: passing argument 2 of ‘builtin__whereis’ from incompatible pointer type [-Wincompatible-pointer-types]
      exe = builtin__whereis(cmd->vector_word_idx, cmd->vector_word, ".c", false, NULL, whereis_mode_return_first);
                                                   ^~~
In file included from ../CCR/Scripts/Shell/shell.h:125:0,
                 from PARSER_GRAMMER.c:4:
../CCR/Scripts/Shell/builtins/whereis.h:39:8: note: expected ‘const char **’ but argument is of type ‘char **’
 char * builtin__whereis(const int argc, const char * argv[], const char * extention, int skip_arg0, char * optional_path, int mode) {
        ^~~~~~~~~~~~~~~~
In file included from ../CCR/Scripts/Shell/shell.h:20:0,
                 from PARSER_GRAMMER.c:4:
../CCR/Scripts/Shell/builtins/printfmacro.h:210:27: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘char *’ [-Wformat=]
 #define pi(x)      printf("%s = %d\n", #x, x);
                           ^
../CCR/Scripts/Shell/shell.h:482:6: note: in expansion of macro ‘pi’
      pi(*(cmd->vector_word))
      ^~
../CCR/Scripts/Shell/builtins/printfmacro.h:210:27: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘char *’ [-Wformat=]
 #define pi(x)      printf("%s = %d\n", #x, x);
                           ^
../CCR/Scripts/Shell/shell.h:484:6: note: in expansion of macro ‘pi’
      pi(*(cmd->vector_word+1))
      ^~
../CCR/Scripts/Shell/builtins/printfmacro.h:210:27: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘char *’ [-Wformat=]
 #define pi(x)      printf("%s = %d\n", #x, x);
                           ^
../CCR/Scripts/Shell/shell.h:486:6: note: in expansion of macro ‘pi’
      pi(*(cmd->vector_word+2))
      ^~
In file included from PARSER_GRAMMER.c:4:0:
../CCR/Scripts/Shell/shell.h:497:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      return (void *) ret;
             ^
../CCR/Scripts/Shell/shell.h: In function ‘execute_thread’:
../CCR/Scripts/Shell/shell.h:534:83: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   DEBUG printf("Main: completed join with thread %ld having a status of %d\n", t, (int)status);
                                                                                   ^
In file included from PARSER_GRAMMER.c:4:0:
../CCR/Scripts/Shell/shell.h: In function ‘parse’:
../CCR/Scripts/Shell/shell.h:669:8: warning: passing argument 1 of ‘quote’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  mq(qt,args);
        ^
../CCR/Scripts/Shell/shell.h:133:35: note: in definition of macro ‘mq’
 #define mq(a, b) char * a = quote(b)
                                   ^
../CCR/Scripts/Shell/shell.h:127:8: note: expected ‘char *’ but argument is of type ‘const char *’
 char * quote (char * str) {
        ^~~~~
In file included from libdparse.h:1:0,
                 from ./PARSER_GRAMMER.g:16,
                 from PARSER_GRAMMER.c:5:
arg.c: In function ‘process_arg’:
arg.c:35:12: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char **’ [-Wformat=]
     printf("invalid argument: %s\n", *argv);
            ^~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~
In file included from PARSER_GRAMMER.c:8:0:
../CCR/Scripts/Shell/builtins/regex_str.h: In function ‘getbitgroupcount’:
../CCR/Scripts/Shell/builtins/regex_str.h:8:18: warning: passing argument 1 of ‘snprintf’ from incompatible pointer type [-Wincompatible-pointer-types]
  return snprintf(stdout, 0, "%d", bit);
                  ^~~~~~
In file included from ../CCR/Scripts/Shell/shell.h:6:0,
                 from PARSER_GRAMMER.c:4:
/usr/include/stdio.h:340:12: note: expected ‘char * restrict’ but argument is of type ‘struct _IO_FILE *’
 extern int snprintf (char *__restrict __s, size_t __maxlen,
            ^~~~~~~~
speculative start
(*(D_PN(_ps, _offset))).start_loc.s = token : rule;

(*(D_PN(_ps, _offset))).end = token : rule;

(*(D_PN(_ps, _offset))).end_skip = token : rule;

(*(D_PN(_ps, _offset))).start_loc.s = token : rule;

(*(D_PN(_ps, _offset))).end = token : rule;

speculative end
speculative start
(*(D_PN(_ps, _offset))).start_loc.s = : rule;

(*(D_PN(_ps, _offset))).end = : rule;

(*(D_PN(_ps, _offset))).end_skip = : rule;

(*(D_PN(_ps, _offset))).start_loc.s = : rule;

(*(D_PN(_ps, _offset))).end = : rule;

speculative end
speculative start
(*(D_PN(_ps, _offset))).start_loc.s = rule;

(*(D_PN(_ps, _offset))).end = rule;

(*(D_PN(_ps, _offset))).end_skip = rule;

(*(D_PN(_ps, _offset))).start_loc.s = rule;

(*(D_PN(_ps, _offset))).end = rule;

speculative end
speculative start
(*(D_PN(_ps, _offset))).start_loc.s = ;

(*(D_PN(_ps, _offset))).end = ;

(*(D_PN(_ps, _offset))).end_skip = ;

(*(D_PN(_ps, _offset))).start_loc.s = ;

(*(D_PN(_ps, _offset))).end = ;

speculative end
speculative start
(*(D_PN(_ps, _offset))).start_loc.s = 
(*(D_PN(_ps, _offset))).end = 
(*(D_PN(_ps, _offset))).end_skip = 
(*(D_PN(_ps, _offset))).start_loc.s = 
(*(D_PN(_ps, _offset))).end = 
speculative end
final start
(*(D_PN(_ps, _offset))).start_loc.s = : rule;

(*(D_PN(_ps, _offset))).end = : rule;

(*(D_PN(_ps, _offset))).end_skip = : rule;

(*(D_PN(_ps, _offset))).start_loc.s = : rule;

(*(D_PN(_ps, _offset))).end = : rule;

final end
final start
(*(D_PN(_ps, _offset))).start_loc.s = rule;

(*(D_PN(_ps, _offset))).end = rule;

(*(D_PN(_ps, _offset))).end_skip = rule;

(*(D_PN(_ps, _offset))).start_loc.s = rule;

(*(D_PN(_ps, _offset))).end = rule;

final end
final start
(*(D_PN(_ps, _offset))).start_loc.s = ;

(*(D_PN(_ps, _offset))).end = ;

(*(D_PN(_ps, _offset))).end_skip = ;

(*(D_PN(_ps, _offset))).start_loc.s = ;

(*(D_PN(_ps, _offset))).end = ;

final end
final start
(*(D_PN(_ps, _offset))).start_loc.s = ;

(*(D_PN(_ps, _offset))).end = ;

(*(D_PN(_ps, _offset))).end_skip = ;

(*(D_PN(_ps, _offset))).start_loc.s = ;

(*(D_PN(_ps, _offset))).end = ;

final end
final start
(*(D_PN(_ps, _offset))).start_loc.s = ;

(*(D_PN(_ps, _offset))).end = ;

(*(D_PN(_ps, _offset))).end_skip = ;

(*(D_PN(_ps, _offset))).start_loc.s = ;

(*(D_PN(_ps, _offset))).end = ;

final end
final start
(*(D_PN(_ps, _offset))).start_loc.s = ;

(*(D_PN(_ps, _offset))).end = ;

(*(D_PN(_ps, _offset))).end_skip = ;

(*(D_PN(_ps, _offset))).start_loc.s = ;

(*(D_PN(_ps, _offset))).end = ;

final end
final start
(*(D_PN(_ps, _offset))).start_loc.s = 
(*(D_PN(_ps, _offset))).end = 
(*(D_PN(_ps, _offset))).end_skip = 
(*(D_PN(_ps, _offset))).start_loc.s = 
(*(D_PN(_ps, _offset))).end = 
final end
76 states 23 scans 4 shifts 58 reductions 34 compares 0 ambiguities
[translation_unit]([translation_unit__2]([terminal]([identifier]([[a-zA-Z_][a-zA-Z_0-9]*] token )[s][:] : [s][terminal__4]([rule]([rule__6]([i]([i__16]([identifier]([[a-zA-Z_][a-zA-Z_0-9]*] rule ))[s]))[s][rule__7][s]))[s][;] ; ))[s])
mobile_c@Mobile-C:~/git/dparser$