[Xorp-hackers] [PATCH] xorp: Automatically generate lex and yacc files + added support for uint64 type

Ben Greear greearb at candelatech.com
Sat Mar 3 14:06:22 PST 2012


On 02/29/2012 09:07 AM, igorm at etf.rs wrote:
> From: Igor Maravic<igorm at etf.rs>
>
> In xorp/site_scons/config/allconfig.py added checks if 'flex' and 'bison' are installed.
> If they aren't instructs user how to install them (instructions are for Ubuntu and Fedora).
> Flex and Bison could install on Windows, but I didn't check that.

As far as I know, the only want to compile xorp for windows is to use
a mingw cross-compiler on Linux (at least, that is how I do it),
so that might be OK.

> Deleted all yacc and lex files from xorp/rtrmgr. They should be automatically generated with flex.
>
> Change xorp/rtrmgr/SConscript to automatically generate yacc and lex files with bison and flex.
> In CPPPATH added env['xorp_sorcedir'] so generated files could include necessary files.
> Also did minor changes in .yy and .ll files, so they would compile.
>
> In all .yy and .ll files added support for uint64 and uin64range types. Their nodes are called
> NODE_ULONG and NODE_ULONGRANGE respectively.
>
> In range.hh added U64Range class. Does everything as U32Range, but with uint64_t instead of uint32_t variables.
>
> In template_tree_node.cc and template_tree_node.hh added ULongTemplate and ULongRangeTemplate to handle new types.
>
> Unfortunately Eclipse striped whitespaces from changed files, so they are meshed up with the changed code.

This patch is huge.  I understand that most of it is just
deleting files, but can you please split this up so that the
file deletes are one commit and the other changes are in one
or more commits?

Maybe do the changes to sconscript, update the .yy and .lo files,
add the new u64 types, and then as a last commit, remove the
auto-generated files?

And, instead of sending a git patch to remove the files, maybe
just post the 'git rm ...' command and I'll just run that?

Thanks,
Ben

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Xorp-hackers mailing list