Commit db0649e0 authored by Maxime Perrotin's avatar Maxime Perrotin

Add support for new Position_In_File property

augmented AADL grammar
used runantlr aadl.g to rebuild
parent 37ddae41
......@@ -436,6 +436,7 @@ end Stream_Element_Buffer;
o.write(' Source_Data_Size => %d B%s;\n' % (le_size_rounded, bAADLv2 and "ytes" or ""))
o.write(' -- name of the corresponding data type in the source file:\n')
o.write(' Type_Source_Name => "%s";\n' % asnTypename)
o.write(' TASTE::Position_In_File => [ line => %s ; column => 1 ; ];\n' % node._lineno)
o.write(' -- what kind of type is this?\n')
prefix = bAADLv2 and "TASTE" or "assert_properties"
o.write(' %s::ASN1_Basic_Type =>' % prefix)
......
This diff is collapsed.
This diff is collapsed.
// $ANTLR 2.7.7 (20120126): aadl.g -> AadlParserTokenTypes.txt$
// $ANTLR 2.7.7 (20160127): aadl.g -> AadlParserTokenTypes.txt$
AadlParser // output token vocab name
PACKAGE="package"=4
END="end"=5
......@@ -75,36 +75,38 @@ ASSIGNPLUS=75
VALUE="value"=76
IN="in"=77
BINDING="binding"=78
OR="or"=79
AND="and"=80
TRUE="true"=81
FALSE="false"=82
NOT=83
STRING_LITERAL=84
CALLS="calls"=85
MODES="modes"=86
INITIAL="initial"=87
LTRANS=88
RTRANS=89
ARROW=90
OUT="out"=91
INVERSE="inverse"=92
DARROW=93
FLOWS="flows"=94
SOURCE="source"=95
SINK="sink"=96
PATH="path"=97
AADLSPEC=98
NOTT="not"=99
TRANSITIONS="transitions"=100
HASH=101
DIGIT=102
EXPONENT=103
INT_EXPONENT=104
EXTENDED_DIGIT=105
BASED_INTEGER=106
BASE=107
ESC=108
HEX_DIGIT=109
WS=110
SL_COMMENT=111
LBRACKET=79
RBRACKET=80
OR="or"=81
AND="and"=82
TRUE="true"=83
FALSE="false"=84
NOT=85
STRING_LITERAL=86
CALLS="calls"=87
MODES="modes"=88
INITIAL="initial"=89
LTRANS=90
RTRANS=91
ARROW=92
OUT="out"=93
INVERSE="inverse"=94
DARROW=95
FLOWS="flows"=96
SOURCE="source"=97
SINK="sink"=98
PATH="path"=99
AADLSPEC=100
NOTT="not"=101
TRANSITIONS="transitions"=102
HASH=103
DIGIT=104
EXPONENT=105
INT_EXPONENT=106
EXTENDED_DIGIT=107
BASED_INTEGER=108
BASE=109
ESC=110
HEX_DIGIT=111
WS=112
SL_COMMENT=113
......@@ -5,9 +5,9 @@ options {
}
{
from commonPy.aadlAST import *
from commonPy.utility import panic
import commonPy.configMT
from commonPy2.aadlAST import *
from commonPy2.utility import panic
import commonPy2.configMT
global g_currentPackage
g_currentPackage = ""
}
......@@ -1649,6 +1649,10 @@ pe_or_list returns [retValue]
|
( logical_or )
)
|
(
LBRACKET (a=property_name_reference ASSIGN b=property_expression SEMI)* RBRACKET
)
;
......@@ -1762,7 +1766,7 @@ component_classifier_term returns [result]
{
result = None
}
c=component_category ( cr=classifier_reference { result = cr })?
component_category ( cr=classifier_reference { result = cr })?
;
......@@ -2598,6 +2602,8 @@ tokens {
LPAREN : '(' ;
RPAREN : ')' ;
LCURLY : '{' ;
LBRACKET : '[' ;
RBRACKET : ']' ;
RCURLY : '}' ;
COLON : ':' ;
PLUS : '+' ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment