GithubHelp home page GithubHelp logo

asap2's People

Contributors

kallemooo avatar ngbrown avatar vvromanov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

asap2's Issues

I want know how to use this library

I want to know how to use this library and function in this library to parse asap2(a2l) ?

Could you share me some reference about the Asap2 library to use it ?

Identifier RESERVED (PrgType) cannot be parsed inside MEMORY_SEGMENT

The grammar is identifying the RESERVED PrgType as token which makes the parser fail.
E.x.: (I renamed the segment name and description)
/begin MEMORY_SEGMENT nameofsegment "description" RESERVED

The error from the library:
… Line: 926 : Row: 66 : Syntax error, unexpected RESERVED, expecting IDENTIFIER

file parse fail for MATRIX_DIM in v1.7 a2l

Hello, I use Asap2 to parse a v1.7 a2l file, it report error when meet MATRIX_DIM like this:
MATRIX_DIM 1 200

I have check the specification, the MATRIX_DIM have fix 3 member x,y,z in v1.6, but v1.7 define like this:
MATRIX_DIM (uint Dim)+

The count of Dim can be 1,2,3,......

So I change my local project, in file Asap2.Language.grammar.y line 1194-1197 change to
matrix_dim : MATRIX_DIM NUMBER {
$$ = new MATRIX_DIM(@$, (uint)$2);
}
;

matrix_dim : MATRIX_DIM NUMBER NUMBER {
$$ = new MATRIX_DIM(@$, (uint)$2, (uint)$3);
}
;

matrix_dim : MATRIX_DIM NUMBER NUMBER NUMBER {
$$ = new MATRIX_DIM(@$, (uint)$2, (uint)$3, (uint)$4);
}
;

And class MATRIX_DIM in file Asap2File.cs change to
[Base(IsSimple = true)]
public class MATRIX_DIM : Asap2Base
{
public MATRIX_DIM(Location location, uint xDim, uint yDim, uint zDim) : base(location)
{
_Dims.Add(xDim);
_Dims.Add(yDim);
_Dims.Add(zDim);
Dims_str = xDim.ToString() + " " + yDim.ToString() + " " + zDim.ToString();
}
public MATRIX_DIM(Location location, uint xDim, uint yDim) : base(location)
{
_Dims.Add(xDim);
_Dims.Add(yDim);
Dims_str = xDim.ToString() + " " + yDim.ToString();
}
public MATRIX_DIM(Location location, uint xDim) : base(location)
{
_Dims.Add(xDim);
Dims_str = xDim.ToString();
}
[Element(0, IsArgument = true)]
public string Dims_str = "";
public List _Dims = new List();
}

Now it work for my a2l file, but the count of MATRIX_DIM is limit to 3, is there a better solution?

Number notation not understood

      /begin CHARACTERISTIC DATA_AsdDsbcCtl.AsdDsbcCtl_tiFil_nGrd_C_VW.At_Fnt
      	"time constant for speed gradient"
         VALUE
         0xa086e5b2
         _REC_S1VAL_20_U1
         2.54
         _CNV_R_R_gqBeevc_jq_228_CM
         1.e-002
         2.55
         DISPLAY_IDENTIFIER AsdDsbcCtl_tiFil_nGrd_C_VW.At_Fnt
         FORMAT "%6.2"
         /begin IF_DATA ETK
            DP_BLOB
            0xa086e5b2
            1
         /end IF_DATA
      /end CHARACTERISTIC

The parser does not like the "1.e-002".
Syntax error, unexpected IDENTIFIER, expecting NUMBER

software crash for RECORD_LAYOUT

Hi:

Thanks for you lib!

I found software crash when a2l include following txt:
/begin RECORD_LAYOUT SWORD_COL_DIRECT
FNC_VALUES 1 SWORD COLUMN_DIR DIRECT
ALIGNMENT_WORD 2
ALIGNMENT_LONG 2
ALIGNMENT_FLOAT32_IEEE 2
ALIGNMENT_FLOAT64_IEEE 4
/end RECORD_LAYOUT

It seems the problem come from Asap2Files.cs line 816
[Element(1, IsDictionary = true)]
public Dictionary<string, ALIGNMENT> alignments;
So I change it to :
[Element(1, IsDictionary = true)]
public Dictionary<string, ALIGNMENT> alignments = new Dictionary<string, ALIGNMENT>();

The software can work normally now. Is my modification correct?

Error when an IF_DATA is encountered inside an AXIS_PTS

I tried this A2L parsing utility on one of my A2L's, and it errored out, stating that an IF_DATA keyword was unexpected in an AXIS_PTS. I believe this is valid A2L syntax per ASAM MCD-2 MC. See https://www.asam.net/standards/detail/mcd-2-mc/wiki/.

I am pretty new to LEX/YACC, but i think maybe the error is on line 498 of Asap2.Language.grammar.y?

| axis_pts if_data {

should be

| axis_pts_data if_data {

Maybe?

Otherwise this is an awesome tool - thanks for making it available!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.