#! /usr/bin/env python
# -*- coding: utf-8 -*-

#   eLyXer -- convert LyX source files to HTML output.
#
#   Copyright (C) 2009-2010 Alex Fernández
#
#   This program is free software: you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation, either version 3 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program.  If not, see <http://www.gnu.org/licenses/>.

# --end--

[GeneralConfig.version]
date:2010-03-11
number:0.1

[JavaToPyConfig.declarations]
$file:[$class]+
$class:$scope class $classname $inheritance { [$method]* }
$scope:public|private|protected
$classname:$$
$inheritance:[extends $classlist]? [implements $classlist]?
$classlist:[$classname]?[, $classname]*
$method:$scope [$qualifier]* $type $methodname ( $paramsdeclaration ) { $block }
$methodname:$$
$paramsdeclaration:[$paramdeclaration]?[,$paramdeclaration]*
$paramdeclaration:$type $variablename
$variablename:$$
$qualifier:static|final
$type:int|String|$classname
$conditional:if ($condition) $block
$condition:$value|$logicalvalue
$logicalvalue:$orvalue|$andvalue
$orvalue:$value || $value
$andvalue:$value && $value
$block:[$statement]*
$statement:$conditional|$declaration|$assignment|$methodcall
$methodcall:$variablename[.$methodname($params)]+
$params:[$value]?[,$value]+
$value:$variablename|$methodcall|$arithmeticexpression
$arithmeticexpression:$value + $value
$declaration:$simpledeclaration|$declarationassignment
$simpledeclaration:$type $variablename;
$declarationassignment:$type $variablename = $value;
$assignment:$variablename = $value;

[JavaToPyConfig.output]
$class:class $classname(object):\n\t[$method]*
$classname:$classname
$method:def $methodname:\n\t$block
$conditional:if $condition:\n\t$block

