summaryrefslogtreecommitdiffstats
path: root/tools/idl_parser
Commit message (Collapse)AuthorAgeFilesLines
* Introduce support for ExtendedAttributeIdentList in the IDL parser.peter@chromium.org2014-08-064-5/+51
| | | | | | | | BUG=399653 Review URL: https://codereview.chromium.org/447543002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287775 0039d316-1c4b-4281-b951-d872f2087c98
* IDL parser: implement Stringifier productionjl@opera.com2014-06-232-3/+44
| | | | | | | | | | | | | Emit a node with class 'Stringifier' for all stringifier variants. If the stringifier is an attribute, this node has a child node that represents the attribute. If the stringifier is an operation (named or unnamed) the node has a child node that represents the operation. BUG=306606 Review URL: https://codereview.chromium.org/329163002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279097 0039d316-1c4b-4281-b951-d872f2087c98
* IDL parser: align with current Web IDL specificationjl@opera.com2014-06-198-130/+182
| | | | | | | | | | | | | | | | | Mostly renumbered and restructured grammar productions. Notable changes: - add support for static attributes via StaticMember - add support for built-in types ByteString and RegExp - allow trailing comma in enum declarations Depends on: IDL parser: drop AttributeOrOperation and StaticAttribute overrides https://codereview.chromium.org/336733002/ ...or else breaks Blink compile. Review URL: https://codereview.chromium.org/329853005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278365 0039d316-1c4b-4281-b951-d872f2087c98
* IDL parser: add StaticAttribute productionjl@opera.com2014-06-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | This is a straight upstream from Blink's IDL parser, which will allow us to drop some overrides there, which in turn will allow us to update this parser to use the grammar of current Web IDL, where static attributes are supported differently (via a StaticMember production that handles both static attributes and static methods.) Preparation for: IDL parser: drop AttributeOrOperation and StaticAttribute overrides https://codereview.chromium.org/336733002/ (in Blink) ...and ultimately for: IDL parser: align with current Web IDL specification https://codereview.chromium.org/329853005/ BUG= Review URL: https://codereview.chromium.org/333853002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277843 0039d316-1c4b-4281-b951-d872f2087c98
* IDL parser: fix lint errors and PPAPI ExtAttr grammar (+ test)nbarth@chromium.org2013-08-146-43/+154
| | | | | | | | | | | | | | | This fixes Pylint errors in the IDL parser. It also fixes the grammar for PPAPI-specific extended attributes, and adds tests. Beyond beautification, this allows us to use Pylint in future (skipping long line checks). Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=216379 Review URL: https://chromiumcodereview.appspot.com/22411002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217432 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 216379 "IDL parser: fix lint errors and PPAPI ExtAttr gra..."nkostylev@chromium.org2013-08-086-154/+43
| | | | | | | | | | | | | | | | | | | > IDL parser: fix lint errors and PPAPI ExtAttr grammar (+ test) > > This fixes Pylint errors in the IDL parser. > It also fixes the grammar for PPAPI-specific extended attributes, > and adds tests. > > Beyond beautification, this allows us to use Pylint in future > (skipping long line checks). > > Review URL: https://chromiumcodereview.appspot.com/22411002 TBR=nbarth@chromium.org Review URL: https://codereview.chromium.org/22681002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216380 0039d316-1c4b-4281-b951-d872f2087c98
* IDL parser: fix lint errors and PPAPI ExtAttr grammar (+ test)nbarth@chromium.org2013-08-086-43/+154
| | | | | | | | | | | | | This fixes Pylint errors in the IDL parser. It also fixes the grammar for PPAPI-specific extended attributes, and adds tests. Beyond beautification, this allows us to use Pylint in future (skipping long line checks). Review URL: https://chromiumcodereview.appspot.com/22411002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216379 0039d316-1c4b-4281-b951-d872f2087c98
* IDL lexer: update integer regex to latest Web IDL specnbarth@chromium.org2013-08-072-1/+6
| | | | | | | | | | | | | | | | The regex for integers in Web IDL was just updated. This doesn't change behavior, but improves clarity a bit. This CL updates us to this new regex. Relevant W3C bug: Bug 19778 - Wrong regex for integer https://www.w3.org/Bugs/Public/show_bug.cgi?id=19778 TEST=idl_lexer_test.py Review URL: https://chromiumcodereview.appspot.com/22140002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216080 0039d316-1c4b-4281-b951-d872f2087c98
* PPAPI IDL support fixesnoelallen@chromium.org2013-07-316-10/+148
| | | | | | | | | | | | | | | | | | Fixes to support current PPAPI IDL files. 1- Fix optional comment in ExtendedAttributesList for Typedef 2- Adds "struct" 3- Adds typedef Type ident ( args ) : callback ident = Type ( args ) 4- Add struct test for ppapi parser. 5- Add filename to failure message for easier debugging. BUG=224150 TEST=test_parser.py (for general parser) TEST=idl_ppapi_parser.py ../../ppapi/api/*.idl (to verify we now handle pepper IDL) R=nfullagar@chromium.org Review URL: https://codereview.chromium.org/20805002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214776 0039d316-1c4b-4281-b951-d872f2087c98
* Fix ConstValue productions.noelallen@chromium.org2013-07-014-11/+17
| | | | | | | | | | | | | | | | Fix nesting of Attribute(VALUE) = [Attribute(VALUE) + Atribute(TYPE)] when using Literal floats and bools. Switch to attribute VALUE instead of NAME for Consts. Dump VALUE and TYPE by default when dumping tree. Add test for BOOL production in enum. NOTE: ATM it's legal to assign a bool to an ENUM, however I will change this in a future CL when I specialize int only const values. BUG=224150 TEST=PRESUBMIT.py R=nfullagar@chromium.org Review URL: https://codereview.chromium.org/18274002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209462 0039d316-1c4b-4281-b951-d872f2087c98
* Adds the ability to processnoelallen@chromium.org2013-07-013-1/+361
| | | | | | | | | | | | | | | | | | | identifier or identifier = ConstValue and removes string from Enums for Pepper IDL. BUG=224150 TEST=PRESUBMIT or ./run_tests.py R=nfullagar@chromium.org Review URL: https://codereview.chromium.org/18273002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209454 0039d316-1c4b-4281-b951-d872f2087c98
* Add label, inline, and ppapi basic typesnoelallen@chromium.org2013-06-2915-23/+268
| | | | | | | | | | | | | | | | This CL adds the basic pepper types (pp_stdint.idl) into the compiler as a primitive type. Adds idl_ppapi_parser.py. Moves test_parser/*.idl to test_parser/*_web.idl (These files are unchanged) Addes test_parser/*_ppapi.idl to test pepper specific productions. BUG=224150 R=nfullagar@chromium.org Review URL: https://codereview.chromium.org/18191014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209339 0039d316-1c4b-4281-b951-d872f2087c98
* Add test for decimal and hexadecimal integersnbarth@chromium.org2013-05-251-0/+2
| | | | | | | | BUG=243263 Review URL: https://chromiumcodereview.appspot.com/15660006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202287 0039d316-1c4b-4281-b951-d872f2087c98
* Fix integer regexnbarth@chromium.org2013-05-241-1/+1
| | | | | | | | BUG=243263 Review URL: https://chromiumcodereview.appspot.com/15860002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202049 0039d316-1c4b-4281-b951-d872f2087c98
* Add __init__.py file to Web IDL parsernbarth@chromium.org2013-05-231-0/+0
| | | | | | | | | | | | | | | | | | | | This (empty) file makes the idl_parser directory into a Python package, natch. This makes importing the modules easier, since I'm trying out deriving the parser (hence I don't need to have a separate branch for Chromium just to track this file). FWIW, I'm currently importing the lexer by backing up to the Chromium directory and then including "tools" in the path; is this correct, or is there a cleaner way of doing it? Thanks! # Base lexer is in Chromium src/tools/idl_parser module_path, module_name = os.path.split(__file__) tools_dir = os.path.join(module_path, '..', '..', '..', '..', '..', 'tools') sys.path.append(tools_dir) from idl_parser.idl_lexer import IDLLexer Review URL: https://chromiumcodereview.appspot.com/15659004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201821 0039d316-1c4b-4281-b951-d872f2087c98
* Add WebIDL and Pepper compliant lexer/parser tool.noelallen@google.com2013-04-1214-57/+2181
| | | | | | | | | | | | | | | | | | | | | | | This CL is the first step towards supporting automatic doc generation. This lexer more closely follows the WebIDL spec. Please review idl_node, idl_parser, idl_node idl_log.py is unchanged from the original This is a complete re-write of the original lexer/parser, as well as simplifications to IDLNode. All *.in and *.idl files are for test purposes only. To test: python idl_lexer.py OR python idl_parser.py NOTRY=true R=sehr@chromium.org BUG=224150 Review URL: https://codereview.chromium.org/13498002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193973 0039d316-1c4b-4281-b951-d872f2087c98
* Add shebang so check_perms test doesn't faildmazzoni@chromium.org2013-04-111-0/+1
| | | | | | | | | BUG=none TBR=noelallen Review URL: https://codereview.chromium.org/14103009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193672 0039d316-1c4b-4281-b951-d872f2087c98
* Some additional cleanup:noelallen@chromium.org2013-04-118-139/+303
| | | | | | | | | | | | | | | | | Split tests into separate files to make them easier to work on. Convert tests to unittests. Split lexer into pure WebIDL and Pepper components Tests now run automatically via PRESUBMIT when any change is made to the generator directory. NOTRY=true R=asargent@chromium.org BUG=224150 Review URL: https://chromiumcodereview.appspot.com/13841013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193661 0039d316-1c4b-4281-b951-d872f2087c98
* Add WebIDL and Pepper compliant lexer tool.noelallen@google.com2013-04-063-0/+440
This CL is the first step towards supporting automatic doc generation. This lexer more closely follows the WebIDL spec. Tests run manually, CL will be added to automate. NOTRY=true To test: python idl_lexer.py R=asargent@chromium.org BUG=224150 Review URL: https://codereview.chromium.org/13390012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192761 0039d316-1c4b-4281-b951-d872f2087c98