#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <cartcomm/nmea.h>
#include <cartcomm/cframe.h>
#include "nan.h"
#include "debug.h"
#include "cframe_lexer.h"
#include "cframe_parser.h"
Include dependency graph for cframe_parser.c:
Go to the source code of this file.
Data Structures | |
union | yyalloc |
Defines | |
#define | YYBISON 1 |
#define | YYBISON_VERSION "2.2" |
#define | YYSKELETON_NAME "yacc.c" |
#define | YYPURE 0 |
#define | YYLSP_NEEDED 0 |
#define | yyparse cframeparse |
#define | yylex cframelex |
#define | yyerror cframeerror |
#define | yylval cframelval |
#define | yychar cframechar |
#define | yydebug cframedebug |
#define | yynerrs cframenerrs |
#define | STRING 258 |
#define | LBRACE 259 |
#define | RBRACE 260 |
#define | EQ 261 |
#define | COMMA 262 |
#define | DEBUG_LEVEL 1 |
#define | YYPARSE_PARAM data |
#define | cdata ((cframe_t *) data) |
#define | YYERROR_VERBOSE |
#define | YYDEBUG 0 |
#define | YYERROR_VERBOSE 1 |
#define | YYTOKEN_TABLE 0 |
#define | YYSIZE_T unsigned int |
#define | YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
#define | YY_(msgid) msgid |
#define | YYUSE(e) ((void) (e)) |
#define | YYID(n) (n) |
#define | YYSTACK_ALLOC YYMALLOC |
#define | YYSTACK_FREE YYFREE |
#define | YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
#define | YYMALLOC malloc |
#define | YYFREE free |
#define | YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
#define | YYSTACK_BYTES(N) |
#define | YYCOPY(To, From, Count) |
#define | YYSTACK_RELOCATE(Stack) |
#define | YYFINAL 4 |
#define | YYLAST 6 |
#define | YYNTOKENS 8 |
#define | YYNNTS 4 |
#define | YYNRULES 6 |
#define | YYNSTATES 11 |
#define | YYUNDEFTOK 2 |
#define | YYMAXUTOK 262 |
#define | YYTRANSLATE(YYX) ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
#define | YYPACT_NINF -6 |
#define | YYTABLE_NINF -1 |
#define | yyerrok (yyerrstatus = 0) |
#define | yyclearin (yychar = YYEMPTY) |
#define | YYEMPTY (-2) |
#define | YYEOF 0 |
#define | YYACCEPT goto yyacceptlab |
#define | YYABORT goto yyabortlab |
#define | YYERROR goto yyerrorlab |
#define | YYFAIL goto yyerrlab |
#define | YYRECOVERING() (!!yyerrstatus) |
#define | YYBACKUP(Token, Value) |
#define | YYTERROR 1 |
#define | YYERRCODE 256 |
#define | YYRHSLOC(Rhs, K) ((Rhs)[K]) |
#define | YYLLOC_DEFAULT(Current, Rhs, N) |
#define | YY_LOCATION_PRINT(File, Loc) ((void) 0) |
#define | YYLEX yylex () |
#define | YYDPRINTF(Args) |
#define | YY_SYMBOL_PRINT(Title, Type, Value, Location) |
#define | YY_STACK_PRINT(Bottom, Top) |
#define | YY_REDUCE_PRINT(Rule) |
#define | YYINITDEPTH 200 |
#define | YYMAXDEPTH 10000 |
#define | YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
Typedefs | |
typedef unsigned char | yytype_uint8 |
typedef short int | yytype_int8 |
typedef unsigned short int | yytype_uint16 |
typedef short int | yytype_int16 |
Enumerations | |
enum | yytokentype { STRING = 258, LBRACE = 259, RBRACE = 260, EQ = 261, COMMA = 262 } |
Functions | |
int | cframewrap (void) |
void | cframeerror (char *str) |
void | parse_avpair (cframe_t *cf, char *fieldName, char *fieldVal) |
int | yyparse () |
int | yyparse (void *YYPARSE_PARAM) |
int | parse_msg (cframe_t *cf, char *msg) |
Variables | |
int | cframedebug = 1 |
int | yychar |
YYSTYPE | yylval |
int | yynerrs |
|
Definition at line 115 of file cframe_parser.c. Referenced by yyparse(). |
|
Definition at line 89 of file cframe_parser.c. |
|
Definition at line 108 of file cframe_parser.c. |
|
Definition at line 88 of file cframe_parser.c. |
|
Definition at line 86 of file cframe_parser.c. |
|
Definition at line 87 of file cframe_parser.c. |
|
Definition at line 85 of file cframe_parser.c. |
|
Definition at line 223 of file cframe_parser.c. Referenced by yyparse(). |
|
Definition at line 614 of file cframe_parser.c. |
|
Definition at line 787 of file cframe_parser.c. Referenced by yyparse(). |
|
Definition at line 786 of file cframe_parser.c. Referenced by yyparse(). |
|
Definition at line 785 of file cframe_parser.c. Referenced by yyparse(). |
|
Definition at line 543 of file cframe_parser.c. |
|
Definition at line 542 of file cframe_parser.c. |
|
Value: do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) Definition at line 555 of file cframe_parser.c. |
|
Definition at line 47 of file cframe_parser.c. |
|
Definition at line 50 of file cframe_parser.c. |
|
Definition at line 66 of file cframe_parser.c. Referenced by yyparse(). |
|
Definition at line 538 of file cframe_parser.c. |
|
Value: do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (YYID (0)) Definition at line 349 of file cframe_parser.c. |
|
Definition at line 130 of file cframe_parser.c. |
|
Definition at line 67 of file cframe_parser.c. |
|
Definition at line 784 of file cframe_parser.c. Referenced by yyparse(). |
|
Definition at line 539 of file cframe_parser.c. |
|
Definition at line 540 of file cframe_parser.c. Referenced by yyparse(). |
|
Definition at line 574 of file cframe_parser.c. |
|
Definition at line 537 of file cframe_parser.c. |
|
Definition at line 544 of file cframe_parser.c. |
|
Definition at line 64 of file cframe_parser.c. Referenced by yyparse(). |
|
Definition at line 136 of file cframe_parser.c. |
|
Definition at line 136 of file cframe_parser.c. |
|
Definition at line 551 of file cframe_parser.c. |
|
Definition at line 379 of file cframe_parser.c. |
|
Definition at line 312 of file cframe_parser.c. |
|
Definition at line 236 of file cframe_parser.c. |
|
Definition at line 793 of file cframe_parser.c. |
|
Definition at line 381 of file cframe_parser.c. Referenced by yyparse(). |
|
Definition at line 624 of file cframe_parser.c. |
|
Definition at line 63 of file cframe_parser.c. |
|
Value: do \ if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (YYID (0)) Definition at line 583 of file cframe_parser.c. |
|
Definition at line 59 of file cframe_parser.c. |
|
Definition at line 65 of file cframe_parser.c. Referenced by yyparse(). |
|
Definition at line 305 of file cframe_parser.c. |
|
Definition at line 804 of file cframe_parser.c. Referenced by yyparse(). |
|
Definition at line 394 of file cframe_parser.c. |
|
Definition at line 68 of file cframe_parser.c. Referenced by yyparse(). |
|
Definition at line 386 of file cframe_parser.c. |
|
Definition at line 388 of file cframe_parser.c. |
|
Definition at line 390 of file cframe_parser.c. |
|
Definition at line 384 of file cframe_parser.c. |
|
Definition at line 501 of file cframe_parser.c. |
|
Definition at line 62 of file cframe_parser.c. Referenced by parse_msg(). |
|
Definition at line 114 of file cframe_parser.c. |
|
Referenced by yyparse(). |
|
Definition at line 56 of file cframe_parser.c. |
|
Definition at line 553 of file cframe_parser.c. |
|
Definition at line 581 of file cframe_parser.c. |
|
Definition at line 213 of file cframe_parser.c. |
|
Definition at line 209 of file cframe_parser.c. Referenced by yyparse(). |
|
Definition at line 53 of file cframe_parser.c. |
|
Definition at line 291 of file cframe_parser.c. Referenced by yyparse(). |
|
Definition at line 294 of file cframe_parser.c. |
|
Value: ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) Definition at line 338 of file cframe_parser.c. Referenced by yyparse(). |
|
Definition at line 292 of file cframe_parser.c. Referenced by yyparse(). |
|
Definition at line 334 of file cframe_parser.c. |
|
Value: do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack, Stack, yysize); \ Stack = &yyptr->Stack; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) Definition at line 365 of file cframe_parser.c. Referenced by yyparse(). |
|
Definition at line 518 of file cframe_parser.c. |
|
Definition at line 573 of file cframe_parser.c. |
|
Definition at line 143 of file cframe_parser.c. |
|
Definition at line 396 of file cframe_parser.c. Referenced by yyparse(). |
|
Definition at line 393 of file cframe_parser.c. |
|
Definition at line 229 of file cframe_parser.c. |
|
Definition at line 196 of file cframe_parser.c. Referenced by yyparse(). |
|
Definition at line 184 of file cframe_parser.c. |
|
Definition at line 190 of file cframe_parser.c. |
|
Definition at line 175 of file cframe_parser.c. |
|
Definition at line 76 of file cframe_parser.c. |
|
Definition at line 121 of file cframe_parser.c. References DEBUG1. |
|
Definition at line 120 of file cframe_parser.c. |
|
Definition at line 1599 of file cframe_parser.c. References cframe_t, cframe::cmd_irad, cframe::cmd_mode, cframe::cmd_speed, cframe::cur_irad, cframe::cur_mode, cframe::cur_speed, cframe::cur_throttle, DEBUG1, cframe::error_code, cframe::gps_epe, cframe::gps_lat, cframe::gps_lon, cframe::gps_speed_east, cframe::gps_speed_north, cframe::gps_status, isnan, cframe::msg_len, nmea_to_deg(), cframe::seqno, cframe::speed_limit_error, cframe::status, cframe::steer_limit_error, and cframe::timestamp. Referenced by yyparse(). |
Here is the call graph for this function:
|
Definition at line 1741 of file cframe_parser.c. References cframe_delete_buffer(), cframe_scan_string(), cframe_t, YY_BUFFER_STATE, and yyparse. Referenced by cartcomm_decode_msg(). |
Here is the call graph for this function:
|
Definition at line 1092 of file cframe_parser.c. References ASSERT_EQUAL, cdata, parse_avpair(), YY_, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, yychar, YYDPRINTF, YYEOF, yyerror, YYLAST, yylval, YYMAXDEPTH, yynerrs, YYPOPSTACK, YYSIZE_T, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, YYTRANSLATE, and yytype_int16. |
Here is the call graph for this function:
|
|
|
Definition at line 117 of file cframe_parser.c. |
|
Definition at line 1071 of file cframe_parser.c. |
|
Definition at line 1074 of file cframe_parser.c. |
|
Definition at line 1077 of file cframe_parser.c. |